Browse Source

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.
Craig Scott 1 year ago
parent
commit
2184fcfb00
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Tests/RunCMake/install/RunCMakeTest.cmake

+ 2 - 0
Tests/RunCMake/install/RunCMakeTest.cmake

@@ -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)