Always build spice simulator support

The simulator has advanced considerably, and it is seeing lots of active
development, so make it a required part of KiCad. Additionally, the
build without the simulator has actually been broken for a while, so no
one clearly is building without ngspice right now.
This commit is contained in:
Ian McInerney 2023-03-20 15:02:45 +00:00
parent 5798b586f0
commit 016c958021
24 changed files with 62 additions and 186 deletions

View File

@ -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

View File

@ -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
../../

View File

@ -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 `
../../

View File

@ -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:

View File

@ -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

View File

@ -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( $<$<BOOL:${KICAD_SCRIPTING_WXPYTHON}>:KICAD_SCRIPTING_WXPYTHON> )
add_compile_definitions( $<$<BOOL:${KICAD_SPICE}>:KICAD_SPICE> )
add_compile_definitions( $<$<BOOL:${KICAD_SIGNAL_INTEGRITY}>:KICAD_SIGNAL_INTEGRITY> )
add_compile_definitions( $<$<BOOL:${KICAD_USE_VALGRIND}>: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)

View File

@ -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",

View File

@ -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(

View File

@ -41,9 +41,7 @@ extern std::string GetCurlLibVersion();
#include <Standard_Version.hxx>
#if defined( KICAD_SPICE )
#include <ngspice/sharedspice.h>
#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

View File

@ -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
COPY --from=build-doxygen-env /src/build/pcbnew/doxygen-python/html /doxygen-python_html

View File

@ -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}" "$<TARGET_FILE_DIR:eeschema_kiface>"
)
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}" "$<TARGET_FILE_DIR:eeschema_kiface>"
)
add_custom_command( TARGET eeschema_kiface POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory "${NGSPICE_CM_DIR}" "$<TARGET_FILE_DIR:eeschema_kiface>/ngspice"
)
endif()
add_custom_command( TARGET eeschema_kiface POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory "${NGSPICE_CM_DIR}" "$<TARGET_FILE_DIR:eeschema_kiface>/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 )

View File

@ -35,9 +35,7 @@
#include <widgets/std_bitmap_button.h>
#include <string_utils.h>
#ifdef KICAD_SPICE
#include <dialog_sim_model.h>
#endif /* KICAD_SPICE */
#include <dialog_lib_symbol_properties.h>
#include <settings/settings_manager.h>
@ -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
}

View File

@ -48,9 +48,7 @@
#include <tool/actions.h>
#include <math/vector2d.h>
#ifdef KICAD_SPICE
#include <dialog_sim_model.h>
#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<SCH_FIELD>( 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
}

View File

@ -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:
{

View File

@ -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 -----------------------------------------------

View File

@ -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
}

View File

@ -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;
}

View File

@ -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() );

View File

@ -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 );

View File

@ -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" )

View File

@ -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}" "$<TARGET_FILE_DIR:qa_eeschema>"

View File

@ -21,8 +21,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef KICAD_SPICE
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <boost/test/results_collector.hpp> // To check if the current test failed (to be moved?).
#include <eeschema_test_utils.h>
@ -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

View File

@ -21,8 +21,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef KICAD_SPICE
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <boost/test/results_collector.hpp> // To check if the current test failed (to be moved?).
#include <test_netlist_exporter_spice.h>
@ -278,5 +276,3 @@ BOOST_AUTO_TEST_CASE( LegacyOpamp )
BOOST_AUTO_TEST_SUITE_END()
#endif // KICAD_SPICE

View File

@ -21,8 +21,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef KICAD_SPICE
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <boost/test/results_collector.hpp> // To check if the current test failed (to be moved?).
#include <eeschema_test_utils.h>
@ -283,6 +281,3 @@ public:
std::unique_ptr<SPICE_TEST_REPORTER> m_reporter;
bool m_abort; // set to true to force abort durint a test
};
#endif // KICAD_SPICE