summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindGCRYPT.cmake10
-rw-r--r--cmake/cmake_uninstall.cmake.in4
2 files changed, 6 insertions, 8 deletions
diff --git a/cmake/FindGCRYPT.cmake b/cmake/FindGCRYPT.cmake
index ae3e00dc4..39772692f 100644
--- a/cmake/FindGCRYPT.cmake
+++ b/cmake/FindGCRYPT.cmake
@@ -34,12 +34,12 @@ set(GCRYPT_CFLAGS)
if(LIBGCRYPT_CONFIG_EXECUTABLE)
- exec_program(${LIBGCRYPT_CONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GCRYPT_LDFLAGS)
- exec_program(${LIBGCRYPT_CONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GCRYPT_CFLAGS)
+ execute_process(COMMAND ${LIBGCRYPT_CONFIG_EXECUTABLE} --libs RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE GCRYPT_LDFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
+ execute_process(COMMAND ${LIBGCRYPT_CONFIG_EXECUTABLE} --cflags RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE GCRYPT_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
- if(${GCRYPT_CFLAGS} MATCHES "\n")
- set(GCRYPT_CFLAGS " ")
- endif()
+ if(NOT DEFINED ${GCRYPT_CFLAGS})
+ set(GCRYPT_CFLAGS " ")
+ endif()
endif()
diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in
index b4789d2c5..6c3d844be 100644
--- a/cmake/cmake_uninstall.cmake.in
+++ b/cmake/cmake_uninstall.cmake.in
@@ -28,9 +28,7 @@ list(REVERSE files)
foreach(file ${files})
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if(EXISTS "$ENV{DESTDIR}${file}")
- exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
- OUTPUT_VARIABLE rm_out
- RETURN_VARIABLE rm_retval)
+ execute_process(COMMAND "@CMAKE_COMMAND@" -E remove "$ENV{DESTDIR}${file}" OUTPUT_VARIABLE rm_out RESULT_VARIABLE rm_retval)
if("${rm_retval}" GREATER 0)
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
endif()