diff options
author | Brad King <brad.king@kitware.com> | 2013-02-05 21:10:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-02-07 16:09:56 (GMT) |
commit | 56ca8d4e6365d67901e0cff7f2bd99f174537a97 (patch) | |
tree | 17473ad1dd7b67c915b53a17b0bca243b500cc45 /Tests | |
parent | f36c665df80e8e3f4eca0fed28b5d1c3df739552 (diff) | |
download | CMake-56ca8d4e6365d67901e0cff7f2bd99f174537a97.zip CMake-56ca8d4e6365d67901e0cff7f2bd99f174537a97.tar.gz CMake-56ca8d4e6365d67901e0cff7f2bd99f174537a97.tar.bz2 |
Tests: Add generator toolset support
Propagate CMAKE_GENERATOR_TOOLSET through the test hierarchy so that all
tests can build with the selected generator toolset, if any.
Diffstat (limited to 'Tests')
44 files changed, 74 insertions, 13 deletions
diff --git a/Tests/CMakeBuildTest.cmake.in b/Tests/CMakeBuildTest.cmake.in index 195f107..0f7074b 100644 --- a/Tests/CMakeBuildTest.cmake.in +++ b/Tests/CMakeBuildTest.cmake.in @@ -12,6 +12,7 @@ message("running: ${CMAKE_COMMAND}") execute_process(COMMAND "${CMAKE_COMMAND}" "@CMAKE_BUILD_TEST_SOURCE_DIR@" "-G@CMAKE_TEST_GENERATOR@" + -T "@CMAKE_TEST_GENERATOR_TOOLSET@" WORKING_DIRECTORY "@CMAKE_BUILD_TEST_BINARY_DIR@" RESULT_VARIABLE RESULT) if(RESULT) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index e80917e..f8e4afd 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -54,6 +54,11 @@ if(BUILD_TESTING) --build-generator ${CMAKE_TEST_GENERATOR} --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} ) + if(CMAKE_TEST_GENERATOR_TOOLSET) + list(APPEND build_generator_args + --build-generator-toolset ${CMAKE_TEST_GENERATOR_TOOLSET} + ) + endif() add_subdirectory(CMakeLib) add_subdirectory(CMakeOnly) @@ -388,6 +393,7 @@ if(BUILD_TESTING) "${CMake_BINARY_DIR}/Tests/Simple_EclipseGenerator" --build-two-config --build-generator "Eclipse CDT4 - Unix Makefiles" + --build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}" --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} --build-project Simple --test-command Simple) @@ -402,6 +408,7 @@ if(BUILD_TESTING) "${CMake_BINARY_DIR}/Tests/Simple_CodeBlocksGenerator" --build-two-config --build-generator "CodeBlocks - Unix Makefiles" + --build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}" --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} --build-project Simple --test-command Simple) @@ -415,6 +422,7 @@ if(BUILD_TESTING) "${CMake_BINARY_DIR}/Tests/Simple_KDevelop3Generator" --build-two-config --build-generator "KDevelop3 - Unix Makefiles" + --build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}" --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} --build-project Simple --test-command Simple) @@ -1024,6 +1032,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ -DExternalProjectUpdate_SOURCE_DIR:PATH=${CMake_SOURCE_DIR}/Tests/ExternalProjectUpdate -DExternalProjectUpdate_BINARY_DIR:PATH=${CMake_BINARY_DIR}/Tests/ExternalProjectUpdate -DCMAKE_TEST_GENERATOR=${CMAKE_TEST_GENERATOR} + -DCMAKE_TEST_GENERATOR_TOOLSET=${CMAKE_TEST_GENERATOR_TOOLSET} -DCMAKE_TEST_MAKEPROGRAM=${CMAKE_TEST_MAKEPROGRAM} -DCMAKE_CTEST_COMMAND=${CMAKE_CTEST_COMMAND} -P ${CMake_SOURCE_DIR}/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake diff --git a/Tests/CMakeOnly/Test.cmake.in b/Tests/CMakeOnly/Test.cmake.in index f76db1d..a266415 100644 --- a/Tests/CMakeOnly/Test.cmake.in +++ b/Tests/CMakeOnly/Test.cmake.in @@ -9,6 +9,7 @@ file(MAKE_DIRECTORY "${binary_dir}") execute_process( COMMAND ${CMAKE_COMMAND} ${CMAKE_ARGS} "${source_dir}" -G "@CMAKE_TEST_GENERATOR@" + -T "@CMAKE_TEST_GENERATOR_TOOLSET@" WORKING_DIRECTORY "${binary_dir}" RESULT_VARIABLE result ) diff --git a/Tests/CTestConfig/dashboard.cmake.in b/Tests/CTestConfig/dashboard.cmake.in index c7ac210..0bba6d6 100644 --- a/Tests/CTestConfig/dashboard.cmake.in +++ b/Tests/CTestConfig/dashboard.cmake.in @@ -17,7 +17,10 @@ endif() message("cmake initial configure") execute_process(COMMAND ${CMAKE_COMMAND} - ${arg} -G "@CMAKE_TEST_GENERATOR@" ${CTEST_SOURCE_DIRECTORY} + ${arg} + -G "@CMAKE_TEST_GENERATOR@" + -T "@CMAKE_TEST_GENERATOR_TOOLSET@" + ${CTEST_SOURCE_DIRECTORY} WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY} RESULT_VARIABLE rv) if(NOT rv STREQUAL 0) diff --git a/Tests/CTestConfig/script.cmake.in b/Tests/CTestConfig/script.cmake.in index 5ceb7c3..83267a4 100644 --- a/Tests/CTestConfig/script.cmake.in +++ b/Tests/CTestConfig/script.cmake.in @@ -1,4 +1,5 @@ set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_PROJECT_NAME "CTestConfig") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestConfig") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestConfig/@cfg@-script") diff --git a/Tests/CTestTest/test.cmake.in b/Tests/CTestTest/test.cmake.in index d21dafa..214bff8 100644 --- a/Tests/CTestTest/test.cmake.in +++ b/Tests/CTestTest/test.cmake.in @@ -41,6 +41,7 @@ set (CTEST_INITIAL_CACHE " SITE:STRING=@SITE@ BUILDNAME:STRING=SmallAndFast-@BUILDNAME@ CMAKE_GENERATOR:INTERNAL=@CMAKE_GENERATOR@ +CMAKE_GENERATOR_TOOLSET:INTERNAL=@CMAKE_GENERATOR_TOOLSET@ CMAKE_CXX_FLAGS:STRING=@CMAKE_CXX_FLAGS@ CMAKE_C_FLAGS:STRING=@CMAKE_C_FLAGS@ CMAKE_C_COMPILER:STRING=@CMAKE_C_COMPILER@ diff --git a/Tests/CTestTest2/test.cmake.in b/Tests/CTestTest2/test.cmake.in index ec756dd..26a77a7 100644 --- a/Tests/CTestTest2/test.cmake.in +++ b/Tests/CTestTest2/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Source/kwsys") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTest2/kwsysBin") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@") set(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@") diff --git a/Tests/CTestTestBadExe/test.cmake.in b/Tests/CTestTestBadExe/test.cmake.in index 2421b13..03ebd04 100644 --- a/Tests/CTestTestBadExe/test.cmake.in +++ b/Tests/CTestTestBadExe/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestBadEx set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestBadExe") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestChecksum/test.cmake.in b/Tests/CTestTestChecksum/test.cmake.in index 6317500..efc53fb 100644 --- a/Tests/CTestTestChecksum/test.cmake.in +++ b/Tests/CTestTestChecksum/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestParal set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestParallel") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in b/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in index feaa5c3..42225d3 100644 --- a/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in +++ b/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestConfi set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestConfigFileInBuildDir1") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestConfigFileInBuildDir/test2.cmake.in b/Tests/CTestTestConfigFileInBuildDir/test2.cmake.in index f489114..010fe1c 100644 --- a/Tests/CTestTestConfigFileInBuildDir/test2.cmake.in +++ b/Tests/CTestTestConfigFileInBuildDir/test2.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestConfi set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestConfigFileInBuildDir2") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestCostSerial/test.cmake.in b/Tests/CTestTestCostSerial/test.cmake.in index 8661767..bfb3d9a 100644 --- a/Tests/CTestTestCostSerial/test.cmake.in +++ b/Tests/CTestTestCostSerial/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestCostS set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestCostSerial") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestCrash/test.cmake.in b/Tests/CTestTestCrash/test.cmake.in index 4e27bc2..492966c 100644 --- a/Tests/CTestTestCrash/test.cmake.in +++ b/Tests/CTestTestCrash/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestCrash set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestCrash") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestCycle/test.cmake.in b/Tests/CTestTestCycle/test.cmake.in index 22f3377..e9c9a4e 100644 --- a/Tests/CTestTestCycle/test.cmake.in +++ b/Tests/CTestTestCycle/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestCycle set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestCycle") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestDepends/test.cmake.in b/Tests/CTestTestDepends/test.cmake.in index 49fc443..002958b 100644 --- a/Tests/CTestTestDepends/test.cmake.in +++ b/Tests/CTestTestDepends/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestDepen set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestDepends") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestFailedSubmits/test.cmake.in b/Tests/CTestTestFailedSubmits/test.cmake.in index 3944006..36a09cf 100644 --- a/Tests/CTestTestFailedSubmits/test.cmake.in +++ b/Tests/CTestTestFailedSubmits/test.cmake.in @@ -21,6 +21,7 @@ set(CTEST_SOURCE_DIRECTORY "@source@") set(CTEST_BINARY_DIRECTORY "@build@") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestFailure/testNoBuild.cmake.in b/Tests/CTestTestFailure/testNoBuild.cmake.in index 6edd9dd..3c4d219 100644 --- a/Tests/CTestTestFailure/testNoBuild.cmake.in +++ b/Tests/CTestTestFailure/testNoBuild.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestFailu set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestFailure") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestFailure/testNoExe.cmake.in b/Tests/CTestTestFailure/testNoExe.cmake.in index f09594c..a133e2a 100644 --- a/Tests/CTestTestFailure/testNoExe.cmake.in +++ b/Tests/CTestTestFailure/testNoExe.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestFailu set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestFailure") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestMemcheck/DummyBC/test.cmake.in b/Tests/CTestTestMemcheck/DummyBC/test.cmake.in index 5005498..1b16433 100644 --- a/Tests/CTestTestMemcheck/DummyBC/test.cmake.in +++ b/Tests/CTestTestMemcheck/DummyBC/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/DummyBC") set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/DummyBC") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestMemcheck/DummyPurify/test.cmake.in b/Tests/CTestTestMemcheck/DummyPurify/test.cmake.in index 0df4f68..0c8795c 100644 --- a/Tests/CTestTestMemcheck/DummyPurify/test.cmake.in +++ b/Tests/CTestTestMemcheck/DummyPurify/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/DummyPurify" set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/DummyPurify") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestMemcheck/DummyValgrind/test.cmake.in b/Tests/CTestTestMemcheck/DummyValgrind/test.cmake.in index e341fed..c3941c1 100644 --- a/Tests/CTestTestMemcheck/DummyValgrind/test.cmake.in +++ b/Tests/CTestTestMemcheck/DummyValgrind/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/DummyValgrin set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/DummyValgrind") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestMemcheck/DummyValgrindFailPost/test.cmake.in b/Tests/CTestTestMemcheck/DummyValgrindFailPost/test.cmake.in index 7c1aa66..90e2ac5 100644 --- a/Tests/CTestTestMemcheck/DummyValgrindFailPost/test.cmake.in +++ b/Tests/CTestTestMemcheck/DummyValgrindFailPost/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/DummyValgrin set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/DummyValgrindFailPost") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestMemcheck/DummyValgrindFailPre/test.cmake.in b/Tests/CTestTestMemcheck/DummyValgrindFailPre/test.cmake.in index b2d7bb1..fd17f63 100644 --- a/Tests/CTestTestMemcheck/DummyValgrindFailPre/test.cmake.in +++ b/Tests/CTestTestMemcheck/DummyValgrindFailPre/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/DummyValgrin set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/DummyValgrindFailPre") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestMemcheck/DummyValgrindIgnoreMemcheck/test.cmake.in b/Tests/CTestTestMemcheck/DummyValgrindIgnoreMemcheck/test.cmake.in index 031a232..37aaaeb 100644 --- a/Tests/CTestTestMemcheck/DummyValgrindIgnoreMemcheck/test.cmake.in +++ b/Tests/CTestTestMemcheck/DummyValgrindIgnoreMemcheck/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/DummyValgrin set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/DummyValgrindIgnoreMemcheck") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestMemcheck/DummyValgrindPrePost/test.cmake.in b/Tests/CTestTestMemcheck/DummyValgrindPrePost/test.cmake.in index 44c416e..11f14a9 100644 --- a/Tests/CTestTestMemcheck/DummyValgrindPrePost/test.cmake.in +++ b/Tests/CTestTestMemcheck/DummyValgrindPrePost/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/DummyValgrin set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/DummyValgrindPrePost") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestMemcheck/NotExist/test.cmake.in b/Tests/CTestTestMemcheck/NotExist/test.cmake.in index 78db7e2..43f7542 100644 --- a/Tests/CTestTestMemcheck/NotExist/test.cmake.in +++ b/Tests/CTestTestMemcheck/NotExist/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/NotExist") set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/NotExist") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestMemcheck/Unknown/test.cmake.in b/Tests/CTestTestMemcheck/Unknown/test.cmake.in index c0b7839..0830bf0 100644 --- a/Tests/CTestTestMemcheck/Unknown/test.cmake.in +++ b/Tests/CTestTestMemcheck/Unknown/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/Unknown") set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/Unknown") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestMemcheck/UnknownQuoted/test.cmake.in b/Tests/CTestTestMemcheck/UnknownQuoted/test.cmake.in index e2bfb60..1b1f702 100644 --- a/Tests/CTestTestMemcheck/UnknownQuoted/test.cmake.in +++ b/Tests/CTestTestMemcheck/UnknownQuoted/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/UnknownQuote set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/UnknownQuoted") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestParallel/test.cmake.in b/Tests/CTestTestParallel/test.cmake.in index 0418755..a0d9fb3 100644 --- a/Tests/CTestTestParallel/test.cmake.in +++ b/Tests/CTestTestParallel/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestParal set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestParallel") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestResourceLock/test.cmake.in b/Tests/CTestTestResourceLock/test.cmake.in index 571cc50..1e7e344 100644 --- a/Tests/CTestTestResourceLock/test.cmake.in +++ b/Tests/CTestTestResourceLock/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestResou set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestResourceLock") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestScheduler/test.cmake.in b/Tests/CTestTestScheduler/test.cmake.in index 9115a61..8ad6137 100644 --- a/Tests/CTestTestScheduler/test.cmake.in +++ b/Tests/CTestTestScheduler/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestSched set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestScheduler") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestStopTime/test.cmake.in b/Tests/CTestTestStopTime/test.cmake.in index c3920a4..6804789 100644 --- a/Tests/CTestTestStopTime/test.cmake.in +++ b/Tests/CTestTestStopTime/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestStopT set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestStopTime") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestSubdir/test.cmake.in b/Tests/CTestTestSubdir/test.cmake.in index d1d87ad..526d453 100644 --- a/Tests/CTestTestSubdir/test.cmake.in +++ b/Tests/CTestTestSubdir/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestSubdi set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestSubdir") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestTimeout/test.cmake.in b/Tests/CTestTestTimeout/test.cmake.in index e34dc07..40241ff 100644 --- a/Tests/CTestTestTimeout/test.cmake.in +++ b/Tests/CTestTestTimeout/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestTimeo set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestTimeout") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestUpload/test.cmake.in b/Tests/CTestTestUpload/test.cmake.in index 2c0fc38..19abc89 100644 --- a/Tests/CTestTestUpload/test.cmake.in +++ b/Tests/CTestTestUpload/test.cmake.in @@ -8,6 +8,7 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-Upload") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestUpload") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestUpload") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") CTEST_START(Experimental) diff --git a/Tests/CTestTestZeroTimeout/test.cmake.in b/Tests/CTestTestZeroTimeout/test.cmake.in index 285a191..745e5bc 100644 --- a/Tests/CTestTestZeroTimeout/test.cmake.in +++ b/Tests/CTestTestZeroTimeout/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestZeroT set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestZeroTimeout") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/ExportImport/CMakeLists.txt b/Tests/ExportImport/CMakeLists.txt index cb2aebd..b8368fc 100644 --- a/Tests/ExportImport/CMakeLists.txt +++ b/Tests/ExportImport/CMakeLists.txt @@ -41,6 +41,7 @@ add_custom_command( --build-project Export --build-target install --build-generator ${CMAKE_GENERATOR} + --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-makeprogram ${CMAKE_MAKE_PROGRAM} --build-options -C${ExportImport_BINARY_DIR}/InitialCache.cmake VERBATIM @@ -62,6 +63,7 @@ add_custom_command( --build-noclean --build-project Import --build-generator ${CMAKE_GENERATOR} + --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-makeprogram ${CMAKE_MAKE_PROGRAM} --build-options -C${ExportImport_BINARY_DIR}/InitialCache.cmake VERBATIM diff --git a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake index 5a6af57..b6f848a 100644 --- a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake +++ b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake @@ -12,7 +12,7 @@ macro(check_a_tag desired_tag resulting_sha fetch_expected) # Configure execute_process(COMMAND ${CMAKE_COMMAND} - -G ${CMAKE_TEST_GENERATOR} + -G ${CMAKE_TEST_GENERATOR} -T "${CMAKE_TEST_GENERATOR_TOOLSET}" -DTEST_GIT_TAG:STRING=${desired_tag} ${ExternalProjectUpdate_SOURCE_DIR} WORKING_DIRECTORY ${ExternalProjectUpdate_BINARY_DIR} diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt index fdfe525..cda5fed 100644 --- a/Tests/Fortran/CMakeLists.txt +++ b/Tests/Fortran/CMakeLists.txt @@ -197,6 +197,7 @@ if(TEST_MODULE_DEPENDS) --build-two-config --build-project ExtFort --build-generator ${CMAKE_GENERATOR} + --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-makeprogram ${CMAKE_MAKE_PROGRAM} --build-options -DCMAKE_Fortran_COMPILER:STRING=${CMAKE_Fortran_COMPILER} -DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS} diff --git a/Tests/FortranC/Flags.cmake.in b/Tests/FortranC/Flags.cmake.in index 0b82f0e..3436309 100644 --- a/Tests/FortranC/Flags.cmake.in +++ b/Tests/FortranC/Flags.cmake.in @@ -15,6 +15,7 @@ set(COMMAND) execute_process( WORKING_DIRECTORY "${bld}" COMMAND ${CMAKE_COMMAND} "${src}" -G "@CMAKE_TEST_GENERATOR@" + -T "@CMAKE_TEST_GENERATOR_TOOLSET@" "-DFortranC_TEST_FLAGS=1" "-DCMAKE_C_COMPILER=${bld}/cc.sh" "-DCMAKE_C_FLAGS:STRING=@CMAKE_C_FLAGS@" diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index dd150a8..320ebcc 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -39,6 +39,7 @@ macro(add_RunCMake_test test) add_test(RunCMake.${test} ${CMAKE_CMAKE_COMMAND} -DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR} -DRunCMake_GENERATOR=${CMAKE_TEST_GENERATOR} + -DRunCMake_GENERATOR_TOOLSET=${CMAKE_TEST_GENERATOR_TOOLSET} -DRunCMake_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}/${test} -DRunCMake_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}/${test} ${${test}_ARGS} diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake index 007280a..09375d9 100644 --- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake @@ -1,17 +1,17 @@ include(RunCMake) +set(RunCMake_GENERATOR_TOOLSET "") run_cmake(NoToolset) if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01]|Xcode" AND NOT XCODE_BELOW_3) - set(RunCMake_TEST_OPTIONS -T "Test Toolset") + set(RunCMake_GENERATOR_TOOLSET "Test Toolset") run_cmake(TestToolset) - unset(RunCMake_TEST_OPTIONS) else() - set(RunCMake_TEST_OPTIONS -T "Bad Toolset") + set(RunCMake_GENERATOR_TOOLSET "Bad Toolset") run_cmake(BadToolset) - unset(RunCMake_TEST_OPTIONS) endif() -set(RunCMake_TEST_OPTIONS -T "Toolset 1" "-TToolset 2") +set(RunCMake_GENERATOR_TOOLSET "") +set(RunCMake_TEST_OPTIONS -T "Extra Toolset") run_cmake(TwoToolsets) unset(RunCMake_TEST_OPTIONS) diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index a43fee0..40b98d4 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -34,7 +34,9 @@ function(run_cmake test) endif() execute_process( COMMAND ${CMAKE_COMMAND} "${RunCMake_TEST_SOURCE_DIR}" - -G "${RunCMake_GENERATOR}" -DRunCMake_TEST=${test} + -G "${RunCMake_GENERATOR}" + -T "${RunCMake_GENERATOR_TOOLSET}" + -DRunCMake_TEST=${test} ${RunCMake_TEST_OPTIONS} WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}" OUTPUT_VARIABLE actual_stdout diff --git a/Tests/VSExternalInclude/CMakeLists.txt b/Tests/VSExternalInclude/CMakeLists.txt index 399ac69..5ce15e0 100644 --- a/Tests/VSExternalInclude/CMakeLists.txt +++ b/Tests/VSExternalInclude/CMakeLists.txt @@ -18,13 +18,21 @@ set(LIB2_BINARY_DIR ${VSExternalInclude_BINARY_DIR}/Lib2) make_directory("${LIB2_BINARY_DIR}") # generate lib1 -exec_program("${CMAKE_COMMAND}" "${LIB1_BINARY_DIR}" ARGS -G\"${CMAKE_GENERATOR}\" - \"${VSExternalInclude_SOURCE_DIR}/Lib1\" OUTPUT_VARIABLE OUT) +execute_process( + COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -T "${CMAKE_GENERATOR_TOOLSET}" "${VSExternalInclude_SOURCE_DIR}/Lib1" + WORKING_DIRECTORY ${LIB1_BINARY_DIR} + OUTPUT_VARIABLE OUT + ERROR_VARIABLE OUT + ) message("CMAKE Ran with the following output:\n\"${OUT}\"") # generate lib2 -exec_program("${CMAKE_COMMAND}" "${LIB2_BINARY_DIR}" ARGS -G\"${CMAKE_GENERATOR}\" - \"${VSExternalInclude_SOURCE_DIR}/Lib2\" OUTPUT_VARIABLE OUT) +execute_process( + COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -T "${CMAKE_GENERATOR_TOOLSET}" "${VSExternalInclude_SOURCE_DIR}/Lib2" + WORKING_DIRECTORY ${LIB2_BINARY_DIR} + OUTPUT_VARIABLE OUT + ERROR_VARIABLE OUT + ) message("CMAKE Ran with the following output:\n\"${OUT}\"") @@ -46,7 +54,7 @@ add_dependencies(VSExternalInclude lib2) # and the sln file can no longer be the only source # of that depend. So, for VS 10 make the executable # depend on lib1 and lib2 -if(MSVC10 OR MSVC11) +if(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[01]") add_dependencies(VSExternalInclude lib1) endif() |