Skip to content

Commit c9341d1

Browse files
build: Replace exec_program by execute_process
exec_program was deprecated in CMake 3.0. It got a FATAL_ERROR with CMake 3.28. See CMP0153. So replace with the newer execute_process. See: https://cmake.org/cmake/help/latest/policy/CMP0153.html
1 parent 65ea0a8 commit c9341d1

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

cmake/modules/CheckCompiler.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ endif (CMAKE_SYSTEM_NAME MATCHES Linux)
123123

124124

125125
if (CMAKE_SYSTEM_NAME MATCHES Darwin)
126-
EXEC_PROGRAM("sw_vers -productVersion | cut -d . -f 1-2" OUTPUT_VARIABLE MAC_OS_VERSION)
126+
execute_process(COMMAND sw_vers -productVersion
127+
COMMAND cut -d . -f 1-2
128+
OUTPUT_STRIP_TRAILING_WHITESPACE
129+
OUTPUT_VARIABLE MAC_OS_VERSION)
127130
MESSAGE("-- Found a Mac OS X System ${MAC_OS_VERSION}")
128131
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
129132
MESSAGE("-- Found GNU compiler collection")

cmake/modules/ROOTMacros.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ macro(FAIRROOT_GENERATE_DICTIONARY)
107107
Configure_File(${FAIRROOTPATH}/share/fairbase/cmake/scripts/generate_dictionary_root.sh.in
108108
${CMAKE_CURRENT_BINARY_DIR}/generate_dictionary_${script_name}.sh
109109
)
110-
#EXEC_PROGRAM(/bin/chmod ARGS "u+x ${CMAKE_CURRENT_BINARY_DIR}/generate_dictionary_${script_name}.sh")
111110
execute_process(COMMAND /bin/chmod u+x ${CMAKE_CURRENT_BINARY_DIR}/generate_dictionary_${script_name}.sh OUTPUT_QUIET)
112111

113112
Add_Custom_Command(OUTPUT ${OUTPUT_FILES}

0 commit comments

Comments
 (0)