Fix CMP0153 for newer CMake versions (#133)

Fixes deprecated call and replaces it with
execute_process
https://cmake.org/cmake/help/latest/policy/CMP0153.html#policy:CMP0153

Co-authored-by: minacode <minamoto9@web.de>
This commit is contained in:
Max Friedrich 2023-12-11 22:12:54 +01:00 committed by GitHub
parent 43880fd220
commit 39b9b17625
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -271,7 +271,7 @@ target_link_libraries(infinisim PRIVATE QCBOR)
# check version number of installed node package for minimum required # check version number of installed node package for minimum required
find_program(NODE_EXE "node" NO_CACHE QUIET) find_program(NODE_EXE "node" NO_CACHE QUIET)
if(NODE_EXE) if(NODE_EXE)
exec_program("${NODE_EXE}" ARGS "--version" OUTPUT_VARIABLE NODE_VERSION) execute_process(COMMAND "${NODE_EXE}" "--version" OUTPUT_VARIABLE NODE_VERSION)
string(REPLACE "v" "" NODE_VERSION "${NODE_VERSION}") string(REPLACE "v" "" NODE_VERSION "${NODE_VERSION}")
if(NODE_VERSION VERSION_LESS 14.0.0) if(NODE_VERSION VERSION_LESS 14.0.0)
message(WARNING "Node version v${NODE_VERSION} is less than required 14+, you will probably encounter build errors") message(WARNING "Node version v${NODE_VERSION} is less than required 14+, you will probably encounter build errors")