Commit 5a4f118 1 parent 02f1842 commit 5a4f118 Copy full SHA for 5a4f118
File tree 2 files changed +12
-5
lines changed
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 43
43
}
44
44
bskModuleOptionsString = {
45
45
"autoKey" : "" ,
46
- "pathToExternalModules" : ""
46
+ "pathToExternalModules" : "" ,
47
+ "url_spice_kernel" : ""
47
48
}
48
49
bskModuleOptionsFlag = {
49
50
"clean" : False ,
@@ -251,6 +252,7 @@ def build(self):
251
252
cmake .definitions ["CONAN_LINK_RUNTIME_MULTI" ] = cmake .definitions ["CONAN_LINK_RUNTIME" ]
252
253
cmake .definitions ["CONAN_LINK_RUNTIME" ] = False
253
254
cmake .definitions ["BUILD_OPNAV" ] = self .options .opNav
255
+ if self .options .url_spice_kernel : cmake .definitions ["URL_SPICE_KERNEL" ] = self .options .url_spice_kernel
254
256
cmake .definitions ["BUILD_VIZINTERFACE" ] = self .options .vizInterface
255
257
cmake .definitions ["EXTERNAL_MODULES_PATH" ] = self .options .pathToExternalModules
256
258
cmake .definitions ["PYTHON_VERSION" ] = f"{ sys .version_info .major } .{ sys .version_info .minor } "
Original file line number Diff line number Diff line change @@ -338,11 +338,16 @@ FetchContent_MakeAvailable(googletest)
338
338
include (GoogleTest)
339
339
enable_testing ()
340
340
341
- # Check if the large Spice files are present. If not, download from JPL site directly
341
+ # Download spice file if not present
342
+ set (URL_SPICE_KERNEL
343
+ "https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de430.bsp"
344
+ CACHE
345
+ STRING
346
+ "URL from which to download spice kernel de430.bsp dependency" )
342
347
if (NOT EXISTS "${CMAKE_SOURCE_DIR} /../supportData/EphemerisData/de430.bsp" )
343
- message (STATUS "File de430.bsp not found, downloading file:" )
348
+ message (STATUS "File de430.bsp not found, downloading file from ${URL_SPICE_KERNEL} :" )
344
349
file (DOWNLOAD
345
- "https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de430.bsp "
350
+ "${URL_SPICE_KERNEL} "
346
351
# Download it to the build directory (in case the download gets interrupted).
347
352
"${CMAKE_BINARY_DIR} /data/de430.bsp"
348
353
SHOW_PROGRESS
@@ -351,7 +356,7 @@ if(NOT EXISTS "${CMAKE_SOURCE_DIR}/../supportData/EphemerisData/de430.bsp")
351
356
list (GET DOWNLOAD_RESULT 1 RESULT_MESSAGE)
352
357
list (GET DOWNLOAD_RESULT 0 RESULT_CODE)
353
358
if (NOT RESULT_CODE EQUAL 0)
354
- message (FATAL_ERROR "Failed downloading de430.bsp with error code: ${RESULT_CODE} : ${RESULT_MESSAGE} ." )
359
+ message (WARNING "Failed downloading de430.bsp with error code: ${RESULT_CODE} : ${RESULT_MESSAGE} ." )
355
360
endif ()
356
361
# Move the SPICE file into the appropriate directory.
357
362
file (RENAME "${CMAKE_BINARY_DIR} /data/de430.bsp" "${CMAKE_SOURCE_DIR} /../supportData/EphemerisData/de430.bsp" )
You can’t perform that action at this time.
0 commit comments