summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-02-22 13:08:12 (GMT)
committerBrad King <brad.king@kitware.com>2013-02-22 13:25:05 (GMT)
commitef8b2fd101e0aa10f82a140822509e303a2b1bc6 (patch)
tree9b19925d30ea62702a72ca1f0f3aa1f9c768d4d5 /Tests
parent3bb57bab7b1490aad64f3cb0750d71d2dd445447 (diff)
downloadCMake-ef8b2fd101e0aa10f82a140822509e303a2b1bc6.zip
CMake-ef8b2fd101e0aa10f82a140822509e303a2b1bc6.tar.gz
CMake-ef8b2fd101e0aa10f82a140822509e303a2b1bc6.tar.bz2
Tests: Replace exec_program with execute_process
Drop use of the old exec_program command from CMake's own CMakeLists.txt files.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt11
1 files changed, 5 insertions, 6 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index f8e4afd..9231605 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -384,7 +384,8 @@ if(BUILD_TESTING)
# mainly it tests that cmake doesn't crash when generating these project files.
if(${CMAKE_TEST_GENERATOR} MATCHES "Unix Makefiles" OR ${CMAKE_TEST_GENERATOR} MATCHES "KDevelop")
# check which generators we have
- exec_program(${CMAKE_CMAKE_COMMAND} ARGS --help OUTPUT_VARIABLE cmakeOutput )
+ execute_process(COMMAND ${CMAKE_CMAKE_COMMAND} --help
+ OUTPUT_VARIABLE cmakeOutput ERROR_VARIABLE cmakeOutput)
# check for the Eclipse generator
if ("${cmakeOutput}" MATCHES Eclipse)
add_test(Simple_EclipseGenerator ${CMAKE_CTEST_COMMAND}
@@ -1239,11 +1240,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
endif()
set(MAKE_IS_GNU )
if(${CMAKE_TEST_MAKEPROGRAM} MATCHES make)
- exec_program(
- ${CMAKE_TEST_MAKEPROGRAM} ARGS no_such_target --version
- RETURN_VALUE res OUTPUT_VARIABLE out
- )
- if("${res}" EQUAL 0)
+ execute_process(COMMAND ${CMAKE_TEST_MAKEPROGRAM} no_such_target --version
+ RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_VARIABLE out)
+ if("${res}" STREQUAL "0")
if("${out}" MATCHES "GNU")
set(MAKE_IS_GNU 1)
endif()