TestSuite: CMake fix for variables missing from the parent scope.
The test suite CMake target variables have been shifted back into test_suite/CMakeLists.txt. These are now correctly constructed and placed into the parent scope where the test_suite target now resides.
This commit is contained in:
parent
847275e65a
commit
3d13c16973
2 changed files with 24 additions and 13 deletions
|
@ -612,19 +612,6 @@ ADD_CUSTOM_TARGET(uninstall
|
|||
enable_testing()
|
||||
add_subdirectory(test_suite EXCLUDE_FROM_ALL)
|
||||
|
||||
if(ENABLE_AUTOTESTING)
|
||||
set(TEST_SUITE_COMMENT "Running the full FlightGear test suite.")
|
||||
if(WIN32)
|
||||
set(TEST_SUITE_COMMAND "run_test_suite.exe")
|
||||
set(TEST_SUITE_WORKING_DIRECTORY "${TESTSUITE_OUTPUT_DIR}/${CMAKE_BUILD_TYPE}")
|
||||
else()
|
||||
set(TEST_SUITE_COMMAND "run_test_suite")
|
||||
set(TEST_SUITE_WORKING_DIRECTORY "${TESTSUITE_OUTPUT_DIR}")
|
||||
endif(WIN32)
|
||||
else()
|
||||
set(TEST_SUITE_COMMENT "Building the FlightGear test suite.")
|
||||
endif(ENABLE_AUTOTESTING)
|
||||
|
||||
add_custom_target(test_suite
|
||||
${TEST_SUITE_COMMAND}
|
||||
DEPENDS run_test_suite
|
||||
|
|
|
@ -126,6 +126,30 @@ set_target_properties(run_test_suite
|
|||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${TESTSUITE_OUTPUT_DIR}"
|
||||
)
|
||||
if(ENABLE_AUTOTESTING)
|
||||
if(WIN32)
|
||||
set(TEST_SUITE_COMMAND "run_test_suite.exe")
|
||||
set(TEST_SUITE_WORKING_DIRECTORY "${TESTSUITE_OUTPUT_DIR}/${CMAKE_BUILD_TYPE}")
|
||||
else()
|
||||
set(TEST_SUITE_COMMAND "run_test_suite")
|
||||
set(TEST_SUITE_WORKING_DIRECTORY "${TESTSUITE_OUTPUT_DIR}")
|
||||
endif(WIN32)
|
||||
set(TEST_SUITE_COMMENT "Running the full FlightGear test suite: ${TEST_SUITE_WORKING_DIRECTORY}/${TEST_SUITE_COMMAND}")
|
||||
else()
|
||||
set(TEST_SUITE_COMMENT "Building the FlightGear test suite.")
|
||||
endif(ENABLE_AUTOTESTING)
|
||||
set(TEST_SUITE_COMMAND
|
||||
${TEST_SUITE_COMMAND}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
set(TEST_SUITE_WORKING_DIRECTORY
|
||||
${TEST_SUITE_WORKING_DIRECTORY}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
set(TEST_SUITE_COMMENT
|
||||
${TEST_SUITE_COMMENT}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
# Set up the target links.
|
||||
setup_fgfs_libraries(run_test_suite)
|
||||
|
|
Loading…
Reference in a new issue