Skip to content

Commit

Permalink
CMake: Fix node version compare
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaikh-Ubaid committed Aug 29, 2023
1 parent 50ae786 commit a3b8e60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions integration_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ macro(RUN_UTIL RUN_FAIL RUN_NAME RUN_FILE_NAME RUN_LABELS RUN_EXTRAFILES RUN_NOM
execute_process(COMMAND "${WASM_EXEC_RUNTIME}" --version
OUTPUT_VARIABLE WASM_EXEC_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(COMPARE GREATER_EQUAL "${WASM_EXEC_VERSION}"
"v16.0.0" IS_NODE_ABOVE_16)

if (NOT IS_NODE_ABOVE_16)
string(REGEX REPLACE "v([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" NODE_MAJOR_VERSION "${WASM_EXEC_VERSION}")

if (NODE_MAJOR_VERSION LESS 16)
message(STATUS "${WASM_EXEC_RUNTIME} version: ${WASM_EXEC_VERSION}")
set(WASM_EXEC_FLAGS "--experimental-wasm-bigint")
endif()
Expand Down

0 comments on commit a3b8e60

Please sign in to comment.