Tests: Use -A option to pass generator platform selection

This is less verbose than defining CMAKE_GENERATOR_PLATFORM.
This commit is contained in:
Brad King 2014-09-12 10:38:32 -04:00
parent 11c9ddd694
commit d506fee81c
7 changed files with 8 additions and 8 deletions

View File

@ -12,7 +12,7 @@ message("running: ${CMAKE_COMMAND}")
execute_process(COMMAND "${CMAKE_COMMAND}" execute_process(COMMAND "${CMAKE_COMMAND}"
"@CMAKE_BUILD_TEST_SOURCE_DIR@" "@CMAKE_BUILD_TEST_SOURCE_DIR@"
"-G@CMAKE_GENERATOR@" "-G@CMAKE_GENERATOR@"
"-DCMAKE_GENERATOR_PLATFORM=@CMAKE_GENERATOR_PLATFORM@" -A "@CMAKE_GENERATOR_PLATFORM@"
-T "@CMAKE_GENERATOR_TOOLSET@" -T "@CMAKE_GENERATOR_TOOLSET@"
WORKING_DIRECTORY "@CMAKE_BUILD_TEST_BINARY_DIR@" WORKING_DIRECTORY "@CMAKE_BUILD_TEST_BINARY_DIR@"
RESULT_VARIABLE RESULT) RESULT_VARIABLE RESULT)

View File

@ -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 # A test for ctest_build() with targets in subdirectories
set(ctest_configure_options) set(ctest_configure_options)
if(CMAKE_GENERATOR_PLATFORM) 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() endif()
if(CMAKE_GENERATOR_TOOLSET) if(CMAKE_GENERATOR_TOOLSET)
list(APPEND ctest_configure_options -T ${CMAKE_GENERATOR_TOOLSET}) list(APPEND ctest_configure_options -T ${CMAKE_GENERATOR_TOOLSET})

View File

@ -9,7 +9,7 @@ file(MAKE_DIRECTORY "${binary_dir}")
execute_process( execute_process(
COMMAND ${CMAKE_COMMAND} ${CMAKE_ARGS} COMMAND ${CMAKE_COMMAND} ${CMAKE_ARGS}
"${source_dir}" -G "@CMAKE_GENERATOR@" "${source_dir}" -G "@CMAKE_GENERATOR@"
-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} -A "@CMAKE_GENERATOR_PLATFORM@"
-T "@CMAKE_GENERATOR_TOOLSET@" -T "@CMAKE_GENERATOR_TOOLSET@"
WORKING_DIRECTORY "${binary_dir}" WORKING_DIRECTORY "${binary_dir}"
RESULT_VARIABLE result RESULT_VARIABLE result

View File

@ -19,7 +19,7 @@ message("cmake initial configure")
execute_process(COMMAND ${CMAKE_COMMAND} execute_process(COMMAND ${CMAKE_COMMAND}
${arg} ${arg}
-G "@CMAKE_GENERATOR@" -G "@CMAKE_GENERATOR@"
-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} -A "@CMAKE_GENERATOR_PLATFORM@"
-T "@CMAKE_GENERATOR_TOOLSET@" -T "@CMAKE_GENERATOR_TOOLSET@"
${CTEST_SOURCE_DIRECTORY} ${CTEST_SOURCE_DIRECTORY}
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY} WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}

View File

@ -13,7 +13,7 @@ macro(check_a_tag desired_tag resulting_sha fetch_expected)
# Configure # Configure
execute_process(COMMAND ${CMAKE_COMMAND} execute_process(COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR} -T "${CMAKE_GENERATOR_TOOLSET}" -G ${CMAKE_GENERATOR} -T "${CMAKE_GENERATOR_TOOLSET}"
-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} -A "${CMAKE_GENERATOR_PLATFORM}"
-DTEST_GIT_TAG:STRING=${desired_tag} -DTEST_GIT_TAG:STRING=${desired_tag}
${ExternalProjectUpdate_SOURCE_DIR} ${ExternalProjectUpdate_SOURCE_DIR}
WORKING_DIRECTORY ${ExternalProjectUpdate_BINARY_DIR} WORKING_DIRECTORY ${ExternalProjectUpdate_BINARY_DIR}

View File

@ -15,7 +15,7 @@ set(COMMAND)
execute_process( execute_process(
WORKING_DIRECTORY "${bld}" WORKING_DIRECTORY "${bld}"
COMMAND ${CMAKE_COMMAND} "${src}" -G "@CMAKE_GENERATOR@" COMMAND ${CMAKE_COMMAND} "${src}" -G "@CMAKE_GENERATOR@"
"-DCMAKE_GENERATOR_PLATFORM=@CMAKE_GENERATOR_PLATFORM@" -A "@CMAKE_GENERATOR_PLATFORM@"
-T "@CMAKE_GENERATOR_TOOLSET@" -T "@CMAKE_GENERATOR_TOOLSET@"
"-DFortranC_TEST_FLAGS=1" "-DFortranC_TEST_FLAGS=1"
"-DCMAKE_C_COMPILER=${bld}/cc.sh" "-DCMAKE_C_COMPILER=${bld}/cc.sh"

View File

@ -20,7 +20,7 @@ make_directory("${LIB2_BINARY_DIR}")
# generate lib1 # generate lib1
execute_process( execute_process(
COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} -A "${CMAKE_GENERATOR_PLATFORM}"
-T "${CMAKE_GENERATOR_TOOLSET}" "${VSExternalInclude_SOURCE_DIR}/Lib1" -T "${CMAKE_GENERATOR_TOOLSET}" "${VSExternalInclude_SOURCE_DIR}/Lib1"
WORKING_DIRECTORY ${LIB1_BINARY_DIR} WORKING_DIRECTORY ${LIB1_BINARY_DIR}
OUTPUT_VARIABLE OUT OUTPUT_VARIABLE OUT
@ -31,7 +31,7 @@ message("CMAKE Ran with the following output:\n\"${OUT}\"")
# generate lib2 # generate lib2
execute_process( execute_process(
COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} -A "${CMAKE_GENERATOR_PLATFORM}"
-T "${CMAKE_GENERATOR_TOOLSET}" "${VSExternalInclude_SOURCE_DIR}/Lib2" -T "${CMAKE_GENERATOR_TOOLSET}" "${VSExternalInclude_SOURCE_DIR}/Lib2"
WORKING_DIRECTORY ${LIB2_BINARY_DIR} WORKING_DIRECTORY ${LIB2_BINARY_DIR}
OUTPUT_VARIABLE OUT OUTPUT_VARIABLE OUT