1616from spack_repo .builtin .build_systems .cuda import CudaPackage
1717from spack_repo .builtin .build_systems .rocm import ROCmPackage
1818
19+ from spack .package import *
20+
1921# Axom components we expose to Spack. Core is always built and is not listed here.
2022_AXOM_COMPONENTS = (
2123 "bump" ,
3537)
3638
3739
38- from spack .package import *
39-
40-
4140def get_spec_path (spec , package_name , path_replacements = {}, use_bin = False , use_lib = False ):
4241 """Extracts the prefix path for the given spack package
4342 path_replacements is a dictionary with string replacements for the path.
@@ -145,10 +144,12 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
145144 values = any_combination_of ("all" , * _AXOM_COMPONENTS ).with_default ("all" ),
146145 )
147146
147+ variant ("int64" , default = True , description = "Use 64bit integers for IndexType" )
148+
148149 # variants for package dependencies
149150 variant ("adiak" , default = False , when = "@0.13:" , description = "Build with adiak" )
150- variant ("caliper" , default = False , when = "@0.13:" , description = "Build with caliper" )
151151 variant ("c2c" , default = False , description = "Build with c2c" )
152+ variant ("caliper" , default = False , when = "@0.13:" , description = "Build with caliper" )
152153 variant ("conduit" , default = True , description = "Build with conduit" )
153154 variant ("hdf5" , default = True , description = "Build with hdf5" )
154155 variant ("lua" , default = True , description = "Build with Lua" )
@@ -158,8 +159,6 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
158159 variant ("scr" , default = False , description = "Build with SCR" )
159160 variant ("umpire" , default = True , description = "Build with umpire" )
160161
161- variant ("int64" , default = True , description = "Use 64bit integers for IndexType" )
162-
163162 varmsg = "Build development tools (such as Sphinx, Doxygen, etc...)"
164163 variant ("devtools" , default = False , description = varmsg )
165164
@@ -176,10 +175,10 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
176175 depends_on ("cmake@3.21:" , type = "build" , when = "+rocm" )
177176
178177 depends_on ("blt" , type = "build" )
179- depends_on ("blt@0.5.1:0.5.3" , type = "build" , when = "@0.6.1:0.8" )
180- depends_on ("blt@0.6.2:" , type = "build" , when = "@0.9:" )
181- depends_on ("blt@0.7" , type = "build" , when = "@0.11:" )
182178 depends_on ("blt@0.7.1:" , type = "build" , when = "@0.12:" )
179+ depends_on ("blt@0.7" , type = "build" , when = "@0.11:" )
180+ depends_on ("blt@0.6.2" , type = "build" , when = "@0.9:0.10" )
181+ depends_on ("blt@0.5.1:0.5.3" , type = "build" , when = "@0.6.1:0.8" )
183182
184183 depends_on ("mpi" , when = "+mpi" )
185184
@@ -201,8 +200,10 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
201200 with when ("+umpire" ):
202201 depends_on ("umpire" )
203202 depends_on ("umpire@2025.12:" , when = "@0.13:" )
204- depends_on ("umpire@2025.09.0:" , when = "@0.10:" )
205- depends_on ("umpire@2024.02.0:" , when = "@0.9:" )
203+ depends_on ("umpire@2025.09:" , when = "@0.12:" )
204+ depends_on ("umpire@2025.03" , when = "@0.11" )
205+ depends_on ("umpire@2024.07" , when = "@0.10" )
206+ depends_on ("umpire@2024.02" , when = "@0.9" )
206207 depends_on ("umpire@2022.03.0:2023.06" , when = "@0.7.0:0.8" )
207208 depends_on ("umpire@6.0.0" , when = "@0.6.0" )
208209 depends_on ("umpire@5:5.0.1" , when = "@:0.5.0" )
@@ -212,8 +213,10 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
212213 with when ("+raja" ):
213214 depends_on ("raja" )
214215 depends_on ("raja@2025.12.1:" , when = "@0.13:" )
215- depends_on ("raja@2025.09.0:" , when = "@0.10:" )
216- depends_on ("raja@2024.02.0:" , when = "@0.9:" )
216+ depends_on ("raja@2025.09:" , when = "@0.12:" )
217+ depends_on ("raja@2025.03" , when = "@0.11" )
218+ depends_on ("raja@2024.07" , when = "@0.10" )
219+ depends_on ("raja@2024.02" , when = "@0.9" )
217220 depends_on ("raja@2022.03.0:2023.06" , when = "@0.7.0:0.8" )
218221 depends_on ("raja@0.14.0" , when = "@0.6.0" )
219222 depends_on ("raja@:0.13.0" , when = "@:0.5.0" )
@@ -226,7 +229,7 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
226229 depends_on ("caliper" , when = "+caliper" )
227230 with when ("+profiling" ):
228231 depends_on ("adiak" )
229- depends_on ("caliper" )
232+ depends_on ("caliper+adiak " )
230233
231234 depends_on ("caliper+cuda" , when = "+cuda" )
232235 depends_on ("caliper~cuda" , when = "~cuda" )
@@ -254,7 +257,6 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
254257 depends_on (f"umpire { ext_cuda_dep } " , when = f"+umpire { ext_cuda_dep } " )
255258 depends_on (f"caliper { ext_cuda_dep } " , when = f"+caliper { ext_cuda_dep } " )
256259 depends_on (f"caliper { ext_cuda_dep } " , when = f"+profiling { ext_cuda_dep } " )
257-
258260 depends_on (f"mfem { ext_cuda_dep } " , when = f"+mfem { ext_cuda_dep } " )
259261
260262 for val in ROCmPackage .amdgpu_targets :
@@ -415,11 +417,14 @@ def initconfig_compiler_entries(self):
415417 if spec .satisfies ("%cce" ):
416418 entries .append (cmake_cache_string ("CMAKE_CXX_FLAGS_DEBUG" , "-O1 -g" ))
417419
420+ # Remove unusable -Mfreeform flag injected by spack
421+ entries = [entry .replace ("-Mfreeform" , "" ) for entry in entries ]
422+
423+ # Disable intrusive warning:
424+ # icpx: remark: note that use of '-g' without any optimization-level
425+ # option will turn off most compiler optimizations similar to use of
426+ # '-O0'; use '-Rno-debug-disables-optimization' to disable this remark
418427 if spec .satisfies ("%oneapi" ):
419- # Disable intrusive warning:
420- # icpx: remark: note that use of '-g' without any optimization-level
421- # option will turn off most compiler optimizations similar to use of
422- # '-O0'; use '-Rno-debug-disables-optimization' to disable this remark
423428 entries .append (
424429 cmake_cache_string ("CMAKE_CXX_FLAGS_DEBUG" , "-g -Rno-debug-disables-optimization" )
425430 )
@@ -496,9 +501,8 @@ def initconfig_hardware_entries(self):
496501
497502 # Additional library path for cray compiler
498503 if spec .satisfies ("%cce" ):
499- hip_link_flags += "-L/opt/cray/pe/cce/{0}/cce/x86_64/lib -Wl,-rpath,/opt/cray/pe/cce/{0}/cce/x86_64/lib " .format (
500- spec .compiler .version
501- )
504+ lib_path = "/opt/cray/pe/cce/{0}/cce/x86_64/lib" .format (spec .compiler .version )
505+ hip_link_flags += "-L{0} -Wl,-rpath,{0}" .format (lib_path )
502506
503507 if spec .satisfies ("+fortran" ):
504508 link_remove_list = []
@@ -698,7 +702,7 @@ def initconfig_package_entries(self):
698702 else :
699703 entries .append (f"# { dep .upper ()} not built\n " )
700704
701- if spec .satisfies ("+umpire" ) and spec .satisfies ("^camp" ):
705+ if ( spec .satisfies ("+raja" ) or spec . satisfies ( "+ umpire") ) and spec .satisfies ("^camp" ):
702706 dep_dir = get_spec_path (spec , "camp" , path_replacements )
703707 entries .append (cmake_cache_path ("CAMP_DIR" , dep_dir ))
704708
@@ -750,7 +754,6 @@ def initconfig_package_entries(self):
750754 entries .append (cmake_cache_option ("ENABLE_CLANGFORMAT" , False ))
751755
752756 if spec .satisfies ("+python" ) or spec .satisfies ("+devtools" ):
753- # Get path to python executable
754757 python_bin_dir = get_spec_path (spec , "python" , path_replacements , use_bin = True )
755758 entries .append (cmake_cache_path ("Python_EXECUTABLE" , pjoin (python_bin_dir , "python3" )))
756759
@@ -837,7 +840,7 @@ def build_test(self):
837840 print ("Running Axom Unit Tests..." )
838841 make ("test" )
839842
840- @run_after ("install" )
843+ @run_after ("install" , when = "+examples" )
841844 @on_package_attributes (run_tests = True )
842845 def test_install_using_cmake (self ):
843846 """build example with cmake and run"""
@@ -853,7 +856,7 @@ def test_install_using_cmake(self):
853856 example ()
854857 make ("clean" )
855858
856- @run_after ("install" )
859+ @run_after ("install" , when = "+examples" )
857860 @on_package_attributes (run_tests = True )
858861 def test_install_using_make (self ):
859862 """build example with make and run"""
0 commit comments