From 5e47ce89632b602e3d15739784e5c0081e553904 Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Sun, 31 Jul 2022 07:59:00 +0200 Subject: [PATCH] Fix build errors when KICAD_SPICE=OFF --- eeschema/CMakeLists.txt | 28 +++++++++---------- .../eeschema/test_netlist_exporter_spice.cpp | 4 +++ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 1a7e81af05..e0de4a75ae 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -263,8 +263,21 @@ set( EESCHEMA_SRCS sch_plugins/legacy/sch_legacy_plugin.cpp sch_plugins/legacy/sch_legacy_plugin_helpers.cpp - # Simulator settings must get built even when the simulator build option is disabled. + # Some simulation features must be built even if libngspice is not linked. sim/spice_settings.cpp + sim/ngspice_models.cpp + sim/sim_library.cpp + sim/sim_library_spice.cpp + sim/sim_model.cpp + sim/sim_model_behavioral.cpp + sim/sim_model_xspice.cpp + sim/sim_model_ideal.cpp + sim/sim_model_ngspice.cpp + sim/sim_model_spice.cpp + sim/sim_model_source.cpp + sim/sim_model_subckt.cpp + sim/sim_model_tline.cpp + sim/sim_value.cpp tools/assign_footprints.cpp tools/backannotate.cpp @@ -312,7 +325,6 @@ if( KICAD_SPICE ) dialogs/dialog_sim_model_base.cpp sim/ngspice_helpers.cpp sim/ngspice.cpp - sim/ngspice_models.cpp sim/sim_panel_base.cpp sim/sim_plot_colors.cpp sim/sim_plot_frame.cpp @@ -320,18 +332,6 @@ if( KICAD_SPICE ) sim/sim_plot_panel.cpp sim/sim_property.cpp sim/sim_workbook.cpp - sim/sim_library.cpp - sim/sim_library_spice.cpp - sim/sim_model.cpp - sim/sim_model_behavioral.cpp - sim/sim_model_xspice.cpp - sim/sim_model_ideal.cpp - sim/sim_model_ngspice.cpp - sim/sim_model_spice.cpp - sim/sim_model_source.cpp - sim/sim_model_subckt.cpp - sim/sim_model_tline.cpp - sim/sim_value.cpp sim/spice_simulator.cpp sim/spice_value.cpp widgets/tuner_slider.cpp diff --git a/qa/unittests/eeschema/test_netlist_exporter_spice.cpp b/qa/unittests/eeschema/test_netlist_exporter_spice.cpp index 858c5ab1b6..f25682e33b 100644 --- a/qa/unittests/eeschema/test_netlist_exporter_spice.cpp +++ b/qa/unittests/eeschema/test_netlist_exporter_spice.cpp @@ -21,6 +21,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#ifdef KICAD_SPICE + #include #include #include @@ -275,3 +277,5 @@ BOOST_AUTO_TEST_CASE( LegacySources ) BOOST_AUTO_TEST_SUITE_END() + +#endif // KICAD_SPICE