@@ -31,6 +31,9 @@ class Spheral(CachedCMakePackage, CudaPackage, ROCmPackage):
31
31
variant ('docs' , default = False , description = 'Enable building Docs.' )
32
32
variant ('shared' , default = True , description = 'Build C++ libs as shared.' )
33
33
variant ('python' , default = True , description = 'Build Python Dependencies.' )
34
+ variant ('caliper' , default = True , description = 'Enable Caliper timers.' )
35
+ variant ('opensubdiv' , default = True , description = 'Enable use of opensubdiv to do refinement.' )
36
+ variant ('network' , default = True , description = 'Disable to build Spheral from a local buildcache.' )
34
37
35
38
# -------------------------------------------------------------------------
36
39
# DEPENDS
@@ -59,16 +62,19 @@ class Spheral(CachedCMakePackage, CudaPackage, ROCmPackage):
59
62
depends_on ('axom +shared' , when = '~cuda' , type = 'build' )
60
63
depends_on ('axom ~shared' , when = '+cuda' , type = 'build' )
61
64
62
- depends_on (
'[email protected] ~shared +adiak +gotcha ~libdw ~papi ~libunwind +pic' ,
type = 'build' )
65
+ with when ("+caliper" ):
66
+ depends_on (
"[email protected] ~shared +adiak +gotcha ~libdw ~papi ~libunwind +pic" ,
type = "build" )
67
+ depends_on ("caliper+mpi" , type = "build" , when = "+mpi" )
68
+ depends_on ("caliper~mpi" , type = "build" , when = "~mpi" )
63
69
64
70
depends_on (
"[email protected] " ,
type = "build" )
65
71
66
- depends_on (
'[email protected] +pic' ,
type = 'build' )
72
+ depends_on (
'[email protected] +pic' ,
type = 'build' , when = "+opensubdiv" )
67
73
68
- depends_on ('polytope +python' , type = 'build' , when = '+python' )
74
+ depends_on ('polytope +python' , type = 'build' )
69
75
70
76
# Forward MPI Variants
71
- mpi_tpl_list = ["hdf5" , "conduit" , "axom" , "caliper" , " adiak~shared" ]
77
+ mpi_tpl_list = ["hdf5" , "conduit" , "axom" , "adiak~shared" ]
72
78
for ctpl in mpi_tpl_list :
73
79
for mpiv in ["+mpi" , "~mpi" ]:
74
80
depends_on (f"{ ctpl } { mpiv } " , type = 'build' , when = f"{ mpiv } " )
@@ -174,15 +180,17 @@ def initconfig_package_entries(self):
174
180
spec = self .spec
175
181
entries = []
176
182
177
- entries .append (cmake_cache_option ('ENABLE_CXXONLY' , False ))
183
+ entries .append (cmake_cache_option ('ENABLE_CXXONLY' , not spec . satisfies ( "+python" ) ))
178
184
entries .append (cmake_cache_option ('TPL_VERBOSE' , False ))
179
185
entries .append (cmake_cache_option ('BUILD_TPL' , True ))
180
186
181
187
entries .append (cmake_cache_string ('SPHERAL_SYS_ARCH' , self ._get_sys_type (spec )))
182
188
entries .append (cmake_cache_string ('SPHERAL_CONFIGURATION' , self ._get_config_name (spec )))
183
189
184
190
# TPL locations
185
- entries .append (cmake_cache_path ('caliper_DIR' , spec ['caliper' ].prefix ))
191
+ if (spec .satisfies ("+caliper" )):
192
+ entries .append (cmake_cache_path ('caliper_DIR' , spec ['caliper' ].prefix ))
193
+ entries .append (cmake_cache_option ('ENABLE_TIMER' , True ))
186
194
187
195
entries .append (cmake_cache_path ('adiak_DIR' , spec ['adiak' ].prefix ))
188
196
@@ -207,7 +215,12 @@ def initconfig_package_entries(self):
207
215
entries .append (cmake_cache_path ('eigen_DIR' , spec ['eigen' ].prefix ))
208
216
entries .append (cmake_cache_path ('eigen_INCLUDES' ,spec ['eigen' ].prefix .include .eigen3 ))
209
217
210
- entries .append (cmake_cache_path ('opensubdiv_DIR' , spec ['opensubdiv' ].prefix ))
218
+ if (spec .satisfies ("+opensubdiv" )):
219
+ entries .append (cmake_cache_path ('opensubdiv_DIR' , spec ['opensubdiv' ].prefix ))
220
+ entries .append (cmake_cache_path ('ENABLE_OPENSUBDIV' , True ))
221
+
222
+ if (spec .satisfies ("~network" )):
223
+ entries .append (cmake_cache_path ('SPHERAL_NETWORK_CONNECTED' , False ))
211
224
212
225
entries .append (cmake_cache_path ('polytope_DIR' , spec ['polytope' ].prefix ))
213
226
0 commit comments