summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-03 18:53:34 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-19 14:20:08 (GMT)
commit314613d1afd069dd896aa0d5112dfbf2b82af3c3 (patch)
treed6de6878803459df63b60c86e42c5a1faa6c8fc2 /Tests/RunCMake/CMakeLists.txt
parent358ceee5d84723f60c2db5cdff52445d478d6a42 (diff)
downloadCMake-314613d1afd069dd896aa0d5112dfbf2b82af3c3.zip
CMake-314613d1afd069dd896aa0d5112dfbf2b82af3c3.tar.gz
CMake-314613d1afd069dd896aa0d5112dfbf2b82af3c3.tar.bz2
Add infrastructure for generators to select a build tool instance
Add cache entry `CMAKE_GENERATOR_INSTANCE` to hold the instance location persistently across re-runs of CMake in a given build tree. For now we reject the option by default if explicitly set. It will be implemented on a per-generator basis. Pass the setting into try_compile project generation. Add a RunCMake.GeneratorInstance test to cover basic use cases for the option. Verify that `CMAKE_GENERATOR_INSTANCE` is empty by default, and that it is rejected when the generator does not support a user setting. Issue: #17268
Diffstat (limited to 'Tests/RunCMake/CMakeLists.txt')
-rw-r--r--Tests/RunCMake/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 7eafa06..b70aeb9 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -15,6 +15,7 @@ macro(add_RunCMake_test test)
add_test(NAME RunCMake.${test} COMMAND ${CMAKE_CMAKE_COMMAND}
-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR}
-DRunCMake_GENERATOR=${CMAKE_GENERATOR}
+ -DRunCMake_GENERATOR_INSTANCE=${CMAKE_GENERATOR_INSTANCE}
-DRunCMake_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
-DRunCMake_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET}
-DRunCMake_MAKE_PROGRAM=${CMake_TEST_EXPLICIT_MAKE_PROGRAM}
@@ -47,6 +48,7 @@ function(add_RunCMake_test_group test types)
-DTEST_TYPE=${type}
-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR}
-DRunCMake_GENERATOR=${CMAKE_GENERATOR}
+ -DRunCMake_GENERATOR_INSTANCE=${CMAKE_GENERATOR_INSTANCE}
-DRunCMake_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
-DRunCMake_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET}
-DRunCMake_MAKE_PROGRAM=${CMake_TEST_EXPLICIT_MAKE_PROGRAM}
@@ -146,6 +148,7 @@ if(NOT CMAKE_C_COMPILER_ID MATCHES "Watcom")
add_RunCMake_test(GenerateExportHeader)
endif()
add_RunCMake_test(GeneratorExpression)
+add_RunCMake_test(GeneratorInstance)
add_RunCMake_test(GeneratorPlatform)
add_RunCMake_test(GeneratorToolset)
add_RunCMake_test(GetPrerequisites)