diff --git a/.gitlab/Fedora-Linux-CI.yml b/.gitlab/Fedora-Linux-CI.yml index 630e74e371..75b78ac79b 100644 --- a/.gitlab/Fedora-Linux-CI.yml +++ b/.gitlab/Fedora-Linux-CI.yml @@ -25,7 +25,6 @@ -G Ninja -DCMAKE_BUILD_TYPE=QABUILD -DKICAD_STDLIB_LIGHT_DEBUG=ON - -DKICAD_SPICE=ON -DKICAD_BUILD_I18N=ON ../../ - ninja 2>&1 | tee compilation_log.txt diff --git a/.gitlab/Ubuntu-20.04-CI.yml b/.gitlab/Ubuntu-20.04-CI.yml index 9e0d67b295..193b7f9c43 100644 --- a/.gitlab/Ubuntu-20.04-CI.yml +++ b/.gitlab/Ubuntu-20.04-CI.yml @@ -32,7 +32,6 @@ -DKICAD_STDLIB_LIGHT_DEBUG=ON -DKICAD_SCRIPTING_WXPYTHON=ON -DKICAD_USE_OCC=ON - -DKICAD_SPICE=ON -DKICAD_BUILD_I18N=ON -DKICAD_BUILD_PNS_DEBUG_TOOL=ON ../../ diff --git a/.gitlab/Windows-CI.yml b/.gitlab/Windows-CI.yml index 848ae514c0..38dca0e669 100644 --- a/.gitlab/Windows-CI.yml +++ b/.gitlab/Windows-CI.yml @@ -31,7 +31,6 @@ win64_build: -DCMAKE_BUILD_TYPE=Debug ` -DKICAD_SCRIPTING_WXPYTHON=OFF ` -DKICAD_USE_OCC=ON ` - -DKICAD_SPICE=ON ` -DKICAD_BUILD_PNS_DEBUG_TOOL=ON ` -DKICAD_USE_3DCONNEXION=ON ` ../../ diff --git a/.gitlab/coverity.yml b/.gitlab/coverity.yml index a60aecbf66..f18168e7da 100644 --- a/.gitlab/coverity.yml +++ b/.gitlab/coverity.yml @@ -59,7 +59,6 @@ Coverity: -DCMAKE_BUILD_TYPE=Debug -DKICAD_STDLIB_LIGHT_DEBUG=ON -DKICAD_SCRIPTING_WXPYTHON=ON - -DKICAD_SPICE=ON - coverity/bin/cov-build --dir cov-int make -j8 - *coverity_submit artifacts: diff --git a/.gitlab/linux-metadata-validate.yml b/.gitlab/linux-metadata-validate.yml index f087dcc3fa..bc524e8c63 100644 --- a/.gitlab/linux-metadata-validate.yml +++ b/.gitlab/linux-metadata-validate.yml @@ -31,7 +31,6 @@ validate_linux_metadata: -DCMAKE_BUILD_TYPE=Debug -DKICAD_STDLIB_LIGHT_DEBUG=ON -DKICAD_SCRIPTING_WXPYTHON=ON - -DKICAD_SPICE=ON -DKICAD_BUILD_I18N=ON ../../ - make metadata diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c97e01fd2..cb1217befa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,10 +75,6 @@ endif() #################################### # Feature flags #################################### -option( KICAD_SPICE - "Build KiCad with internal Spice simulator." - ON ) - option( KICAD_SPICE_QA "Build software Quality assurance unit tests for spice (default ON)" ON ) @@ -239,7 +235,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) # Pass defines into KiCad code based on the build options set add_compile_definitions( $<$:KICAD_SCRIPTING_WXPYTHON> ) -add_compile_definitions( $<$:KICAD_SPICE> ) add_compile_definitions( $<$:KICAD_SIGNAL_INTEGRITY> ) add_compile_definitions( $<$:KICAD_USE_VALGRIND> ) @@ -803,9 +798,7 @@ find_package( Fontconfig REQUIRED ) include( MinGWResourceCompiler ) # Find ngspice library, required for integrated circuit simulator -if( KICAD_SPICE ) - find_package( ngspice REQUIRED ) -endif() +find_package( ngspice REQUIRED ) # Find OpenCascade, required for STEP plugin and tools find_package(OCC) diff --git a/CMakeSettings.json.sample b/CMakeSettings.json.sample index a5570d2122..fa995192cb 100644 --- a/CMakeSettings.json.sample +++ b/CMakeSettings.json.sample @@ -31,11 +31,6 @@ "buildCommandArgs": "-v", "ctestCommandArgs": "", "variables": [ - { - "name": "KICAD_SPICE", - "value": "ON", - "type": "STRING" - }, { "name": "KICAD_BUILD_QA_TESTS", "value": "False", @@ -60,11 +55,6 @@ "buildCommandArgs": "-v", "ctestCommandArgs": "", "variables": [ - { - "name": "KICAD_SPICE", - "value": "ON", - "type": "STRING" - }, { "name": "KICAD_BUILD_QA_TESTS", "value": "False", @@ -89,11 +79,6 @@ "buildCommandArgs": "-v", "ctestCommandArgs": "", "variables": [ - { - "name": "KICAD_SPICE", - "value": "ON", - "type": "STRING" - }, { "name": "KICAD_BUILD_QA_TESTS", "value": "False", @@ -118,11 +103,6 @@ "buildCommandArgs": "-v", "ctestCommandArgs": "", "variables": [ - { - "name": "KICAD_SPICE", - "value": "ON", - "type": "STRING" - }, { "name": "KICAD_BUILD_QA_TESTS", "value": "False", @@ -157,11 +137,6 @@ "name": "CMAKE_CXX_COMPILER", "value": "${env.BIN_ROOT}/g++.exe" }, - { - "name": "KICAD_SPICE", - "value": "ON", - "type": "STRING" - }, { "name": "KICAD_BUILD_QA_TESTS", "value": "False", diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 34af51b6d1..2104fee339 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -4,9 +4,7 @@ if( COMPILER_SUPPORTS_WARNINGS ) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARN_FLAGS_C}") endif() -if( KICAD_SPICE ) - set( INC_AFTER ${INC_AFTER} ${NGSPICE_INCLUDE_DIR} ) -endif() +set( INC_AFTER ${INC_AFTER} ${NGSPICE_INCLUDE_DIR} ) include_directories( BEFORE ${INC_BEFORE} ) include_directories( diff --git a/common/build_version.cpp b/common/build_version.cpp index 8de4993fb2..09be594f28 100644 --- a/common/build_version.cpp +++ b/common/build_version.cpp @@ -41,9 +41,7 @@ extern std::string GetCurlLibVersion(); #include -#if defined( KICAD_SPICE ) #include -#endif // The include file version.h is always created even if the repo version cannot be // determined. In this case KICAD_VERSION_FULL will default to the KICAD_VERSION @@ -221,7 +219,6 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief ) aMsg << indent4 << "OCC: " << OCC_VERSION_COMPLETE << eol; aMsg << indent4 << "Curl: " << GetCurlLibVersion() << eol; -#if defined( KICAD_SPICE ) #if defined( NGSPICE_BUILD_VERSION ) aMsg << indent4 << "ngspice: " << NGSPICE_BUILD_VERSION << eol; #elif defined( NGSPICE_HAVE_CONFIG_H ) @@ -232,7 +229,6 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief ) aMsg << indent4 << "ngspice: " << NGSPICE_PACKAGE_VERSION << eol; #else aMsg << indent4 << "ngspice: " << "unknown" << eol; -#endif #endif aMsg << indent4 << "Compiler: "; @@ -263,13 +259,6 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief ) aMsg << indent4 << "KICAD_USE_EGL=" << ON; #endif - aMsg << indent4 << "KICAD_SPICE="; -#ifdef KICAD_SPICE - aMsg << ON; -#else - aMsg << OFF; -#endif - #ifndef NDEBUG aMsg << indent4 << "KICAD_STDLIB_DEBUG="; #ifdef KICAD_STDLIB_DEBUG diff --git a/doxygen/doxygen.Dockerfile b/doxygen/doxygen.Dockerfile index 87d2a49648..34a17c4d93 100644 --- a/doxygen/doxygen.Dockerfile +++ b/doxygen/doxygen.Dockerfile @@ -11,8 +11,7 @@ WORKDIR /src/build RUN cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DKICAD_USE_OCC=ON \ - -DKICAD_SCRIPTING_WXPYTHON=ON \ - -DKICAD_SPICE=ON + -DKICAD_SCRIPTING_WXPYTHON=ON RUN make doxygen-docs RUN make doxygen-python @@ -20,4 +19,4 @@ RUN make doxygen-python FROM scratch as output-image COPY --from=build-doxygen-env /src/doxygen/out/html /doxygen-docs_html -COPY --from=build-doxygen-env /src/build/pcbnew/doxygen-python/html /doxygen-python_html \ No newline at end of file +COPY --from=build-doxygen-env /src/build/pcbnew/doxygen-python/html /doxygen-python_html diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index d063e4430f..fd64ebd3bd 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -16,18 +16,17 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) endif() endif() -if( KICAD_SPICE ) - set( INC_AFTER ${INC_AFTER} ${NGSPICE_INCLUDE_DIR} ) +# Add ngspice to eeschema +set( INC_AFTER ${INC_AFTER} ${NGSPICE_INCLUDE_DIR} ) - # Find out the exact libngspice file name - get_filename_component( NGSPICE_DLL_ABSPATH "${NGSPICE_DLL}" ABSOLUTE ) - get_filename_component( NGSPICE_DLL_FILE "${NGSPICE_DLL_ABSPATH}" NAME ) +# Find out the exact libngspice file name +get_filename_component( NGSPICE_DLL_ABSPATH "${NGSPICE_DLL}" ABSOLUTE ) +get_filename_component( NGSPICE_DLL_FILE "${NGSPICE_DLL_ABSPATH}" NAME ) - set_property( SOURCE sim/ngspice.cpp - APPEND PROPERTY COMPILE_DEFINITIONS - NGSPICE_DLL_FILE="${NGSPICE_DLL_FILE}" - ) -endif() +set_property( SOURCE sim/ngspice.cpp + APPEND PROPERTY COMPILE_DEFINITIONS + NGSPICE_DLL_FILE="${NGSPICE_DLL_FILE}" + ) include_directories( BEFORE ${INC_BEFORE} ) include_directories( @@ -343,34 +342,33 @@ set( EESCHEMA_COMMON_SRCS ) -if( KICAD_SPICE ) - set( EESCHEMA_SRCS - ${EESCHEMA_SRCS} - dialogs/dialog_sim_command.cpp - dialogs/dialog_sim_command_base.cpp - dialogs/dialog_sim_format_value.cpp - dialogs/dialog_sim_format_value_base.cpp - dialogs/dialog_sim_model.cpp - dialogs/dialog_sim_model_base.cpp - dialogs/dialog_user_defined_signals.cpp - dialogs/dialog_user_defined_signals_base.cpp - tools/simulator_control.cpp - sim/ngspice_circuit_model.cpp - sim/ngspice.cpp - sim/simulator_frame.cpp - sim/simulator_frame_base.cpp - sim/sim_panel_base.cpp - sim/sim_plot_colors.cpp - sim/sim_plot_panel.cpp - sim/sim_property.cpp - sim/spice_simulator.cpp - sim/spice_value.cpp - sim/toolbars_simulator_frame.cpp - widgets/sim_notebook.cpp - widgets/tuner_slider.cpp - widgets/tuner_slider_base.cpp - ) -endif() + +set( EESCHEMA_SRCS + ${EESCHEMA_SRCS} + dialogs/dialog_sim_command.cpp + dialogs/dialog_sim_command_base.cpp + dialogs/dialog_sim_format_value.cpp + dialogs/dialog_sim_format_value_base.cpp + dialogs/dialog_sim_model.cpp + dialogs/dialog_sim_model_base.cpp + dialogs/dialog_user_defined_signals.cpp + dialogs/dialog_user_defined_signals_base.cpp + tools/simulator_control.cpp + sim/ngspice_circuit_model.cpp + sim/ngspice.cpp + sim/simulator_frame.cpp + sim/simulator_frame_base.cpp + sim/sim_panel_base.cpp + sim/sim_plot_colors.cpp + sim/sim_plot_panel.cpp + sim/sim_property.cpp + sim/spice_simulator.cpp + sim/spice_value.cpp + sim/toolbars_simulator_frame.cpp + widgets/sim_notebook.cpp + widgets/tuner_slider.cpp + widgets/tuner_slider_base.cpp +) if( WIN32 ) if( MINGW ) @@ -491,24 +489,18 @@ target_link_libraries( eeschema_kiface sexpr Boost::headers ${wxWidgets_LIBRARIES} + ${NGSPICE_LIBRARY} ) -if( KICAD_SPICE ) - target_link_libraries( eeschema_kiface - PRIVATE - ${NGSPICE_LIBRARY} +if( MSVC ) + # Allow for MSVC to debug ngspice from the build directory + add_custom_command( TARGET eeschema_kiface POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different "${NGSPICE_DLL}" "$" ) - if( MSVC ) - # Allow for MSVC to debug ngspice from the build directory - add_custom_command( TARGET eeschema_kiface POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different "${NGSPICE_DLL}" "$" - ) - - add_custom_command( TARGET eeschema_kiface POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_directory "${NGSPICE_CM_DIR}" "$/ngspice" - ) - endif() + add_custom_command( TARGET eeschema_kiface POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory "${NGSPICE_CM_DIR}" "$/ngspice" + ) endif() set_target_properties( eeschema_kiface PROPERTIES @@ -565,17 +557,15 @@ if( APPLE ) " COMPONENT Runtime ) - if( KICAD_SPICE ) - # bundle libngspice and codemodels - get_filename_component( ABS_LIBNGSPICE ${NGSPICE_LIBRARY} ABSOLUTE ) - get_filename_component( LIBNGSPICE_PATH ${ABS_LIBNGSPICE} DIRECTORY ) + # bundle libngspice and codemodels + get_filename_component( ABS_LIBNGSPICE ${NGSPICE_LIBRARY} ABSOLUTE ) + get_filename_component( LIBNGSPICE_PATH ${ABS_LIBNGSPICE} DIRECTORY ) - install( DIRECTORY "${LIBNGSPICE_PATH}/" - DESTINATION "${OSX_BUNDLE_INSTALL_PLUGIN_DIR}/sim" - FILES_MATCHING PATTERN "*.dylib") - install( DIRECTORY "${LIBNGSPICE_PATH}/ngspice" - DESTINATION "${OSX_BUNDLE_INSTALL_PLUGIN_DIR}/sim" ) - endif() + install( DIRECTORY "${LIBNGSPICE_PATH}/" + DESTINATION "${OSX_BUNDLE_INSTALL_PLUGIN_DIR}/sim" + FILES_MATCHING PATTERN "*.dylib") + install( DIRECTORY "${LIBNGSPICE_PATH}/ngspice" + DESTINATION "${OSX_BUNDLE_INSTALL_PLUGIN_DIR}/sim" ) else() if( MSVC ) target_sources( eeschema_kiface PRIVATE ${CMAKE_SOURCE_DIR}/resources/msw/eeschema-dll.rc ) diff --git a/eeschema/dialogs/dialog_lib_symbol_properties.cpp b/eeschema/dialogs/dialog_lib_symbol_properties.cpp index 2a36ba5ab9..fcfad0931a 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties.cpp +++ b/eeschema/dialogs/dialog_lib_symbol_properties.cpp @@ -35,9 +35,7 @@ #include #include -#ifdef KICAD_SPICE #include -#endif /* KICAD_SPICE */ #include #include @@ -100,11 +98,6 @@ DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES( SYMBOL_EDIT_FRAME* a m_stdSizerButtonOK->Enable( false ); } -#ifndef KICAD_SPICE - m_excludeFromSim->Hide(); - m_spiceFieldsButton->Hide(); -#endif - // wxFormBuilder doesn't include this event... m_grid->Connect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES::OnGridCellChanging ), @@ -187,10 +180,8 @@ bool DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataToWindow() m_OptionPower->SetValue( m_libEntry->IsPower() ); -#ifdef KICAD_SPICE LIB_FIELD* simEnableField = m_libEntry->FindField( SIM_ENABLE_FIELD ); m_excludeFromSim->SetValue( simEnableField && simEnableField->GetText() == wxT( "0" ) ); -#endif m_excludeFromBomCheckBox->SetValue( !m_libEntry->GetIncludeInBom() ); m_excludeFromBoardCheckBox->SetValue( !m_libEntry->GetIncludeOnBoard() ); @@ -236,7 +227,6 @@ bool DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataToWindow() void DIALOG_LIB_SYMBOL_PROPERTIES::OnExcludeFromSimulation( wxCommandEvent& event ) { -#ifdef KICAD_SPICE int simEnableFieldRow = -1; for( int ii = MANDATORY_FIELDS; ii < m_grid->GetNumberRows(); ++ii ) @@ -271,7 +261,6 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnExcludeFromSimulation( wxCommandEvent& even } OnModify(); -#endif } @@ -669,7 +658,6 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnMoveDown( wxCommandEvent& event ) void DIALOG_LIB_SYMBOL_PROPERTIES::OnEditSpiceModel( wxCommandEvent& event ) { -#ifdef KICAD_SPICE if( !m_grid->CommitPendingChanges() ) return; @@ -735,7 +723,6 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnEditSpiceModel( wxCommandEvent& event ) OnModify(); m_grid->ForceRefresh(); -#endif /* KICAD_SPICE */ } @@ -907,7 +894,6 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event ) m_delayedFocusColumn = -1; } -#ifdef KICAD_SPICE wxString simEnable; for( int ii = MANDATORY_FIELDS; ii < m_fields->GetNumberRows(); ++ii ) @@ -920,7 +906,6 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event ) } m_excludeFromSim->SetValue( simEnable == wxS( "0" ) ); -#endif } diff --git a/eeschema/dialogs/dialog_symbol_properties.cpp b/eeschema/dialogs/dialog_symbol_properties.cpp index 5e19f91514..4540946040 100644 --- a/eeschema/dialogs/dialog_symbol_properties.cpp +++ b/eeschema/dialogs/dialog_symbol_properties.cpp @@ -48,9 +48,7 @@ #include #include -#ifdef KICAD_SPICE #include -#endif /* KICAD_SPICE */ wxDEFINE_EVENT( SYMBOL_DELAY_FOCUS, wxCommandEvent ); @@ -315,11 +313,6 @@ DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES( SCH_EDIT_FRAME* aParent, m_fields = new FIELDS_GRID_TABLE( this, aParent, m_fieldsGrid, m_symbol ); -#ifndef KICAD_SPICE - m_cbExcludeFromSim->Hide(); - m_spiceFieldsButton->Hide(); -#endif /* not KICAD_SPICE */ - // Give a bit more room for combobox editors m_fieldsGrid->SetDefaultRowSize( m_fieldsGrid->GetDefaultRowSize() + 4 ); m_pinGrid->SetDefaultRowSize( m_pinGrid->GetDefaultRowSize() + 4 ); @@ -518,9 +511,7 @@ bool DIALOG_SYMBOL_PROPERTIES::TransferDataToWindow() case SYM_MIRROR_Y: m_mirrorCtrl->SetSelection( 2 ); break; } -#ifdef KICAD_SPICE m_cbExcludeFromSim->SetValue( m_symbol->GetFieldText( SIM_ENABLE_FIELD ) == wxS( "0" ) ); -#endif m_cbExcludeFromBom->SetValue( !m_symbol->GetIncludeInBom() ); m_cbExcludeFromBoard->SetValue( !m_symbol->GetIncludeOnBoard() ); m_cbDNP->SetValue( m_symbol->GetDNP() ); @@ -544,7 +535,6 @@ bool DIALOG_SYMBOL_PROPERTIES::TransferDataToWindow() void DIALOG_SYMBOL_PROPERTIES::OnExcludeFromSimulation( wxCommandEvent& event ) { -#ifdef KICAD_SPICE int simEnableFieldRow = -1; for( int ii = MANDATORY_FIELDS; ii < m_fieldsGrid->GetNumberRows(); ++ii ) @@ -579,13 +569,11 @@ void DIALOG_SYMBOL_PROPERTIES::OnExcludeFromSimulation( wxCommandEvent& event ) } OnModify(); -#endif } void DIALOG_SYMBOL_PROPERTIES::OnEditSpiceModel( wxCommandEvent& event ) { -#ifdef KICAD_SPICE if( !m_fieldsGrid->CommitPendingChanges() ) return; @@ -648,7 +636,6 @@ void DIALOG_SYMBOL_PROPERTIES::OnEditSpiceModel( wxCommandEvent& event ) OnModify(); m_fieldsGrid->ForceRefresh(); -#endif /* KICAD_SPICE */ } @@ -1188,7 +1175,6 @@ void DIALOG_SYMBOL_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event ) AdjustFieldsGridColumns(); } -#ifdef KICAD_SPICE wxString simEnable; for( int ii = MANDATORY_FIELDS; ii < m_fieldsGrid->GetNumberRows(); ++ii ) @@ -1201,7 +1187,6 @@ void DIALOG_SYMBOL_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event ) } m_cbExcludeFromSim->SetValue( simEnable == wxS( "0" ) ); -#endif } diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index ce9fd60d78..11f53fc012 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -169,13 +169,12 @@ static struct IFACE : public KIFACE_BASE, public UNITS_PROVIDER return frame; } -#ifdef KICAD_SPICE case FRAME_SIMULATOR: { SIMULATOR_FRAME* frame = new SIMULATOR_FRAME( aKiway, aParent ); return frame; } -#endif + case FRAME_SCH_VIEWER: case FRAME_SCH_VIEWER_MODAL: { diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index 34414ffbd1..fe00798508 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -256,10 +256,8 @@ void SCH_EDIT_FRAME::doReCreateMenuBar() inspectMenu->AppendSeparator(); inspectMenu->Add( EE_ACTIONS::diffSymbol ); -#ifdef KICAD_SPICE inspectMenu->AppendSeparator(); inspectMenu->Add( EE_ACTIONS::showSimulator ); -#endif //-- Tools menu ----------------------------------------------- diff --git a/eeschema/sim/kibis/kibis.cpp b/eeschema/sim/kibis/kibis.cpp index af05c74da4..b209d7d8cc 100644 --- a/eeschema/sim/kibis/kibis.cpp +++ b/eeschema/sim/kibis/kibis.cpp @@ -666,8 +666,6 @@ std::string KIBIS_PIN::addDie( KIBIS_MODEL& aModel, KIBIS_PARAMETER& aParam, int void KIBIS_PIN::getKuKdFromFile( std::string* aSimul ) { -#ifdef KICAD_SPICE - std::string outputFileName = m_topLevel->m_cacheDir + "temp_output.spice"; if( std::remove( outputFileName.c_str() ) ) @@ -743,8 +741,6 @@ void KIBIS_PIN::getKuKdFromFile( std::string* aSimul ) m_Ku = ku; m_Kd = kd; m_t = t; - -#endif } diff --git a/eeschema/tools/ee_inspection_tool.cpp b/eeschema/tools/ee_inspection_tool.cpp index f2b1a3fb49..a0179341ff 100644 --- a/eeschema/tools/ee_inspection_tool.cpp +++ b/eeschema/tools/ee_inspection_tool.cpp @@ -367,7 +367,6 @@ SYMBOL_DIFF_WIDGET* EE_INSPECTION_TOOL::constructDiffPanel( wxPanel* aParentPane int EE_INSPECTION_TOOL::RunSimulation( const TOOL_EVENT& aEvent ) { -#ifdef KICAD_SPICE SIMULATOR_FRAME* simFrame = (SIMULATOR_FRAME*) m_frame->Kiway().Player( FRAME_SIMULATOR, true ); if( !simFrame ) @@ -383,7 +382,7 @@ int EE_INSPECTION_TOOL::RunSimulation( const TOOL_EVENT& aEvent ) simFrame->Iconize( false ); simFrame->Raise(); -#endif /* KICAD_SPICE */ + return 0; } diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index 1f2d1396f2..a4503f3320 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -495,8 +495,6 @@ int SCH_EDITOR_CONTROL::ExportSymbolsToLibrary( const TOOL_EVENT& aEvent ) } -#ifdef KICAD_SPICE - #define HITTEST_THRESHOLD_PIXELS 5 int SCH_EDITOR_CONTROL::SimProbe( const TOOL_EVENT& aEvent ) @@ -745,7 +743,6 @@ int SCH_EDITOR_CONTROL::SimTune( const TOOL_EVENT& aEvent ) return 0; } -#endif /* KICAD_SPICE */ // A singleton reference for clearing the highlight @@ -2323,10 +2320,8 @@ void SCH_EDITOR_CONTROL::setTransitions() Go( &SCH_EDITOR_CONTROL::CrossProbeToPcb, EVENTS::ClearedEvent ); Go( &SCH_EDITOR_CONTROL::ExplicitCrossProbeToPcb, EE_ACTIONS::selectOnPCB.MakeEvent() ); -#ifdef KICAD_SPICE Go( &SCH_EDITOR_CONTROL::SimProbe, EE_ACTIONS::simProbe.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::SimTune, EE_ACTIONS::simTune.MakeEvent() ); -#endif /* KICAD_SPICE */ Go( &SCH_EDITOR_CONTROL::HighlightNet, EE_ACTIONS::highlightNet.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::ClearHighlight, EE_ACTIONS::clearHighlight.MakeEvent() ); diff --git a/eeschema/tools/sch_editor_control.h b/eeschema/tools/sch_editor_control.h index e185f8a5e5..cc5c535b34 100644 --- a/eeschema/tools/sch_editor_control.h +++ b/eeschema/tools/sch_editor_control.h @@ -84,10 +84,8 @@ public: int ExportSymbolsToLibrary( const TOOL_EVENT& aEvent ); -#ifdef KICAD_SPICE int SimProbe( const TOOL_EVENT& aEvent ); int SimTune( const TOOL_EVENT& aEvent ); -#endif /* KICAD_SPICE */ ///< Highlight net under the cursor. int HighlightNet( const TOOL_EVENT& aEvent ); diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index 5851221b9f..129e4dd31b 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -181,11 +181,7 @@ if( APPLE ) # this CMake instance are accessible... use helper to transfer set( SCRIPTING_HELPER "1" ) - if( KICAD_SPICE ) - set( SPICE_HELPER "1" ) - else() - set( SPICE_HELPER "0" ) - endif() + set( SPICE_HELPER "1" ) if( PYTHON_FRAMEWORK ) set( PYTHON_FRAMEWORK_HELPER "1" ) diff --git a/qa/unittests/eeschema/CMakeLists.txt b/qa/unittests/eeschema/CMakeLists.txt index aadaed4214..64bacccff4 100644 --- a/qa/unittests/eeschema/CMakeLists.txt +++ b/qa/unittests/eeschema/CMakeLists.txt @@ -25,7 +25,7 @@ include_directories( BEFORE ${INC_BEFORE} ) -if( KICAD_SPICE AND KICAD_SPICE_QA ) +if( KICAD_SPICE_QA ) set( INC_AFTER ${INC_AFTER} ${NGSPICE_INCLUDE_DIR} ) # Find out the exact libngspice file name @@ -90,7 +90,7 @@ set( QA_EESCHEMA_SRCS # Spice specific testing routine -if( KICAD_SPICE AND KICAD_SPICE_QA ) +if( KICAD_SPICE_QA ) set( QA_EESCHEMA_SRCS ${QA_EESCHEMA_SRCS} # Simulation tests @@ -134,7 +134,7 @@ PRIVATE Boost::unit_test_framework ) -if( KICAD_SPICE AND KICAD_SPICE_QA AND MSVC ) +if( KICAD_SPICE_QA AND MSVC ) # Allow for MSVC to run from the build directory add_custom_command( TARGET qa_eeschema POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${NGSPICE_DLL}" "$" diff --git a/qa/unittests/eeschema/sim/test_sim_regressions.cpp b/qa/unittests/eeschema/sim/test_sim_regressions.cpp index cadb3d57ab..a13b8e6629 100644 --- a/qa/unittests/eeschema/sim/test_sim_regressions.cpp +++ b/qa/unittests/eeschema/sim/test_sim_regressions.cpp @@ -21,8 +21,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifdef KICAD_SPICE - #include #include // To check if the current test failed (to be moved?). #include @@ -150,6 +148,3 @@ BOOST_FIXTURE_TEST_CASE( VariableSubstitutions, TEST_SIM_REGRESSIONS_FIXTURE ) TestTranPoint( 0.015, { { "V(Net-_R1-Pad2_)", -311 } } ); TestTranPoint( 0.025, { { "V(Net-_R1-Pad2_)", 311 } } ); } - - -#endif // KICAD_SPICE diff --git a/qa/unittests/eeschema/test_netlist_exporter_spice.cpp b/qa/unittests/eeschema/test_netlist_exporter_spice.cpp index f574911f57..553bf9a198 100644 --- a/qa/unittests/eeschema/test_netlist_exporter_spice.cpp +++ b/qa/unittests/eeschema/test_netlist_exporter_spice.cpp @@ -21,8 +21,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifdef KICAD_SPICE - #include #include // To check if the current test failed (to be moved?). #include @@ -278,5 +276,3 @@ BOOST_AUTO_TEST_CASE( LegacyOpamp ) BOOST_AUTO_TEST_SUITE_END() - -#endif // KICAD_SPICE diff --git a/qa/unittests/eeschema/test_netlist_exporter_spice.h b/qa/unittests/eeschema/test_netlist_exporter_spice.h index 3f93f05d0b..ac52f3fc1c 100644 --- a/qa/unittests/eeschema/test_netlist_exporter_spice.h +++ b/qa/unittests/eeschema/test_netlist_exporter_spice.h @@ -21,8 +21,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifdef KICAD_SPICE - #include #include // To check if the current test failed (to be moved?). #include @@ -283,6 +281,3 @@ public: std::unique_ptr m_reporter; bool m_abort; // set to true to force abort durint a test }; - - -#endif // KICAD_SPICE