Tests: Configure RunCMake.install cases with correct build type

The run_install_test() function would build and install with the
configuration hard-coded to Debug, but the configuration step
did not specify any configuration. This resulted in a "no config"
configuration, and the install step then wouldn't install the Debug
export files. This would only be a problem if using a single config
CMake generator, and it appears none of the existing tests relied
on actually installing the config-specific export file.
This commit is contained in:
Craig Scott 2024-09-17 20:29:10 +10:00
parent 5a8a6dfe81
commit 2184fcfb00
No known key found for this signature in database
GPG Key ID: 6FF37CBDCCADED9F

View File

@ -7,7 +7,9 @@ function(run_install_test case)
set(RunCMake_TEST_NO_CLEAN 1)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
set(RunCMake_TEST_RAW_ARGS -DCMAKE_BUILD_TYPE:STRING=Debug)
run_cmake(${case})
unset(RunCMake_TEST_RAW_ARGS)
set(RunCMake_TEST_OUTPUT_MERGE 1)
run_cmake_command(${case}-build ${CMAKE_COMMAND} --build . --config Debug)
unset(RunCMake_TEST_OUTPUT_MERGE)