Skip to content

Commit

Permalink
Stop using deprecated exec_program command in cmake, references #1102
Browse files Browse the repository at this point in the history
  • Loading branch information
pramsey committed Jun 6, 2024
1 parent b520277 commit 960c39f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions cmake/cmake_uninstall.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,23 @@ foreach(file ${files})
message(STATUS "\tTrying to execute remove command anyway.")
endif()

exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
execute_process(
COMMAND "@CMAKE_COMMAND@" -E remove \"$ENV{DESTDIR}${file}\"
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval)
RESULT_VARIABLE rm_retval)

if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
endif()

endforeach()

message(STATUS "Deleting ${GEOS_INCLUDE_DIR} directory")
exec_program("@CMAKE_COMMAND@"
ARGS "-E remove_directory \"${GEOS_INCLUDE_DIR}\""
execute_process(
COMMAND "@CMAKE_COMMAND@" -E remove_directory \"${GEOS_INCLUDE_DIR}\"
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval)
RESULT_VARIABLE rm_retval)

if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing \"${GEOS_INCLUDE_DIR}\"")
endif()

0 comments on commit 960c39f

Please # to comment.