Skip to content

Commit

Permalink
BUILD: replace CMake deprecated exec_program() with `execute_proces…
Browse files Browse the repository at this point in the history
…s()`
  • Loading branch information
JanWielemaker committed Dec 12, 2023
1 parent 9bb9c73 commit eaa3e28
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ if(NOT JAVA_HOME)
endif()
endif()

exec_program(${PROG_JAVA_HOME} ARGS ${jdatamodel}
OUTPUT_VARIABLE jhome
OUTPUT_STRIP_TRAILING_WHITESPACE
RETURN_VALUE jhome_ret)
execute_process(COMMAND ${PROG_JAVA_HOME} ARGS ${jdatamodel}
OUTPUT_VARIABLE jhome
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE jhome_ret)
if(jhome_ret EQUAL 0)
set(JAVA_HOME ${jhome} CACHE FILEPATH "Home of Java")
message("-- ${PROG_JAVA_HOME} claims Java at ${JAVA_HOME}")
Expand Down

0 comments on commit eaa3e28

Please sign in to comment.