|
@@ -21,20 +21,6 @@ if ( "${ECLWATCH_BUILD_STRATEGY}" STREQUAL "SKIP" )
|
|
|
message ( "-- ECL Watch: Skipping..." )
|
|
|
else ()
|
|
|
message ( "-- ECL Watch: Packaging Optimized/Built Sources..." )
|
|
|
- set (NODE_ERROR "")
|
|
|
- execute_process(COMMAND node --version
|
|
|
- OUTPUT_VARIABLE _VERSION
|
|
|
- RESULT_VARIABLE _NODE_VERSION_RESULT)
|
|
|
- if (NOT _NODE_VERSION_RESULT)
|
|
|
- string (REPLACE "v" "" NODE_VERSION_STRING "${_VERSION}")
|
|
|
- string (REPLACE "." ";" _VERSION_LIST "${NODE_VERSION_STRING}")
|
|
|
- list (GET _VERSION_LIST 0 NODE_VERSION_MAJOR)
|
|
|
- if (${NODE_VERSION_MAJOR} LESS 8)
|
|
|
- set (NODE_ERROR "Node version ${NODE_VERSION_MAJOR} is too old, please install NodeJS as per https://github.com/hpcc-systems/HPCC-Platform/wiki/Building-HPCC#prerequisites" )
|
|
|
- endif ()
|
|
|
- else ()
|
|
|
- set (NODE_ERROR "Unable to locate node/npm, please install NodeJS as per https://github.com/hpcc-systems/HPCC-Platform/wiki/Building-HPCC#prerequisites" )
|
|
|
- endif ()
|
|
|
|
|
|
set ( ECLWATCH_BUILD_TMP "${CMAKE_CURRENT_BINARY_DIR}/tmp" )
|
|
|
set ( ECLWATCH_BUILD_DEST "${CMAKE_CURRENT_BINARY_DIR}/build" )
|
|
@@ -45,6 +31,20 @@ else ()
|
|
|
|
|
|
install ( CODE "
|
|
|
if ( ( NOT \"${ECLWATCH_BUILD_STRATEGY}\" STREQUAL \"IF_MISSING\" ) OR ( NOT EXISTS \"${ECLWATCH_BUILD_DEST}\" ) )
|
|
|
+
|
|
|
+ set (NODE_ERROR \"\")
|
|
|
+ execute_process(COMMAND node --version OUTPUT_VARIABLE _VERSION RESULT_VARIABLE _NODE_VERSION_RESULT)
|
|
|
+ if (NOT _NODE_VERSION_RESULT)
|
|
|
+ string (REPLACE \"v\" \"\" NODE_VERSION_STRING \"\${_VERSION}\")
|
|
|
+ string (REPLACE \".\" \";\" _VERSION_LIST \"\${NODE_VERSION_STRING}\")
|
|
|
+ list (GET _VERSION_LIST 0 NODE_VERSION_MAJOR)
|
|
|
+ if (NODE_VERSION_MAJOR LESS 8)
|
|
|
+ set (NODE_ERROR \"Node version \${NODE_VERSION_MAJOR} is too old, please install NodeJS as per https://github.com/hpcc-systems/HPCC-Platform/wiki/Building-HPCC#prerequisites\" )
|
|
|
+ endif ()
|
|
|
+ else ()
|
|
|
+ set (NODE_ERROR \"Unable to locate node/npm, please install NodeJS as per https://github.com/hpcc-systems/HPCC-Platform/wiki/Building-HPCC#prerequisites\" )
|
|
|
+ endif ()
|
|
|
+
|
|
|
if ( NOT \"${NODE_ERROR}\" STREQUAL \"\")
|
|
|
message ( WARNING \"${NODE_ERROR}\" )
|
|
|
else ()
|