summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/ascent/package.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/ascent/package.py b/var/spack/repos/builtin/packages/ascent/package.py
index a8d2c245e0..4deae84ec1 100644
--- a/var/spack/repos/builtin/packages/ascent/package.py
+++ b/var/spack/repos/builtin/packages/ascent/package.py
@@ -352,6 +352,23 @@ class Ascent(Package, CudaPackage):
else:
cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "OFF"))
+ # use global spack compiler flags
+ cppflags = ' '.join(spec.compiler_flags['cppflags'])
+ if cppflags:
+ # avoid always ending up with ' ' with no flags defined
+ cppflags += ' '
+ cflags = cppflags + ' '.join(spec.compiler_flags['cflags'])
+ if cflags:
+ cfg.write(cmake_cache_entry("CMAKE_C_FLAGS", cflags))
+ cxxflags = cppflags + ' '.join(spec.compiler_flags['cxxflags'])
+ if cxxflags:
+ cfg.write(cmake_cache_entry("CMAKE_CXX_FLAGS", cxxflags))
+ fflags = ' '.join(spec.compiler_flags['fflags'])
+ if self.spec.satisfies('%cce'):
+ fflags += " -ef"
+ if fflags:
+ cfg.write(cmake_cache_entry("CMAKE_Fortran_FLAGS", fflags))
+
#######################
# Unit Tests
#######################