From 09ab207c668deadea3635a20812fa2f478c17f9f Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 5 Sep 2014 15:40:01 -0400 Subject: [PATCH] Tests: Add generator platform support Propagate CMAKE_GENERATOR_PLATFORM through the test hierarchy so that all tests can build with the selected generator platform, if any. --- Tests/CMakeBuildTest.cmake.in | 1 + Tests/CMakeLists.txt | 15 +++++++++++++++ Tests/CMakeOnly/Test.cmake.in | 1 + Tests/CTestConfig/dashboard.cmake.in | 1 + Tests/CTestConfig/script.cmake.in | 1 + Tests/CTestTest/test.cmake.in | 1 + Tests/CTestTest2/test.cmake.in | 1 + Tests/CTestTestBadExe/test.cmake.in | 1 + Tests/CTestTestBadGenerator/test.cmake.in | 1 + Tests/CTestTestChecksum/test.cmake.in | 1 + .../CTestTestConfigFileInBuildDir/test1.cmake.in | 1 + .../CTestTestConfigFileInBuildDir/test2.cmake.in | 1 + Tests/CTestTestCostSerial/test.cmake.in | 1 + Tests/CTestTestCrash/test.cmake.in | 1 + Tests/CTestTestCycle/test.cmake.in | 1 + Tests/CTestTestDepends/test.cmake.in | 1 + Tests/CTestTestFailedSubmits/test.cmake.in | 1 + Tests/CTestTestFailure/testNoBuild.cmake.in | 1 + Tests/CTestTestFailure/testNoExe.cmake.in | 1 + Tests/CTestTestFdSetSize/test.cmake.in | 1 + Tests/CTestTestLaunchers/test.cmake.in | 1 + Tests/CTestTestMemcheck/test.cmake.in | 1 + Tests/CTestTestParallel/test.cmake.in | 1 + Tests/CTestTestResourceLock/test.cmake.in | 1 + Tests/CTestTestScheduler/test.cmake.in | 1 + Tests/CTestTestSkipReturnCode/test.cmake.in | 1 + Tests/CTestTestStopTime/test.cmake.in | 1 + Tests/CTestTestSubdir/test.cmake.in | 1 + Tests/CTestTestTimeout/test.cmake.in | 1 + Tests/CTestTestUpload/test.cmake.in | 1 + Tests/CTestTestZeroTimeout/test.cmake.in | 1 + Tests/ExportImport/CMakeLists.txt | 2 ++ .../ExternalProjectUpdateTest.cmake | 1 + Tests/Fortran/CMakeLists.txt | 1 + Tests/FortranC/Flags.cmake.in | 1 + Tests/MacRuntimePath/CMakeLists.txt | 2 ++ Tests/RunCMake/CMakeLists.txt | 1 + .../RunCMake/GeneratorPlatform/RunCMakeTest.cmake | 7 +++---- Tests/RunCMake/RunCMake.cmake | 1 + .../include_external_msproject/check_utils.cmake | 4 +++- Tests/StagingPrefix/CMakeLists.txt | 2 ++ Tests/VSExternalInclude/CMakeLists.txt | 8 ++++++-- 42 files changed, 68 insertions(+), 7 deletions(-) diff --git a/Tests/CMakeBuildTest.cmake.in b/Tests/CMakeBuildTest.cmake.in index aaefe43ac..f23f82040 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_GENERATOR@" + "-DCMAKE_GENERATOR_PLATFORM=@CMAKE_GENERATOR_PLATFORM@" -T "@CMAKE_GENERATOR_TOOLSET@" WORKING_DIRECTORY "@CMAKE_BUILD_TEST_BINARY_DIR@" RESULT_VARIABLE RESULT) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 7242a0029..0b4aef754 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -86,6 +86,11 @@ if(BUILD_TESTING) set(build_generator_args --build-generator ${CMAKE_GENERATOR} ) + if(CMAKE_GENERATOR_PLATFORM) + list(APPEND build_generator_args + --build-generator-platform ${CMAKE_GENERATOR_PLATFORM} + ) + endif() if(CMAKE_GENERATOR_TOOLSET) list(APPEND build_generator_args --build-generator-toolset ${CMAKE_GENERATOR_TOOLSET} @@ -508,6 +513,7 @@ if(BUILD_TESTING) "${CMake_BINARY_DIR}/Tests/Simple_EclipseGenerator" --build-two-config --build-generator "Eclipse CDT4 - Unix Makefiles" + --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}" --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-project Simple --build-options ${build_options} @@ -523,6 +529,7 @@ if(BUILD_TESTING) "${CMake_BINARY_DIR}/Tests/Simple_CodeBlocksGenerator" --build-two-config --build-generator "CodeBlocks - Unix Makefiles" + --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}" --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-project Simple --build-options ${build_options} @@ -537,6 +544,7 @@ if(BUILD_TESTING) "${CMake_BINARY_DIR}/Tests/Simple_KDevelop3Generator" --build-two-config --build-generator "KDevelop3 - Unix Makefiles" + --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}" --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-project Simple --build-options ${build_options} @@ -577,6 +585,7 @@ if(BUILD_TESTING) "${CMake_SOURCE_DIR}/Tests/SubProject/foo" "${CMake_BINARY_DIR}/Tests/SubProject/foo" --build-generator ${CMAKE_GENERATOR} + --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}" --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" ${SubProject-Stage2_BUILD_MAKEPROGRAM} --build-nocmake @@ -1288,6 +1297,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release -DExternalProjectUpdate_SOURCE_DIR:PATH=${CMake_SOURCE_DIR}/Tests/ExternalProjectUpdate -DExternalProjectUpdate_BINARY_DIR:PATH=${CMake_BINARY_DIR}/Tests/ExternalProjectUpdate -DCMAKE_GENERATOR=${CMAKE_GENERATOR} + -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} -DCMAKE_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET} -DCMAKE_CTEST_COMMAND=${CMAKE_CTEST_COMMAND} -P ${CMake_SOURCE_DIR}/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake @@ -1737,6 +1747,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release --build-two-config --build-generator ${CMAKE_GENERATOR} --build-makeprogram ${CMake_TEST_DEVENV} + --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}" --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-project VSExcludeFromDefaultBuild --test-command ${CMAKE_COMMAND} @@ -1761,6 +1772,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release "${CMake_BINARY_DIR}/Tests/VSProjectInSubdir" --build-two-config --build-generator ${CMAKE_GENERATOR} + --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}" --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-project VSProjectInSubdir --build-target test) @@ -1975,6 +1987,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release # A test for ctest_build() with targets in subdirectories set(ctest_configure_options) + if(CMAKE_GENERATOR_PLATFORM) + list(APPEND ctest_configure_options -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}) + endif() if(CMAKE_GENERATOR_TOOLSET) list(APPEND ctest_configure_options -T ${CMAKE_GENERATOR_TOOLSET}) endif() diff --git a/Tests/CMakeOnly/Test.cmake.in b/Tests/CMakeOnly/Test.cmake.in index 285643ae9..63c0d9e6f 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_GENERATOR@" + -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} -T "@CMAKE_GENERATOR_TOOLSET@" WORKING_DIRECTORY "${binary_dir}" RESULT_VARIABLE result diff --git a/Tests/CTestConfig/dashboard.cmake.in b/Tests/CTestConfig/dashboard.cmake.in index 608501ce8..cb017440d 100644 --- a/Tests/CTestConfig/dashboard.cmake.in +++ b/Tests/CTestConfig/dashboard.cmake.in @@ -19,6 +19,7 @@ message("cmake initial configure") execute_process(COMMAND ${CMAKE_COMMAND} ${arg} -G "@CMAKE_GENERATOR@" + -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} -T "@CMAKE_GENERATOR_TOOLSET@" ${CTEST_SOURCE_DIRECTORY} WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY} diff --git a/Tests/CTestConfig/script.cmake.in b/Tests/CTestConfig/script.cmake.in index 166de3bb2..b6ccedb57 100644 --- a/Tests/CTestConfig/script.cmake.in +++ b/Tests/CTestConfig/script.cmake.in @@ -1,4 +1,5 @@ set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_PROJECT_NAME "CTestConfig") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestConfig") diff --git a/Tests/CTestTest/test.cmake.in b/Tests/CTestTest/test.cmake.in index ab39b88ed..bb6346b8a 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_PLATFORM:INTERNAL=@CMAKE_GENERATOR_PLATFORM@ CMAKE_GENERATOR_TOOLSET:INTERNAL=@CMAKE_GENERATOR_TOOLSET@ CMAKE_CXX_FLAGS:STRING=@CMAKE_CXX_FLAGS@ CMAKE_C_FLAGS:STRING=@CMAKE_C_FLAGS@ diff --git a/Tests/CTestTest2/test.cmake.in b/Tests/CTestTest2/test.cmake.in index c5a7b45ca..852bb6b6c 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_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@") diff --git a/Tests/CTestTestBadExe/test.cmake.in b/Tests/CTestTestBadExe/test.cmake.in index 601aab4d7..43a85725b 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestBadGenerator/test.cmake.in b/Tests/CTestTestBadGenerator/test.cmake.in index fe4fba82a..ae6d0b578 100644 --- a/Tests/CTestTestBadGenerator/test.cmake.in +++ b/Tests/CTestTestBadGenerator/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestBadGe set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestBadGenerator") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "Bad Generator") +set(CTEST_CMAKE_GENERATOR_PLATFORM "") set(CTEST_CMAKE_GENERATOR_TOOLSET "") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestChecksum/test.cmake.in b/Tests/CTestTestChecksum/test.cmake.in index 84134430e..32d62bb34 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in b/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in index d3510bb96..6d29af7ae 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestConfigFileInBuildDir/test2.cmake.in b/Tests/CTestTestConfigFileInBuildDir/test2.cmake.in index 99b002caa..fb298d471 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestCostSerial/test.cmake.in b/Tests/CTestTestCostSerial/test.cmake.in index ce8720c1c..9b32a468b 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestCrash/test.cmake.in b/Tests/CTestTestCrash/test.cmake.in index 5906d12f9..3641cb01f 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestCycle/test.cmake.in b/Tests/CTestTestCycle/test.cmake.in index 478badbf1..4a63dd612 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestDepends/test.cmake.in b/Tests/CTestTestDepends/test.cmake.in index a7de8ccb4..74fddb3d3 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestFailedSubmits/test.cmake.in b/Tests/CTestTestFailedSubmits/test.cmake.in index 36a09cf61..5ff836fee 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_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestFailure/testNoBuild.cmake.in b/Tests/CTestTestFailure/testNoBuild.cmake.in index 143daf8ac..86333af4a 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestFailure/testNoExe.cmake.in b/Tests/CTestTestFailure/testNoExe.cmake.in index 11a193015..8875cee36 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestFdSetSize/test.cmake.in b/Tests/CTestTestFdSetSize/test.cmake.in index fbe0e828d..bfe445925 100644 --- a/Tests/CTestTestFdSetSize/test.cmake.in +++ b/Tests/CTestTestFdSetSize/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestFdSet set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestFdSetSize") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestLaunchers/test.cmake.in b/Tests/CTestTestLaunchers/test.cmake.in index 43a653359..03a118a40 100644 --- a/Tests/CTestTestLaunchers/test.cmake.in +++ b/Tests/CTestTestLaunchers/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_BUILD_NAME "Launchers-@BUILDNAME@-CTestTestLauncher set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_SOURCE}/launcher_test_project") set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/launcher_test_project-bin") set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestMemcheck/test.cmake.in b/Tests/CTestTestMemcheck/test.cmake.in index 87195c5de..f2ffd06b7 100644 --- a/Tests/CTestTestMemcheck/test.cmake.in +++ b/Tests/CTestTestMemcheck/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/@SUBTEST_NAM set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/@SUBTEST_NAME@") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestParallel/test.cmake.in b/Tests/CTestTestParallel/test.cmake.in index 48631caef..045a4ca06 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestResourceLock/test.cmake.in b/Tests/CTestTestResourceLock/test.cmake.in index 6ec6dfe42..67dde1803 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestScheduler/test.cmake.in b/Tests/CTestTestScheduler/test.cmake.in index 06ba33e76..f8c8ab747 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestSkipReturnCode/test.cmake.in b/Tests/CTestTestSkipReturnCode/test.cmake.in index d3c44f5c6..112b0cd0f 100644 --- a/Tests/CTestTestSkipReturnCode/test.cmake.in +++ b/Tests/CTestTestSkipReturnCode/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestSkipR set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestSkipReturnCode") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestStopTime/test.cmake.in b/Tests/CTestTestStopTime/test.cmake.in index 8adf94198..d3a9a4a92 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestSubdir/test.cmake.in b/Tests/CTestTestSubdir/test.cmake.in index 5a6caf1c3..8b3957b4e 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestTimeout/test.cmake.in b/Tests/CTestTestTimeout/test.cmake.in index af533832a..4b5157ef0 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/CTestTestUpload/test.cmake.in b/Tests/CTestTestUpload/test.cmake.in index bb6ba25a2..701439d37 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") diff --git a/Tests/CTestTestZeroTimeout/test.cmake.in b/Tests/CTestTestZeroTimeout/test.cmake.in index beb6d9085..b829fefe2 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_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") diff --git a/Tests/ExportImport/CMakeLists.txt b/Tests/ExportImport/CMakeLists.txt index a6f892182..eaad3d46c 100644 --- a/Tests/ExportImport/CMakeLists.txt +++ b/Tests/ExportImport/CMakeLists.txt @@ -44,6 +44,7 @@ add_custom_command( --build-project Export --build-target install --build-generator ${CMAKE_GENERATOR} + --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}" --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-options -C${ExportImport_BINARY_DIR}/InitialCache.cmake VERBATIM @@ -65,6 +66,7 @@ add_custom_command( --build-noclean --build-project Import --build-generator ${CMAKE_GENERATOR} + --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}" --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-options -C${ExportImport_BINARY_DIR}/InitialCache.cmake VERBATIM diff --git a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake index ea59a8ea8..51e768e6c 100644 --- a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake +++ b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake @@ -13,6 +13,7 @@ macro(check_a_tag desired_tag resulting_sha fetch_expected) # Configure execute_process(COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR} -T "${CMAKE_GENERATOR_TOOLSET}" + -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} -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 ef3b31772..1982a6025 100644 --- a/Tests/Fortran/CMakeLists.txt +++ b/Tests/Fortran/CMakeLists.txt @@ -201,6 +201,7 @@ if(TEST_MODULE_DEPENDS) --build-two-config --build-project ExtFort --build-generator ${CMAKE_GENERATOR} + --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}" --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --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 28c38e400..9504fecaf 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_GENERATOR@" + "-DCMAKE_GENERATOR_PLATFORM=@CMAKE_GENERATOR_PLATFORM@" -T "@CMAKE_GENERATOR_TOOLSET@" "-DFortranC_TEST_FLAGS=1" "-DCMAKE_C_COMPILER=${bld}/cc.sh" diff --git a/Tests/MacRuntimePath/CMakeLists.txt b/Tests/MacRuntimePath/CMakeLists.txt index eeb3653b6..3e9ab8a55 100644 --- a/Tests/MacRuntimePath/CMakeLists.txt +++ b/Tests/MacRuntimePath/CMakeLists.txt @@ -39,6 +39,7 @@ add_custom_command( --build-project MacRuntimePath_A --build-target install --build-generator ${CMAKE_GENERATOR} + --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}" --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-options -C${MacRuntimePath_BINARY_DIR}/InitialCache.cmake VERBATIM @@ -60,6 +61,7 @@ add_custom_command( --build-noclean --build-project MacRuntimePath_B --build-generator ${CMAKE_GENERATOR} + --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}" --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-options -C${MacRuntimePath_BINARY_DIR}/InitialCache.cmake VERBATIM diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index d52a2b640..6735fe2d4 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -4,6 +4,7 @@ macro(add_RunCMake_test test) add_test(RunCMake.${test} ${CMAKE_CMAKE_COMMAND} -DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR} -DRunCMake_GENERATOR=${CMAKE_GENERATOR} + -DRunCMake_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} -DRunCMake_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET} -DRunCMake_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}/${test} -DRunCMake_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}/${test} diff --git a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake index 442eb9f9a..89cc712d0 100644 --- a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake @@ -1,13 +1,12 @@ include(RunCMake) +set(RunCMake_GENERATOR_PLATFORM "") run_cmake(NoPlatform) if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[0124])( 20[0-9][0-9])?$") - set(RunCMake_TEST_OPTIONS "-DCMAKE_GENERATOR_PLATFORM=x64") + set(RunCMake_GENERATOR_PLATFORM "x64") run_cmake(x64Platform) - unset(RunCMake_TEST_OPTIONS) else() - set(RunCMake_TEST_OPTIONS "-DCMAKE_GENERATOR_PLATFORM=Bad Platform") + set(RunCMake_GENERATOR_PLATFORM "Bad Platform") run_cmake(BadPlatform) - unset(RunCMake_TEST_OPTIONS) endif() diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 202035601..abc3e3ddd 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -53,6 +53,7 @@ function(run_cmake test) execute_process( COMMAND ${CMAKE_COMMAND} "${RunCMake_TEST_SOURCE_DIR}" -G "${RunCMake_GENERATOR}" + "-DCMAKE_GENERATOR_PLATFORM=${RunCMake_GENERATOR_PLATFORM}" -T "${RunCMake_GENERATOR_TOOLSET}" -DRunCMake_TEST=${test} --no-warn-unused-cli diff --git a/Tests/RunCMake/include_external_msproject/check_utils.cmake b/Tests/RunCMake/include_external_msproject/check_utils.cmake index 7f5ef5394..408cadb78 100644 --- a/Tests/RunCMake/include_external_msproject/check_utils.cmake +++ b/Tests/RunCMake/include_external_msproject/check_utils.cmake @@ -80,7 +80,9 @@ function(check_project test name guid type platform) set(type 8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942) endif() if(NOT platform) - if("${RunCMake_GENERATOR}" MATCHES "Win64") + if(RunCMake_GENERATOR_PLATFORM) + set(platform "${RunCMake_GENERATOR_PLATFORM}") + elseif("${RunCMake_GENERATOR}" MATCHES "Win64") set(platform "x64") else() set(platform "Win32") diff --git a/Tests/StagingPrefix/CMakeLists.txt b/Tests/StagingPrefix/CMakeLists.txt index 922776d70..49ff7fee7 100644 --- a/Tests/StagingPrefix/CMakeLists.txt +++ b/Tests/StagingPrefix/CMakeLists.txt @@ -38,6 +38,7 @@ add_custom_command( --build-project Producer --build-target install --build-generator ${CMAKE_GENERATOR} + --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}" --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-options -DCMAKE_VERBOSE_MAKEFILE=1 @@ -71,6 +72,7 @@ add_custom_command( --build-project Consumer --build-target install --build-generator ${CMAKE_GENERATOR} + --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}" --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-options "-DCMAKE_FIND_ROOT_PATH=${CMAKE_BINARY_DIR}/ignored" diff --git a/Tests/VSExternalInclude/CMakeLists.txt b/Tests/VSExternalInclude/CMakeLists.txt index cfcccecf6..37dd4f274 100644 --- a/Tests/VSExternalInclude/CMakeLists.txt +++ b/Tests/VSExternalInclude/CMakeLists.txt @@ -19,7 +19,9 @@ make_directory("${LIB2_BINARY_DIR}") # generate lib1 execute_process( - COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -T "${CMAKE_GENERATOR_TOOLSET}" "${VSExternalInclude_SOURCE_DIR}/Lib1" + COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" + -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} + -T "${CMAKE_GENERATOR_TOOLSET}" "${VSExternalInclude_SOURCE_DIR}/Lib1" WORKING_DIRECTORY ${LIB1_BINARY_DIR} OUTPUT_VARIABLE OUT ERROR_VARIABLE OUT @@ -28,7 +30,9 @@ message("CMAKE Ran with the following output:\n\"${OUT}\"") # generate lib2 execute_process( - COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -T "${CMAKE_GENERATOR_TOOLSET}" "${VSExternalInclude_SOURCE_DIR}/Lib2" + COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" + -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} + -T "${CMAKE_GENERATOR_TOOLSET}" "${VSExternalInclude_SOURCE_DIR}/Lib2" WORKING_DIRECTORY ${LIB2_BINARY_DIR} OUTPUT_VARIABLE OUT ERROR_VARIABLE OUT