@@ -19,6 +19,18 @@ if(NOT MANTID_DATA_STORE)
19
19
message (FATAL_ERROR "MANTID_DATA_STORE not set. It is required for external data" )
20
20
endif ()
21
21
22
+ # add options for selecting which data mirrors to use
23
+ set (_data_store_mirror_options all ral ornl none)
24
+ set (DATA_STORE_MIRROR
25
+ all
26
+ CACHE STRING "Local data mirror to enable"
27
+ )
28
+ set_property (CACHE DATA_STORE_MIRROR PROPERTY STRINGS ${_data_store_mirror_options} )
29
+ list (FIND _data_store_mirror_options ${DATA_STORE_MIRROR} index)
30
+ if (index EQUAL -1)
31
+ message (FATAL_ERROR "DATA_STORE_MIRROR must be one of ${_data_store_mirror_options} " )
32
+ endif ()
33
+
22
34
# Tell ExternalData module about selected object stores.
23
35
list (APPEND ExternalData_OBJECT_STORES
24
36
# Store selected by Mantid-specific configuration above.
@@ -41,9 +53,17 @@ mark_as_advanced(ExternalData_URL_TEMPLATES)
41
53
list (APPEND ExternalData_URL_TEMPLATES "file:///home/builder/MantidExternalData-readonly/%(algo)/%(hash)" )
42
54
list (APPEND ExternalData_URL_TEMPLATES "file:///Users/mantidbuilder/MantidExternalData/%(algo)/%(hash)" ) # macOS
43
55
list (APPEND ExternalData_URL_TEMPLATES "file:///mantid_data/%(algo)/%(hash)" ) # ISIS Linux
56
+
44
57
# facility based mirrors
45
- list (APPEND ExternalData_URL_TEMPLATES "http://130.246.80.136/external-data/%(algo)/%(hash)" ) # RAL
46
- list (APPEND ExternalData_URL_TEMPLATES "https://mantid-cache.sns.gov/testdata/%(algo)/%(hash)" ) # ORNL
58
+ if ((${DATA_STORE_MIRROR} STREQUAL all ) OR (${DATA_STORE_MIRROR} STREQUAL ral))
59
+ message (STATUS "Adding ral data mirror" )
60
+ list (APPEND ExternalData_URL_TEMPLATES "http://130.246.80.136/external-data/%(algo)/%(hash)" ) # RAL
61
+ endif ()
62
+ if ((${DATA_STORE_MIRROR} STREQUAL all ) OR (${DATA_STORE_MIRROR} STREQUAL ornl))
63
+ message (STATUS "Adding ornl data mirror" )
64
+ list (APPEND ExternalData_URL_TEMPLATES "https://mantid-cache.sns.gov/testdata/%(algo)/%(hash)" ) # ORNL
65
+ endif ()
66
+
47
67
# This should always be last as it's the main read/write cache
48
68
list (APPEND ExternalData_URL_TEMPLATES "https://testdata.mantidproject.org/ftp/external-data/%(algo)/%(hash)" )
49
69
0 commit comments