summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt6
-rw-r--r--Tests/CommandLineTest/CMakeLists.txt68
-rw-r--r--Tests/Complex/CMakeLists.txt6
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt6
-rw-r--r--Tests/ExternalOBJ/CMakeLists.txt2
-rw-r--r--Tests/ExternalOBJ/Object/CMakeLists.txt2
6 files changed, 45 insertions, 45 deletions
diff --git a/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt b/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt
index e6ed559..0f3bd4c 100644
--- a/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt
@@ -20,7 +20,7 @@ macro(TEST_PASS value msg)
endmacro()
if(CMAKE_COMPILER_IS_GNUCXX)
- exec_program(${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE _gcc_version_info)
+ execute_process(COMMAND ${CMAKE_C_COMPILER} --version OUTPUT_VARIABLE _gcc_version_info)
string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
# patch level, handle this here:
@@ -30,12 +30,12 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES Clang)
- exec_program(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE _clang_version_info)
+ execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE _clang_version_info)
string (REGEX REPLACE ".*version ([0-9]\\.[0-9]).*" "\\1" _clang_version "${_clang_version_info}")
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES Intel)
- exec_program(${CMAKE_CXX_COMPILER} ARGS -V OUTPUT_VARIABLE _intel_version_info)
+ execute_process(COMMAND ${CMAKE_CXX_COMPILER} -V OUTPUT_VARIABLE _intel_version_info)
string (REGEX REPLACE ".*Version ([0-9]+(\\.[0-9]+)+).*" "\\1" _intel_version "${_intel_version_info}")
endif()
diff --git a/Tests/CommandLineTest/CMakeLists.txt b/Tests/CommandLineTest/CMakeLists.txt
index 96aac10..a44fb39 100644
--- a/Tests/CommandLineTest/CMakeLists.txt
+++ b/Tests/CommandLineTest/CMakeLists.txt
@@ -2,58 +2,58 @@ cmake_minimum_required (VERSION 2.6)
project(CommandLineTest)
get_filename_component(CMAKE_BIN_DIR ${CMAKE_COMMAND} PATH)
-macro(EXEC_CMAKE_COMMAND CMAKE_ARGS)
- exec_program("${CMAKE_COMMAND}" ARGS "${CMAKE_ARGS}" RETURN_VALUE RET)
+macro(EXEC_CMAKE_COMMAND)
+ execute_process(COMMAND "${CMAKE_COMMAND}" ${ARGN} RESULT_VARIABLE RET)
if(${RET})
- message(SEND_ERROR "CMake command failed with arguments \"${CMAKE_ARGS}\"")
+ message(SEND_ERROR "CMake command failed with arguments \"${ARGN}\"")
endif()
endmacro()
-EXEC_CMAKE_COMMAND("-E chdir \"${CMAKE_CURRENT_SOURCE_DIR}\" \"${CMAKE_COMMAND}\" -E echo \"Hello World\"")
-EXEC_CMAKE_COMMAND("-E time \"${CMAKE_COMMAND} -N -L ${CommandLineTest_SOURCE_DIR}\"")
-EXEC_CMAKE_COMMAND("-E time \"${CMAKE_COMMAND} -N -LA ${CommandLineTest_SOURCE_DIR}\"")
-EXEC_CMAKE_COMMAND("-E time \"${CMAKE_COMMAND} -N -LH ${CommandLineTest_SOURCE_DIR}\"")
-EXEC_CMAKE_COMMAND("-E time \"${CMAKE_COMMAND} -N -LAH ${CommandLineTest_SOURCE_DIR}\"")
-EXEC_CMAKE_COMMAND("--help")
-EXEC_CMAKE_COMMAND("--help-command-list")
-EXEC_CMAKE_COMMAND("--help add_executable")
-EXEC_CMAKE_COMMAND("--help-command add_executable")
-EXEC_CMAKE_COMMAND("--help-full \"${CMAKE_CURRENT_BINARY_DIR}/cmake.txt\"")
-EXEC_CMAKE_COMMAND("--help-man \"${CMAKE_CURRENT_BINARY_DIR}/cmake.man\"")
-EXEC_CMAKE_COMMAND("--help-html \"${CMAKE_CURRENT_BINARY_DIR}/cmake.html\"")
-EXEC_CMAKE_COMMAND("--copyright \"${CMAKE_CURRENT_BINARY_DIR}/Copyright.txt\"")
-EXEC_CMAKE_COMMAND("--version \"${CMAKE_CURRENT_BINARY_DIR}/version.txt\"")
+EXEC_CMAKE_COMMAND(-E chdir "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_COMMAND}" -E echo "Hello World")
+EXEC_CMAKE_COMMAND(-E time "${CMAKE_COMMAND} -N -L ${CommandLineTest_SOURCE_DIR}")
+EXEC_CMAKE_COMMAND(-E time "${CMAKE_COMMAND} -N -LA ${CommandLineTest_SOURCE_DIR}")
+EXEC_CMAKE_COMMAND(-E time "${CMAKE_COMMAND} -N -LH ${CommandLineTest_SOURCE_DIR}")
+EXEC_CMAKE_COMMAND(-E time "${CMAKE_COMMAND} -N -LAH ${CommandLineTest_SOURCE_DIR}")
+EXEC_CMAKE_COMMAND(--help)
+EXEC_CMAKE_COMMAND(--help-command-list)
+EXEC_CMAKE_COMMAND(--help add_executable)
+EXEC_CMAKE_COMMAND(--help-command add_executable)
+EXEC_CMAKE_COMMAND(--help-full "${CMAKE_CURRENT_BINARY_DIR}/cmake.txt")
+EXEC_CMAKE_COMMAND(--help-man "${CMAKE_CURRENT_BINARY_DIR}/cmake.man")
+EXEC_CMAKE_COMMAND(--help-html "${CMAKE_CURRENT_BINARY_DIR}/cmake.html")
+EXEC_CMAKE_COMMAND(--copyright "${CMAKE_CURRENT_BINARY_DIR}/Copyright.txt")
+EXEC_CMAKE_COMMAND(--version "${CMAKE_CURRENT_BINARY_DIR}/version.txt")
add_executable(CommandLineTest CommandLineTest.cxx)
get_filename_component(CMAKE_COMMAND_PATH "${CMAKE_COMMAND}" PATH)
set(CTEST_COMMAND "${CMAKE_COMMAND_PATH}/ctest")
-macro(EXEC_CTEST_COMMAND CMAKE_ARGS)
- exec_program("${CTEST_COMMAND}" ARGS "${CMAKE_ARGS}" RETURN_VALUE RET)
+macro(EXEC_CTEST_COMMAND)
+ execute_process(COMMAND "${CTEST_COMMAND}" ${ARGN} RESULT_VARIABLE RET)
if(${RET})
message(SEND_ERROR "CTest command failed with arguments \"${CMAKE_ARGS}\"")
endif()
endmacro()
-macro(EXEC_CTEST_COMMAND_WITH_DIR DIR CMAKE_ARGS)
- exec_program("${CTEST_COMMAND}" "${DIR}" ARGS "${CMAKE_ARGS}" RETURN_VALUE RET)
+macro(EXEC_CTEST_COMMAND_WITH_DIR DIR)
+ execute_process(COMMAND "${CTEST_COMMAND}" ${ARGN} WORKING_DIRECTORY "${DIR}" RESULT_VARIABLE RET)
if(${RET})
message(SEND_ERROR "CTest command failed with arguments \"${CMAKE_ARGS}\"")
endif()
endmacro()
-EXEC_CTEST_COMMAND_WITH_DIR("${CMAKE_CURRENT_BINARY_DIR}/../.." "-N")
-EXEC_CTEST_COMMAND_WITH_DIR("${CMAKE_CURRENT_BINARY_DIR}/../.." "-R complex -N")
-EXEC_CTEST_COMMAND_WITH_DIR("${CMAKE_CURRENT_BINARY_DIR}/../.." "-E Simple -N")
-EXEC_CTEST_COMMAND_WITH_DIR("${CMAKE_CURRENT_BINARY_DIR}/../.." "-E Simple -N")
-EXEC_CTEST_COMMAND_WITH_DIR("${CMAKE_CURRENT_BINARY_DIR}/../.." "-N -I -10")
-EXEC_CTEST_COMMAND_WITH_DIR("${CMAKE_CURRENT_BINARY_DIR}/../.." "-N -I 10-")
-EXEC_CTEST_COMMAND_WITH_DIR("${CMAKE_CURRENT_BINARY_DIR}/../.." "-N -I 3,4")
-EXEC_CTEST_COMMAND("--help")
-EXEC_CTEST_COMMAND("--copyright")
-EXEC_CTEST_COMMAND("--help-full \"${CMAKE_CURRENT_BINARY_DIR}/ctest.txt\"")
-EXEC_CTEST_COMMAND("--help-man \"${CMAKE_CURRENT_BINARY_DIR}/ctest.man\"")
-EXEC_CTEST_COMMAND("--help-html \"${CMAKE_CURRENT_BINARY_DIR}/ctest.html\"")
-EXEC_CTEST_COMMAND("--version")
+EXEC_CTEST_COMMAND_WITH_DIR("${CMAKE_CURRENT_BINARY_DIR}/../.." -N)
+EXEC_CTEST_COMMAND_WITH_DIR("${CMAKE_CURRENT_BINARY_DIR}/../.." -R complex -N)
+EXEC_CTEST_COMMAND_WITH_DIR("${CMAKE_CURRENT_BINARY_DIR}/../.." -E Simple -N)
+EXEC_CTEST_COMMAND_WITH_DIR("${CMAKE_CURRENT_BINARY_DIR}/../.." -E Simple -N)
+EXEC_CTEST_COMMAND_WITH_DIR("${CMAKE_CURRENT_BINARY_DIR}/../.." -N -I -10)
+EXEC_CTEST_COMMAND_WITH_DIR("${CMAKE_CURRENT_BINARY_DIR}/../.." -N -I 10-)
+EXEC_CTEST_COMMAND_WITH_DIR("${CMAKE_CURRENT_BINARY_DIR}/../.." -N -I 3,4)
+EXEC_CTEST_COMMAND(--help)
+EXEC_CTEST_COMMAND(--copyright)
+EXEC_CTEST_COMMAND(--help-full "${CMAKE_CURRENT_BINARY_DIR}/ctest.txt")
+EXEC_CTEST_COMMAND(--help-man "${CMAKE_CURRENT_BINARY_DIR}/ctest.man")
+EXEC_CTEST_COMMAND(--help-html "${CMAKE_CURRENT_BINARY_DIR}/ctest.html")
+EXEC_CTEST_COMMAND(--version)
if(THIS_SHOULD_BE_SET)
message(STATUS "***************************")
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index 9493a2f..d3a184d 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -327,12 +327,12 @@ if (WIN32)
${Complex_SOURCE_DIR}/Library/dummy
"${dir}/${file}"
COPYONLY)
- exec_program(${CMAKE_COMMAND} ARGS "-E write_regv \"${hkey}\" \"${dir}\"")
+ execute_process(COMMAND ${CMAKE_COMMAND} -E write_regv "${hkey}" "${dir}")
find_path(REGISTRY_TEST_PATH
${file}
"[${hkey}]" DOC "Registry_Test_Path")
- exec_program(${CMAKE_COMMAND} ARGS "-E delete_regv \"${hkey}\"")
- exec_program(${CMAKE_COMMAND} ARGS "-E rm -f \"${dir}/${file}\"")
+ execute_process(COMMAND ${CMAKE_COMMAND} -E delete_regv "${hkey}")
+ execute_process(COMMAND ${CMAKE_COMMAND} -E rm -f "${dir}/${file}")
endif ()
endif ()
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index e4fdc68..dd996e1 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -284,12 +284,12 @@ if (WIN32)
${Complex_SOURCE_DIR}/Library/dummy
"${dir}/${file}"
COPYONLY)
- exec_program(${CMAKE_COMMAND} ARGS "-E write_regv \"${hkey}\" \"${dir}\"")
+ execute_process(COMMAND ${CMAKE_COMMAND} -E write_regv "${hkey}" "${dir}")
find_path(REGISTRY_TEST_PATH
${file}
"[${hkey}]" DOC "Registry_Test_Path")
- exec_program(${CMAKE_COMMAND} ARGS "-E delete_regv \"${hkey}\"")
- exec_program(${CMAKE_COMMAND} ARGS "-E rm -f \"${dir}/${file}\"")
+ execute_process(COMMAND ${CMAKE_COMMAND} -E delete_regv "${hkey}")
+ execute_process(COMMAND ${CMAKE_COMMAND} -E rm -f "${dir}/${file}")
endif ()
endif ()
diff --git a/Tests/ExternalOBJ/CMakeLists.txt b/Tests/ExternalOBJ/CMakeLists.txt
index 4ff75b8..141977c 100644
--- a/Tests/ExternalOBJ/CMakeLists.txt
+++ b/Tests/ExternalOBJ/CMakeLists.txt
@@ -3,7 +3,7 @@ project (ExternalOBJ)
if(APPLE)
# set _CMAKE_OSX_MACHINE to umame -m
- exec_program(uname ARGS -m OUTPUT_VARIABLE _CMAKE_OSX_MACHINE)
+ execute_process(COMMAND uname -m OUTPUT_VARIABLE _CMAKE_OSX_MACHINE OUTPUT_STRIP_TRAILING_WHITESPACE)
# check for Power PC and change to ppc
if("${_CMAKE_OSX_MACHINE}" MATCHES "Power")
set(_CMAKE_OSX_MACHINE ppc)
diff --git a/Tests/ExternalOBJ/Object/CMakeLists.txt b/Tests/ExternalOBJ/Object/CMakeLists.txt
index dbfe09e..a886da0 100644
--- a/Tests/ExternalOBJ/Object/CMakeLists.txt
+++ b/Tests/ExternalOBJ/Object/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 2.6)
project(Object)
if(APPLE)
# set _CMAKE_OSX_MACHINE to umame -m
- exec_program(uname ARGS -m OUTPUT_VARIABLE _CMAKE_OSX_MACHINE)
+ execute_process(COMMAND uname -m OUTPUT_VARIABLE _CMAKE_OSX_MACHINE OUTPUT_STRIP_TRAILING_WHITESPACE)
# check for Power PC and change to ppc
if("${_CMAKE_OSX_MACHINE}" MATCHES "Power")
set(_CMAKE_OSX_MACHINE ppc)