diff options
author | Chris White <white238@llnl.gov> | 2020-08-12 18:15:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-12 20:15:59 -0500 |
commit | 105caa729709ab8ebfac65a26da03861353bbd1a (patch) | |
tree | 9d2149d9af3d9dba5e7764aa30194b5f160d6df8 | |
parent | fa216e5f153f0529c902ecf34fc906338ea9632a (diff) | |
download | spack-105caa729709ab8ebfac65a26da03861353bbd1a.tar.gz spack-105caa729709ab8ebfac65a26da03861353bbd1a.tar.bz2 spack-105caa729709ab8ebfac65a26da03861353bbd1a.tar.xz spack-105caa729709ab8ebfac65a26da03861353bbd1a.zip |
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
-rw-r--r-- | lib/spack/spack/version.py | 2 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/axom/package.py | 26 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/conduit/package.py | 11 |
3 files changed, 28 insertions, 11 deletions
diff --git a/lib/spack/spack/version.py b/lib/spack/spack/version.py index 0c7399c3fb..44e03edb5c 100644 --- a/lib/spack/spack/version.py +++ b/lib/spack/spack/version.py @@ -40,7 +40,7 @@ __all__ = ['Version', 'VersionRange', 'VersionList', 'ver'] VALID_VERSION = r'[A-Za-z0-9_.-]' # 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): diff --git a/var/spack/repos/builtin/packages/axom/package.py b/var/spack/repos/builtin/packages/axom/package.py index a4e954711a..2bb6500cf1 100644 --- a/var/spack/repos/builtin/packages/axom/package.py +++ b/var/spack/repos/builtin/packages/axom/package.py @@ -51,7 +51,7 @@ class Axom(CMakePackage, CudaPackage): homepage = "https://github.com/LLNL/axom" 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('0.3.3', tag='v0.3.3', submodules="True") version('0.3.2', tag='v0.3.2', submodules="True") @@ -65,6 +65,8 @@ class Axom(CMakePackage, CudaPackage): # ----------------------------------------------------------------------- # Variants # ----------------------------------------------------------------------- + variant('shared', default=True, + description='Enable build of shared libraries') variant('debug', default=False, description='Build debug instead of optimized version') @@ -96,12 +98,10 @@ class Axom(CMakePackage, CudaPackage): depends_on("mpi", when="+mpi") # Libraries - depends_on("conduit~shared+python", when="+python") - depends_on("conduit~shared~python", when="~python") - depends_on("conduit~shared+python+hdf5", when="+hdf5+python") - depends_on("conduit~shared+python~hdf5", when="~hdf5+python") - depends_on("conduit~shared~python+hdf5", when="+hdf5~python") - depends_on("conduit~shared~python~hdf5", when="~hdf5~python") + depends_on("conduit+python", when="+python") + depends_on("conduit~python", when="~python") + depends_on("conduit+hdf5", when="+hdf5") + depends_on("conduit~hdf5", when="~hdf5") # HDF5 needs to be the same as Conduit's depends_on("hdf5@1.8.19:1.8.999~mpi~cxx~shared~fortran", when="+hdf5") @@ -471,6 +471,11 @@ class Axom(CMakePackage, CudaPackage): linker_flags = "${BLT_EXE_LINKER_FLAGS} -Wl,-rpath," + libdir cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", 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: cfg.write("#------------------{0}\n".format("-" * 60)) @@ -530,10 +535,17 @@ class Axom(CMakePackage, CudaPackage): options = [] options.extend(['-C', host_config_path]) + if self.run_tests is False: options.append('-DENABLE_TESTS=OFF') else: options.append('-DENABLE_TESTS=ON') + + if "+shared" in spec: + options.append('-DBUILD_SHARED_LIBS=ON') + else: + options.append('-DBUILD_SHARED_LIBS=OFF') + return options @run_after('install') diff --git a/var/spack/repos/builtin/packages/conduit/package.py b/var/spack/repos/builtin/packages/conduit/package.py index 55515de9fb..8aae3db8b2 100644 --- a/var/spack/repos/builtin/packages/conduit/package.py +++ b/var/spack/repos/builtin/packages/conduit/package.py @@ -408,7 +408,7 @@ class Conduit(Package): cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER_ID", "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 flags = "-WF,-C! -qxlf2003=polymorphic" cfg.write(cmake_cache_entry("BLT_FORTRAN_FLAGS", @@ -416,10 +416,15 @@ class Conduit(Package): # Grab lib directory for the current fortran compiler libdir = os.path.join(os.path.dirname( os.path.dirname(f_compiler)), "lib") - flags = "${BLT_EXE_LINKER_FLAGS} -lstdc++ " - flags += "-Wl,-rpath,{0} -Wl,-rpath,{0}64".format(libdir) + rpaths = "-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", flags)) + if "+shared" in spec: + flags = "${CMAKE_SHARED_LINKER_FLAGS} " + rpaths + cfg.write(cmake_cache_entry( + "CMAKE_SHARED_LINKER_FLAGS", flags)) ####################### # Python |