From 671f555bc856da01b8351096d38059447b81c1f9 Mon Sep 17 00:00:00 2001 From: Mike Williams Date: Tue, 7 Mar 2023 11:13:58 -0500 Subject: [PATCH] CMake: add flag to turn off spice QA tests (tests default to on) --- CMakeLists.txt | 4 ++++ qa/unittests/eeschema/CMakeLists.txt | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 76ab42a7c1..51e4b962fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,6 +78,10 @@ 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 ) + option( KICAD_USE_SENTRY "Build KiCad with support for sentry app metrics" OFF ) diff --git a/qa/unittests/eeschema/CMakeLists.txt b/qa/unittests/eeschema/CMakeLists.txt index cc58dfdb59..fcb18a94f4 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 ) +if( KICAD_SPICE AND KICAD_SPICE_QA ) set( INC_AFTER ${INC_AFTER} ${NGSPICE_INCLUDE_DIR} ) # Find out the exact libngspice file name @@ -76,7 +76,6 @@ set( QA_EESCHEMA_SRCS test_eagle_plugin.cpp test_lib_part.cpp test_netlist_exporter_kicad.cpp - test_netlist_exporter_spice.cpp test_ee_item.cpp test_legacy_power_symbols.cpp test_pin_numbers.cpp @@ -91,10 +90,11 @@ set( QA_EESCHEMA_SRCS # Spice specific testing routine -if( KICAD_SPICE ) +if( KICAD_SPICE AND KICAD_SPICE_QA ) set( QA_EESCHEMA_SRCS ${QA_EESCHEMA_SRCS} # Simulation tests + test_netlist_exporter_spice.cpp sim/test_library_spice.cpp sim/test_sim_model_inference.cpp sim/test_sim_model_ngspice.cpp @@ -133,7 +133,7 @@ PRIVATE ${Boost_LIBRARIES} ) -if( KICAD_SPICE AND MSVC ) +if( KICAD_SPICE AND 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}" "$"