Skip to content
Snippets Groups Projects
Commit f8faacee authored by Reinder Kraaij's avatar Reinder Kraaij :eye:
Browse files

split command

parent f85a8735
No related branches found
No related tags found
1 merge request!1214Resolve TMSS-2642 "Npm ci take iii"
...@@ -114,14 +114,17 @@ function(npm_install NPM_PACKAGE_SPECIFICATION) ...@@ -114,14 +114,17 @@ function(npm_install NPM_PACKAGE_SPECIFICATION)
OUTPUT "${NPM_BINARY_DIR}/package.json" OUTPUT "${NPM_BINARY_DIR}/package.json"
OUTPUT "${NPM_BINARY_DIR}/package-lock.json" OUTPUT "${NPM_BINARY_DIR}/package-lock.json"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${JSON_PACKAGE_SPECIFICATION}" "${NPM_BINARY_DIR}/package.json" COMMAND ${CMAKE_COMMAND} -E copy_if_different "${JSON_PACKAGE_SPECIFICATION}" "${NPM_BINARY_DIR}/package.json"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${JSON_PACKAGE_LOCK_SPECIFICATION}" "${NPM_BINARY_DIR}/package-lock.json"
DEPENDS DEPENDS
${JSON_PACKAGE_SPECIFICATION}
${JSON_PACKAGE_LOCK_SPECIFICATION} ${JSON_PACKAGE_LOCK_SPECIFICATION}
COMMENT "Copying ${JSON_PACKAGE_SPECIFICATION} to ${NPM_BINARY_DIR}/package.json for ${PACKAGE_NAME}") COMMENT "Copying ${JSON_PACKAGE_SPECIFICATION} to ${NPM_BINARY_DIR}/package.json for ${PACKAGE_NAME}")
add_custom_command(
OUTPUT "${NPM_BINARY_DIR}/package-lock.json"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${JSON_PACKAGE_LOCK_SPECIFICATION}" "${NPM_BINARY_DIR}/package-lock.json"
DEPENDS
${JSON_PACKAGE_LOCK_SPECIFICATION}
COMMENT "Copying ${JSON_PACKAGE_SPECIFICATION} to ${NPM_BINARY_DIR}/package.json for ${PACKAGE_NAME}")
foreach(file ${SOURCE_FILES}) foreach(file ${SOURCE_FILES})
add_custom_command(OUTPUT "${NPM_BINARY_DIR}/src/${file}" add_custom_command(OUTPUT "${NPM_BINARY_DIR}/src/${file}"
...@@ -170,9 +173,7 @@ function(npm_install NPM_PACKAGE_SPECIFICATION) ...@@ -170,9 +173,7 @@ function(npm_install NPM_PACKAGE_SPECIFICATION)
add_custom_command( add_custom_command(
OUTPUT "${NPM_BINARY_DIR}/node_modules" OUTPUT "${NPM_BINARY_DIR}/node_modules"
COMMAND ${CMAKE_COMMAND} -E echo "Starting NPM CI"
COMMAND NODE_OPTIONS="--max-old-space-size=8192" npm ci COMMAND NODE_OPTIONS="--max-old-space-size=8192" npm ci
COMMAND ${CMAKE_COMMAND} -E echo "Completed NPM CI"
DEPENDS "${NPM_BINARY_DIR}/package.json" "${NPM_BINARY_DIR}/package-lock.json" DEPENDS "${NPM_BINARY_DIR}/package.json" "${NPM_BINARY_DIR}/package-lock.json"
WORKING_DIRECTORY "${NPM_BINARY_DIR}" WORKING_DIRECTORY "${NPM_BINARY_DIR}"
COMMENT "Downloading npm dependencies for ${NPM_BINARY_DIR}/package.json with the help of the lock file") COMMENT "Downloading npm dependencies for ${NPM_BINARY_DIR}/package.json with the help of the lock file")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment