diff options
author | Brian Van Essen <vanessen1@llnl.gov> | 2022-04-11 23:56:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-12 08:56:48 +0200 |
commit | 433d404a93f6ea810ac62eade72d4245fc600974 (patch) | |
tree | ea8496860cce29804cafc6f94e51ea51b5fa71e8 /var | |
parent | 8d567289844061df13fec9939bdadfd32a3b1f0f (diff) | |
download | spack-433d404a93f6ea810ac62eade72d4245fc600974.tar.gz spack-433d404a93f6ea810ac62eade72d4245fc600974.tar.bz2 spack-433d404a93f6ea810ac62eade72d4245fc600974.tar.xz spack-433d404a93f6ea810ac62eade72d4245fc600974.zip |
lbann (and related stack): avoid bug in cmake 3.23.0 (#30019)
Diffstat (limited to 'var')
4 files changed, 20 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/aluminum/package.py b/var/spack/repos/builtin/packages/aluminum/package.py index 1fb57efac9..698b781de1 100644 --- a/var/spack/repos/builtin/packages/aluminum/package.py +++ b/var/spack/repos/builtin/packages/aluminum/package.py @@ -62,11 +62,15 @@ class Aluminum(CMakePackage, CudaPackage, ROCmPackage): spec = self.spec args = [ '-DCMAKE_CXX_STANDARD:STRING=17', - '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DALUMINUM_ENABLE_CUDA:BOOL=%s' % ('+cuda' in spec), '-DALUMINUM_ENABLE_NCCL:BOOL=%s' % ('+nccl' in spec or '+rccl' in spec), '-DALUMINUM_ENABLE_ROCM:BOOL=%s' % ('+rocm' in spec)] + if not spec.satisfies('^cmake@3.23.0'): + # There is a bug with using Ninja generator in this version + # of CMake + args.append('-DCMAKE_EXPORT_COMPILE_COMMANDS=ON') + if '+cuda' in spec: if self.spec.satisfies('%clang'): for flag in self.spec.compiler_flags['cxxflags']: diff --git a/var/spack/repos/builtin/packages/dihydrogen/package.py b/var/spack/repos/builtin/packages/dihydrogen/package.py index 20bfb05b4f..42e84b06ee 100644 --- a/var/spack/repos/builtin/packages/dihydrogen/package.py +++ b/var/spack/repos/builtin/packages/dihydrogen/package.py @@ -141,7 +141,6 @@ class Dihydrogen(CMakePackage, CudaPackage, ROCmPackage): args = [ '-DCMAKE_CXX_STANDARD=17', - '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DCMAKE_INSTALL_MESSAGE:STRING=LAZY', '-DBUILD_SHARED_LIBS:BOOL=%s' % ('+shared' in spec), '-DH2_ENABLE_ALUMINUM=%s' % ('+al' in spec), @@ -153,6 +152,11 @@ class Dihydrogen(CMakePackage, CudaPackage, ROCmPackage): '-DH2_DEVELOPER_BUILD=%s' % ('+developer' in spec), ] + if not spec.satisfies('^cmake@3.23.0'): + # There is a bug with using Ninja generator in this version + # of CMake + args.append('-DCMAKE_EXPORT_COMPILE_COMMANDS=ON') + if '+cuda' in spec: if self.spec.satisfies('%clang'): for flag in self.spec.compiler_flags['cxxflags']: diff --git a/var/spack/repos/builtin/packages/hydrogen/package.py b/var/spack/repos/builtin/packages/hydrogen/package.py index 9dd14c001d..1ed9fb2c69 100644 --- a/var/spack/repos/builtin/packages/hydrogen/package.py +++ b/var/spack/repos/builtin/packages/hydrogen/package.py @@ -149,7 +149,6 @@ class Hydrogen(CMakePackage, CudaPackage, ROCmPackage): args = [ '-DCMAKE_CXX_STANDARD=17', - '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DCMAKE_INSTALL_MESSAGE:STRING=LAZY', '-DBUILD_SHARED_LIBS:BOOL=%s' % ('+shared' in spec), '-DHydrogen_ENABLE_OPENMP:BOOL=%s' % ('+openmp' in spec), @@ -167,6 +166,11 @@ class Hydrogen(CMakePackage, CudaPackage, ROCmPackage): '-DHydrogen_ENABLE_GPU_FP16=%s' % enable_gpu_fp16, ] + if not spec.satisfies('^cmake@3.23.0'): + # There is a bug with using Ninja generator in this version + # of CMake + args.append('-DCMAKE_EXPORT_COMPILE_COMMANDS=ON') + if '+cuda' in spec: if self.spec.satisfies('%clang'): for flag in self.spec.compiler_flags['cxxflags']: diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py index 6b30b920e9..45b99fc78f 100644 --- a/var/spack/repos/builtin/packages/lbann/package.py +++ b/var/spack/repos/builtin/packages/lbann/package.py @@ -289,7 +289,6 @@ class Lbann(CMakePackage, CudaPackage, ROCmPackage): args = self.common_config_args args.extend([ '-DCMAKE_CXX_STANDARD=17', - '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DLBANN_WITH_CNPY=%s' % ('+numpy' in spec), '-DLBANN_DETERMINISTIC:BOOL=%s' % ('+deterministic' in spec), '-DLBANN_WITH_HWLOC=%s' % ('+hwloc' in spec), @@ -313,6 +312,11 @@ class Lbann(CMakePackage, CudaPackage, ROCmPackage): '-DProtobuf_DIR={0}'.format(spec['protobuf'].prefix), '-Dprotobuf_MODULE_COMPATIBLE=ON']) + if not spec.satisfies('^cmake@3.23.0'): + # There is a bug with using Ninja generator in this version + # of CMake + args.append('-DCMAKE_EXPORT_COMPILE_COMMANDS=ON') + if '+cuda' in spec: if self.spec.satisfies('%clang'): for flag in self.spec.compiler_flags['cxxflags']: |