Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace exec_program with execute_process #402

Merged
merged 2 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmake/GzCheckSSE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ endif()

IF (ARCH MATCHES "i386" OR ARCH MATCHES "x86_64")
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
EXEC_PROGRAM(cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO)
EXECUTE_PROCESS(COMMAND cat -u /proc/cpuinfo OUTPUT_VARIABLE CPUINFO)

STRING(REGEX REPLACE "^.*(sse2).*$" "\\1" SSE_THERE ${CPUINFO})
STRING(COMPARE EQUAL "sse2" "${SSE_THERE}" SSE2_TRUE)
Expand Down Expand Up @@ -207,7 +207,7 @@ IF (ARCH MATCHES "i386" OR ARCH MATCHES "x86_64")
ENDIF (SSE42_TRUE)

ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
EXEC_PROGRAM("/usr/sbin/sysctl -n machdep.cpu.features" OUTPUT_VARIABLE
EXECUTE_PROCESS(COMMAND /usr/sbin/sysctl -n machdep.cpu.features OUTPUT_VARIABLE
CPUINFO)

STRING(REGEX REPLACE "^.*[^S](SSE2).*$" "\\1" SSE_THERE ${CPUINFO})
Expand Down
12 changes: 6 additions & 6 deletions cmake/cmake_uninstall.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling '$ENV{DESTDIR}${file}'")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
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)
if(rm_retfal AND NOT rm_retval STREQUAL 0)
message(FATAL_ERROR "Problem when removing '$ENV{DESTDIR}${file}'")
endif(NOT "${rm_retval}" STREQUAL 0)
endif()
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File '$ENV{DESTDIR}${file}' does not exist.")
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
endif()
endforeach(file)