cmake: Move cxx11 flags for fujitsu into the flag_handler method (#12056)
* cmake: Move cxx11 flags for fujitsu into the flag_handler method * cmake: sanitization and error checking in flag_handler * cmake: Fix fujitsu flag check from 'fc' to 'fj'
This commit is contained in:
parent
8cef81363c
commit
69c302f455
@ -111,11 +111,16 @@ class Cmake(Package):
|
|||||||
|
|
||||||
phases = ['bootstrap', 'build', 'install']
|
phases = ['bootstrap', 'build', 'install']
|
||||||
|
|
||||||
def setup_environment(self, spack_env, run_env):
|
def flag_handler(self, name, flags):
|
||||||
if self.compiler.name == 'fj' \
|
if name == 'cxxflags' and self.compiler.name == 'fj':
|
||||||
and self.compiler.cxx11_flag \
|
cxx11plus_flags = (self.compiler.cxx11_flag,
|
||||||
not in self.spec.compiler_flags['cxxflags']:
|
self.compiler.cxx14_flag)
|
||||||
spack_env.append_flags('CXXFLAGS', self.compiler.cxx11_flag)
|
cxxpre11_flags = (self.cxx98_flags)
|
||||||
|
if any(f in flags for f in cxxpre11_flags):
|
||||||
|
raise ValueError('cannot build cmake pre-c++11 standard')
|
||||||
|
elif not any(f in flags for f in cxx11plus_flags):
|
||||||
|
flags.append(self.compiler.cxx11_flag)
|
||||||
|
return (flags, None, None)
|
||||||
|
|
||||||
def bootstrap_args(self):
|
def bootstrap_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
|
Loading…
Reference in New Issue
Block a user