summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1fcbb6c360..aa25cd6def 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,11 @@ if(NOT EXISTS "mapbox-gl-js/package.json")
execute_process(
COMMAND git submodule update --init mapbox-gl-js
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+ # Symlink mapbox-gl-js/node_modules so that the modules that are
+ # about to be installed get cached between CI runs.
+ execute_process(
+ COMMAND ln -s ../node_modules node_modules
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/mapbox-gl-js)
execute_process(
COMMAND npm install
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/mapbox-gl-js)