From d506fee81ca8fca7fe0c91da4bd4a3551d210b06 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 12 Sep 2014 10:38:32 -0400 Subject: [PATCH] Tests: Use -A option to pass generator platform selection This is less verbose than defining CMAKE_GENERATOR_PLATFORM. --- Tests/CMakeBuildTest.cmake.in | 2 +- Tests/CMakeLists.txt | 2 +- Tests/CMakeOnly/Test.cmake.in | 2 +- Tests/CTestConfig/dashboard.cmake.in | 2 +- Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake | 2 +- Tests/FortranC/Flags.cmake.in | 2 +- Tests/VSExternalInclude/CMakeLists.txt | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Tests/CMakeBuildTest.cmake.in b/Tests/CMakeBuildTest.cmake.in index f23f82040..71bcb183e 100644 --- a/Tests/CMakeBuildTest.cmake.in +++ b/Tests/CMakeBuildTest.cmake.in @@ -12,7 +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@" + -A "@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 0b4aef754..98e2e7620 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1988,7 +1988,7 @@ ${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}) + list(APPEND ctest_configure_options -A ${CMAKE_GENERATOR_PLATFORM}) endif() if(CMAKE_GENERATOR_TOOLSET) list(APPEND ctest_configure_options -T ${CMAKE_GENERATOR_TOOLSET}) diff --git a/Tests/CMakeOnly/Test.cmake.in b/Tests/CMakeOnly/Test.cmake.in index 63c0d9e6f..8d3258b9d 100644 --- a/Tests/CMakeOnly/Test.cmake.in +++ b/Tests/CMakeOnly/Test.cmake.in @@ -9,7 +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} + -A "@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 cb017440d..143fe717a 100644 --- a/Tests/CTestConfig/dashboard.cmake.in +++ b/Tests/CTestConfig/dashboard.cmake.in @@ -19,7 +19,7 @@ message("cmake initial configure") execute_process(COMMAND ${CMAKE_COMMAND} ${arg} -G "@CMAKE_GENERATOR@" - -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} + -A "@CMAKE_GENERATOR_PLATFORM@" -T "@CMAKE_GENERATOR_TOOLSET@" ${CTEST_SOURCE_DIRECTORY} WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY} diff --git a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake index 51e768e6c..6c7bcfe40 100644 --- a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake +++ b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake @@ -13,7 +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} + -A "${CMAKE_GENERATOR_PLATFORM}" -DTEST_GIT_TAG:STRING=${desired_tag} ${ExternalProjectUpdate_SOURCE_DIR} WORKING_DIRECTORY ${ExternalProjectUpdate_BINARY_DIR} diff --git a/Tests/FortranC/Flags.cmake.in b/Tests/FortranC/Flags.cmake.in index 9504fecaf..2300fc61f 100644 --- a/Tests/FortranC/Flags.cmake.in +++ b/Tests/FortranC/Flags.cmake.in @@ -15,7 +15,7 @@ set(COMMAND) execute_process( WORKING_DIRECTORY "${bld}" COMMAND ${CMAKE_COMMAND} "${src}" -G "@CMAKE_GENERATOR@" - "-DCMAKE_GENERATOR_PLATFORM=@CMAKE_GENERATOR_PLATFORM@" + -A "@CMAKE_GENERATOR_PLATFORM@" -T "@CMAKE_GENERATOR_TOOLSET@" "-DFortranC_TEST_FLAGS=1" "-DCMAKE_C_COMPILER=${bld}/cc.sh" diff --git a/Tests/VSExternalInclude/CMakeLists.txt b/Tests/VSExternalInclude/CMakeLists.txt index 37dd4f274..73ea05a29 100644 --- a/Tests/VSExternalInclude/CMakeLists.txt +++ b/Tests/VSExternalInclude/CMakeLists.txt @@ -20,7 +20,7 @@ make_directory("${LIB2_BINARY_DIR}") # generate lib1 execute_process( COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" - -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} + -A "${CMAKE_GENERATOR_PLATFORM}" -T "${CMAKE_GENERATOR_TOOLSET}" "${VSExternalInclude_SOURCE_DIR}/Lib1" WORKING_DIRECTORY ${LIB1_BINARY_DIR} OUTPUT_VARIABLE OUT @@ -31,7 +31,7 @@ message("CMAKE Ran with the following output:\n\"${OUT}\"") # generate lib2 execute_process( COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" - -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} + -A "${CMAKE_GENERATOR_PLATFORM}" -T "${CMAKE_GENERATOR_TOOLSET}" "${VSExternalInclude_SOURCE_DIR}/Lib2" WORKING_DIRECTORY ${LIB2_BINARY_DIR} OUTPUT_VARIABLE OUT