I have this CMakeList:
add_test(
NAME with_command_and_configuration
COMMAND ${CMAKE_COMMAND} --version
CONFIGURATIONS one another
)
Now I configure it. It results in different ctest code:
MINGW64 /c/Temp/ctest_configurations
$ cd default && rm -rf * && cmake ..; cd ..
-- Building for: Visual Studio 14 2015
-- Selecting Windows SDK version to target Windows 10.0.18363.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Temp/ctest_configurations/default
MINGW64 /c/Temp/ctest_configurations
$ cat default/CTestTestfile.cmake | grep with_command_and_configuration
MINGW64 /c/Temp/ctest_configurations
$ cd ninja && rm -rf * && cmake .. -G Ninja; cd ..
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Temp/ctest_configurations/ninja
MINGW64 /c/Temp/ctest_configurations
$ cat ninja/CTestTestfile.cmake | grep with_command_and_configuration
add_test(with_command_and_configuration "C:/ProgramData/chocolatey/lib/cmake.portable/tools/cmake-3.17.1-win64-x64/bin/cmake.exe" "--version")
set_tests_properties(with_command_and_configuration PROPERTIES _BACKTRACE_TRIPLES "C:/Temp/ctest_configurations/CMakeLists.txt;9;add_test;C:/Temp/ctest_configurations/CMakeLists.txt;0;")
Is this a bug? Or is this somehow correct and related to the Multi-Configuration nature of the VS Generator?
PS: full project and CTestTestfile.cmake in attachmentctest_configurations.zip (1.9 KB)
PPS: I found this in 3.10, but the logs are of:
MINGW64 /c/Temp/ctest_configurations
$ cmake --version
cmake version 3.17.1