From a7ae3bf6cd013ae1b4c2375744396adba1318479 Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 5 Jan 2022 15:41:33 +0000 Subject: [PATCH] Fix up linkage of Nasal tests inside CppUnit Ensure correct test backend is used inside fgfs_test_suite --- src/Main/CMakeLists.txt | 3 +++ src/Scripting/CMakeLists.txt | 4 +++- test_suite/FGTestApi/NasalUnitTesting_TestSuite.cxx | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Main/CMakeLists.txt b/src/Main/CMakeLists.txt index 308a19830..9ce5d8221 100644 --- a/src/Main/CMakeLists.txt +++ b/src/Main/CMakeLists.txt @@ -59,6 +59,9 @@ flightgear_component(Main "${SOURCES}" "${HEADERS}" sentryIntegration.cxx) # the main() function set(MAIN_SOURCE bootstrap.cxx + # we only want this file when building FGFS, so it can't be + # part of fgfsObjects + ${CMAKE_SOURCE_DIR}/src/Scripting/NasalUnitTesting.cxx ) # Set up the embedded resources. diff --git a/src/Scripting/CMakeLists.txt b/src/Scripting/CMakeLists.txt index 1c955acf0..3c2ec7959 100644 --- a/src/Scripting/CMakeLists.txt +++ b/src/Scripting/CMakeLists.txt @@ -13,8 +13,10 @@ set(SOURCES NasalString.cxx NasalModelData.cxx NasalSGPath.cxx - NasalUnitTesting.cxx NasalFlightPlan.cxx + # we don't add this here becuase we need to exclude it the testSuite + # so it can't go nto fgfsObjects library + # NasalUnitTesting.cxx ) set(HEADERS diff --git a/test_suite/FGTestApi/NasalUnitTesting_TestSuite.cxx b/test_suite/FGTestApi/NasalUnitTesting_TestSuite.cxx index 4471aa255..a721e93e8 100644 --- a/test_suite/FGTestApi/NasalUnitTesting_TestSuite.cxx +++ b/test_suite/FGTestApi/NasalUnitTesting_TestSuite.cxx @@ -124,3 +124,8 @@ naRef initNasalUnitTestCppUnit(naRef nasalGlobals, naContext c) return naNil(); } + +void shutdownNasalUnitTestInSim() +{ + // stub +} \ No newline at end of file