summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-07-25 13:21:54 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-07-25 13:22:04 (GMT)
commit89a692aa18d0d1f80c131fdc3eba34fea195f00a (patch)
tree4e1c1de44238b9c10a83e052882ab57b46a5e986
parente85d959dcb8017f3df33b4a9a71f7b8278f10087 (diff)
parentedfa4d762d138753a3b4e47c567b0d819313c770 (diff)
downloadCMake-89a692aa18d0d1f80c131fdc3eba34fea195f00a.zip
CMake-89a692aa18d0d1f80c131fdc3eba34fea195f00a.tar.gz
CMake-89a692aa18d0d1f80c131fdc3eba34fea195f00a.tar.bz2
Merge topic 'remove-exec-program-usage'
edfa4d762d cmake_uninstall.cmake.in: Replace exec_program() with execute_process() 8776236161 Tests/ExternalOBJ: Replace exec_program() with execute_process() 54a68b221a Tests/ComplexOneConfig: Replace exec_program() with execute_process() 13e674b61b Tests/Complex: Replace exec_program() with execute_process() e43d97cb29 Tests/CommandLineTest: Replace exec_program() with execute_process() 6463263ffa Tests/CMakeOnly: Replace exec_program() with execute_process() f73a5bfaa9 UsePkgConfig: Replace exec_program() with execute_process() 17bab9e709 FindwxWindows: Replace exec_program() with execute_process() ... Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !8652
-rw-r--r--Modules/FindFLTK.cmake8
-rw-r--r--Modules/FindFLTK2.cmake4
-rw-r--r--Modules/FindQt.cmake6
-rw-r--r--Modules/FindwxWindows.cmake13
-rw-r--r--Modules/UsePkgConfig.cmake10
-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
-rw-r--r--cmake_uninstall.cmake.in6
12 files changed, 69 insertions, 68 deletions
diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake
index d54d2f6..a245c6c 100644
--- a/Modules/FindFLTK.cmake
+++ b/Modules/FindFLTK.cmake
@@ -232,7 +232,7 @@ else()
find_program(FLTK_CONFIG_SCRIPT fltk-config PATHS ${FLTK_BIN_DIR})
if(FLTK_CONFIG_SCRIPT)
if(NOT FLTK_INCLUDE_DIR)
- exec_program(${FLTK_CONFIG_SCRIPT} ARGS --cxxflags OUTPUT_VARIABLE FLTK_CXXFLAGS)
+ execute_process(COMMAND ${FLTK_CONFIG_SCRIPT} --cxxflags OUTPUT_VARIABLE FLTK_CXXFLAGS)
if(FLTK_CXXFLAGS)
string(REGEX MATCHALL "-I[^ ]*" _fltk_temp_dirs ${FLTK_CXXFLAGS})
string(REPLACE "-I" "" _fltk_temp_dirs "${_fltk_temp_dirs}")
@@ -256,7 +256,7 @@ else()
# Try to find FLTK library
if(UNIX)
if(FLTK_CONFIG_SCRIPT)
- exec_program(${FLTK_CONFIG_SCRIPT} ARGS --libs OUTPUT_VARIABLE _FLTK_POSSIBLE_LIBS)
+ execute_process(COMMAND ${FLTK_CONFIG_SCRIPT} --libs OUTPUT_VARIABLE _FLTK_POSSIBLE_LIBS)
if(_FLTK_POSSIBLE_LIBS)
get_filename_component(_FLTK_POSSIBLE_LIBRARY_DIR ${_FLTK_POSSIBLE_LIBS} PATH)
endif()
@@ -292,12 +292,12 @@ else()
# Find the extra libraries needed for the fltk_images library.
if(UNIX)
if(FLTK_CONFIG_SCRIPT)
- exec_program(${FLTK_CONFIG_SCRIPT} ARGS --use-images --ldflags
+ execute_process(COMMAND ${FLTK_CONFIG_SCRIPT} --use-images --ldflags
OUTPUT_VARIABLE FLTK_IMAGES_LDFLAGS)
set(FLTK_LIBS_EXTRACT_REGEX ".*-lfltk_images (.*) -lfltk.*")
if("${FLTK_IMAGES_LDFLAGS}" MATCHES "${FLTK_LIBS_EXTRACT_REGEX}")
string(REGEX REPLACE " +" ";" FLTK_IMAGES_LIBS "${CMAKE_MATCH_1}")
- # The EXEC_PROGRAM will not be inherited into subdirectories from
+ # The execute_process() will not be inherited into subdirectories from
# the file that originally included this module. Save the answer.
set(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL
"Extra libraries for fltk_images library.")
diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake
index a43f7a4..2f6e41d 100644
--- a/Modules/FindFLTK2.cmake
+++ b/Modules/FindFLTK2.cmake
@@ -191,12 +191,12 @@ if(FLTK2_DIR)
if(UNIX)
find_program(FLTK2_CONFIG_SCRIPT fltk2-config PATHS ${FLTK2_BIN_DIR})
if(FLTK2_CONFIG_SCRIPT)
- exec_program(${FLTK2_CONFIG_SCRIPT} ARGS --use-images --ldflags
+ execute_process(COMMAND ${FLTK2_CONFIG_SCRIPT} --use-images --ldflags
OUTPUT_VARIABLE FLTK2_IMAGES_LDFLAGS)
set(FLTK2_LIBS_EXTRACT_REGEX ".*-lfltk2_images (.*) -lfltk2.*")
if("${FLTK2_IMAGES_LDFLAGS}" MATCHES "${FLTK2_LIBS_EXTRACT_REGEX}")
string(REGEX REPLACE " +" ";" FLTK2_IMAGES_LIBS "${CMAKE_MATCH_1}")
- # The EXEC_PROGRAM will not be inherited into subdirectories from
+ # The execute_process() will not be inherited into subdirectories from
# the file that originally included this module. Save the answer.
set(FLTK2_IMAGES_LIBS "${FLTK2_IMAGES_LIBS}" CACHE INTERNAL
"Extra libraries for fltk_images library.")
diff --git a/Modules/FindQt.cmake b/Modules/FindQt.cmake
index 44a1f41..604f8e3 100644
--- a/Modules/FindQt.cmake
+++ b/Modules/FindQt.cmake
@@ -91,7 +91,7 @@ endif ()
# now find qmake
find_program(QT_QMAKE_EXECUTABLE_FINDQT NAMES qmake PATHS "${QT_SEARCH_PATH}/bin" "$ENV{QTDIR}/bin")
if(QT_QMAKE_EXECUTABLE_FINDQT)
- exec_program(${QT_QMAKE_EXECUTABLE_FINDQT} ARGS "-query QT_VERSION"
+ execute_process(COMMAND ${QT_QMAKE_EXECUTABLE_FINDQT} -query QT_VERSION
OUTPUT_VARIABLE QTVERSION)
if(QTVERSION MATCHES "4")
set(QT_QMAKE_EXECUTABLE ${QT_QMAKE_EXECUTABLE_FINDQT} CACHE PATH "Qt4 qmake program.")
@@ -103,8 +103,8 @@ if(QT_QMAKE_EXECUTABLE_FINDQT)
endif()
if(QT_QMAKE_EXECUTABLE_FINDQT)
- exec_program( ${QT_QMAKE_EXECUTABLE_FINDQT}
- ARGS "-query QT_INSTALL_HEADERS"
+ execute_process(COMMAND ${QT_QMAKE_EXECUTABLE_FINDQT}
+ -query QT_INSTALL_HEADERS
OUTPUT_VARIABLE qt_headers )
endif()
diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake
index 6e4be91..d1b25e1 100644
--- a/Modules/FindwxWindows.cmake
+++ b/Modules/FindwxWindows.cmake
@@ -635,14 +635,14 @@ else()
# remember: always link shared to use systems GL etc. libs (no static
# linking, just link *against* static .a libs)
if(WXWINDOWS_USE_SHARED_LIBS)
- set(WX_CONFIG_ARGS_LIBS "--libs")
+ set(WX_CONFIG_ARGS_LIBS --libs)
else()
- set(WX_CONFIG_ARGS_LIBS "--static --libs")
+ set(WX_CONFIG_ARGS_LIBS --static --libs)
endif()
# do we need additionial wx GL stuff like GLCanvas ?
if(WXWINDOWS_USE_GL)
- string(APPEND WX_CONFIG_ARGS_LIBS " --gl-libs" )
+ list(APPEND WX_CONFIG_ARGS_LIBS --gl-libs)
endif()
##message("DBG: WX_CONFIG_ARGS_LIBS=${WX_CONFIG_ARGS_LIBS}===")
@@ -662,14 +662,15 @@ else()
##CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS}===")
# keep the back-quoted string for clarity
- set(WXWINDOWS_LIBRARIES "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} ${WX_CONFIG_ARGS_LIBS}`")
+ string(REPLACE ";" " " _wx_config_args_libs "${WX_CONFIG_ARGS_LIBS}")
+ set(WXWINDOWS_LIBRARIES "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} ${_wx_config_args_libs}`")
##message("DBG2: for linking:
##WXWINDOWS_LIBRARIES=${WXWINDOWS_LIBRARIES}===")
# evaluate wx-config output to separate linker flags and linkdirs for
# rpath:
- exec_program(${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE}
- ARGS ${WX_CONFIG_ARGS_LIBS}
+ execute_process(COMMAND ${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE}
+ ${WX_CONFIG_ARGS_LIBS}
OUTPUT_VARIABLE WX_CONFIG_LIBS )
## extract linkdirs (-L) for rpath
diff --git a/Modules/UsePkgConfig.cmake b/Modules/UsePkgConfig.cmake
index 32d228d..b020259 100644
--- a/Modules/UsePkgConfig.cmake
+++ b/Modules/UsePkgConfig.cmake
@@ -35,25 +35,25 @@ macro(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
# if pkg-config has been found
if(PKGCONFIG_EXECUTABLE)
- exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --exists RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
+ execute_process(COMMAND ${PKGCONFIG_EXECUTABLE} ${_package} --exists RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
# and if the package of interest also exists for pkg-config, then get the information
if(NOT _return_VALUE)
- exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir
+ execute_process(COMMAND ${PKGCONFIG_EXECUTABLE} ${_package} --variable=includedir
OUTPUT_VARIABLE ${_include_DIR} )
string(REGEX REPLACE "[\r\n]" " " ${_include_DIR} "${${_include_DIR}}")
- exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir
+ execute_process(COMMAND ${PKGCONFIG_EXECUTABLE} ${_package} --variable=libdir
OUTPUT_VARIABLE ${_link_DIR} )
string(REGEX REPLACE "[\r\n]" " " ${_link_DIR} "${${_link_DIR}}")
- exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs
+ execute_process(COMMAND ${PKGCONFIG_EXECUTABLE} ${_package} --libs
OUTPUT_VARIABLE ${_link_FLAGS} )
string(REGEX REPLACE "[\r\n]" " " ${_link_FLAGS} "${${_link_FLAGS}}")
- exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags
+ execute_process(COMMAND ${PKGCONFIG_EXECUTABLE} ${_package} --cflags
OUTPUT_VARIABLE ${_cflags} )
string(REGEX REPLACE "[\r\n]" " " ${_cflags} "${${_cflags}}")
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)
diff --git a/cmake_uninstall.cmake.in b/cmake_uninstall.cmake.in
index b5fc700..9e61b00 100644
--- a/cmake_uninstall.cmake.in
+++ b/cmake_uninstall.cmake.in
@@ -7,10 +7,10 @@ string(REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if(EXISTS "$ENV{DESTDIR}${file}")
- exec_program(
- "@CMAKE_COMMAND@" ARGS "-E rm -f \"$ENV{DESTDIR}${file}\""
+ execute_process(
+ COMMAND "@CMAKE_COMMAND@" -E rm -f "$ENV{DESTDIR}${file}"
OUTPUT_VARIABLE rm_out
- RETURN_VALUE rm_retval
+ RESULT_VARIABLE rm_retval
)
if("${rm_retval}" STREQUAL 0)
else()