Axom + Conduit updates (#17863)
* Loosen Axom's variants, add shared variant for axom, fix clang/xlf rpath'ing problem on blueos * Fix flake8 * Add main branch to list of known git branches
This commit is contained in:
parent
fa216e5f15
commit
105caa7297
@ -40,7 +40,7 @@
|
|||||||
VALID_VERSION = r'[A-Za-z0-9_.-]'
|
VALID_VERSION = r'[A-Za-z0-9_.-]'
|
||||||
|
|
||||||
# Infinity-like versions. The order in the list implies the comparison rules
|
# Infinity-like versions. The order in the list implies the comparison rules
|
||||||
infinity_versions = ['develop', 'master', 'head', 'trunk']
|
infinity_versions = ['develop', 'main', 'master', 'head', 'trunk']
|
||||||
|
|
||||||
|
|
||||||
def int_if_int(string):
|
def int_if_int(string):
|
||||||
|
@ -51,7 +51,7 @@ class Axom(CMakePackage, CudaPackage):
|
|||||||
homepage = "https://github.com/LLNL/axom"
|
homepage = "https://github.com/LLNL/axom"
|
||||||
git = "https://github.com/LLNL/axom.git"
|
git = "https://github.com/LLNL/axom.git"
|
||||||
|
|
||||||
version('master', branch='master', submodules=True)
|
version('main', branch='main', submodules=True)
|
||||||
version('develop', branch='develop', submodules=True)
|
version('develop', branch='develop', submodules=True)
|
||||||
version('0.3.3', tag='v0.3.3', submodules="True")
|
version('0.3.3', tag='v0.3.3', submodules="True")
|
||||||
version('0.3.2', tag='v0.3.2', submodules="True")
|
version('0.3.2', tag='v0.3.2', submodules="True")
|
||||||
@ -65,6 +65,8 @@ class Axom(CMakePackage, CudaPackage):
|
|||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
# Variants
|
# Variants
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
|
variant('shared', default=True,
|
||||||
|
description='Enable build of shared libraries')
|
||||||
variant('debug', default=False,
|
variant('debug', default=False,
|
||||||
description='Build debug instead of optimized version')
|
description='Build debug instead of optimized version')
|
||||||
|
|
||||||
@ -96,12 +98,10 @@ class Axom(CMakePackage, CudaPackage):
|
|||||||
depends_on("mpi", when="+mpi")
|
depends_on("mpi", when="+mpi")
|
||||||
|
|
||||||
# Libraries
|
# Libraries
|
||||||
depends_on("conduit~shared+python", when="+python")
|
depends_on("conduit+python", when="+python")
|
||||||
depends_on("conduit~shared~python", when="~python")
|
depends_on("conduit~python", when="~python")
|
||||||
depends_on("conduit~shared+python+hdf5", when="+hdf5+python")
|
depends_on("conduit+hdf5", when="+hdf5")
|
||||||
depends_on("conduit~shared+python~hdf5", when="~hdf5+python")
|
depends_on("conduit~hdf5", when="~hdf5")
|
||||||
depends_on("conduit~shared~python+hdf5", when="+hdf5~python")
|
|
||||||
depends_on("conduit~shared~python~hdf5", when="~hdf5~python")
|
|
||||||
|
|
||||||
# HDF5 needs to be the same as Conduit's
|
# HDF5 needs to be the same as Conduit's
|
||||||
depends_on("hdf5@1.8.19:1.8.999~mpi~cxx~shared~fortran", when="+hdf5")
|
depends_on("hdf5@1.8.19:1.8.999~mpi~cxx~shared~fortran", when="+hdf5")
|
||||||
@ -471,6 +471,11 @@ def hostconfig(self, spec, prefix):
|
|||||||
linker_flags = "${BLT_EXE_LINKER_FLAGS} -Wl,-rpath," + libdir
|
linker_flags = "${BLT_EXE_LINKER_FLAGS} -Wl,-rpath," + libdir
|
||||||
cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS",
|
cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS",
|
||||||
linker_flags, description))
|
linker_flags, description))
|
||||||
|
if "+shared" in spec:
|
||||||
|
linker_flags = "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath," \
|
||||||
|
+ libdir
|
||||||
|
cfg.write(cmake_cache_entry("CMAKE_SHARED_LINKER_FLAGS",
|
||||||
|
linker_flags, description))
|
||||||
|
|
||||||
if "+cuda" in spec:
|
if "+cuda" in spec:
|
||||||
cfg.write("#------------------{0}\n".format("-" * 60))
|
cfg.write("#------------------{0}\n".format("-" * 60))
|
||||||
@ -530,10 +535,17 @@ def cmake_args(self):
|
|||||||
|
|
||||||
options = []
|
options = []
|
||||||
options.extend(['-C', host_config_path])
|
options.extend(['-C', host_config_path])
|
||||||
|
|
||||||
if self.run_tests is False:
|
if self.run_tests is False:
|
||||||
options.append('-DENABLE_TESTS=OFF')
|
options.append('-DENABLE_TESTS=OFF')
|
||||||
else:
|
else:
|
||||||
options.append('-DENABLE_TESTS=ON')
|
options.append('-DENABLE_TESTS=ON')
|
||||||
|
|
||||||
|
if "+shared" in spec:
|
||||||
|
options.append('-DBUILD_SHARED_LIBS=ON')
|
||||||
|
else:
|
||||||
|
options.append('-DBUILD_SHARED_LIBS=OFF')
|
||||||
|
|
||||||
return options
|
return options
|
||||||
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
|
@ -408,7 +408,7 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
|
|||||||
cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER_ID",
|
cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER_ID",
|
||||||
"XL"))
|
"XL"))
|
||||||
|
|
||||||
if 'xl@coral' in os.getenv('SPACK_COMPILER_SPEC', ""):
|
if (f_compiler is not None) and ("xlf" in f_compiler):
|
||||||
# Fix missing std linker flag in xlc compiler
|
# Fix missing std linker flag in xlc compiler
|
||||||
flags = "-WF,-C! -qxlf2003=polymorphic"
|
flags = "-WF,-C! -qxlf2003=polymorphic"
|
||||||
cfg.write(cmake_cache_entry("BLT_FORTRAN_FLAGS",
|
cfg.write(cmake_cache_entry("BLT_FORTRAN_FLAGS",
|
||||||
@ -416,10 +416,15 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
|
|||||||
# Grab lib directory for the current fortran compiler
|
# Grab lib directory for the current fortran compiler
|
||||||
libdir = os.path.join(os.path.dirname(
|
libdir = os.path.join(os.path.dirname(
|
||||||
os.path.dirname(f_compiler)), "lib")
|
os.path.dirname(f_compiler)), "lib")
|
||||||
flags = "${BLT_EXE_LINKER_FLAGS} -lstdc++ "
|
rpaths = "-Wl,-rpath,{0} -Wl,-rpath,{0}64".format(libdir)
|
||||||
flags += "-Wl,-rpath,{0} -Wl,-rpath,{0}64".format(libdir)
|
|
||||||
|
flags = "${BLT_EXE_LINKER_FLAGS} -lstdc++ " + rpaths
|
||||||
cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS",
|
cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS",
|
||||||
flags))
|
flags))
|
||||||
|
if "+shared" in spec:
|
||||||
|
flags = "${CMAKE_SHARED_LINKER_FLAGS} " + rpaths
|
||||||
|
cfg.write(cmake_cache_entry(
|
||||||
|
"CMAKE_SHARED_LINKER_FLAGS", flags))
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
# Python
|
# Python
|
||||||
|
Loading…
Reference in New Issue
Block a user