From e1661ff662944965efa54713c5db592290b32eba Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Sat, 23 Jun 2018 17:55:33 +0530 Subject: [PATCH] omega-h: fix -std=c++11 build error (#8543) cd /tmp/balay/spack-stage/spack-stage-joxtpr/omega_h-9.13.4/spack-build/src && /home/balay/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/openmpi-3.1.0-7ws4tgx4z3o ru5g5skjrxs5sobpeiyef/bin/mpic++ -Domega_h_EXPORTS -I/home/balay/spack/var/spack/stage/omega-h-9.13.4-th4b67fz5es6cbgcar742jxamjt3tqjb/omega_h-9.13.4/src -I/tmp/bala y/spack-stage/spack-stage-joxtpr/omega_h-9.13.4/spack-build/src -I/home/balay/spack/var/spack/stage/omega-h-9.13.4-th4b67fz5es6cbgcar742jxamjt3tqjb/omega_h-9.13.4/tpl -I/home/balay/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/zlib-1.2.11-5nus6knzumx4ik2yl44jxtgtsl7d54xb/include -O2 -g -DNDEBUG -fPIC -o CMakeFiles/omega_h.di r/Omega_h_map.cpp.o -c /home/balay/spack/var/spack/stage/omega-h-9.13.4-th4b67fz5es6cbgcar742jxamjt3tqjb/omega_h-9.13.4/src/Omega_h_map.cpp In file included from /usr/include/c++/5/chrono:35:0, from /home/balay/spack/var/spack/stage/omega-h-9.13.4-th4b67fz5es6cbgcar742jxamjt3tqjb/omega_h-9.13.4/src/Omega_h_timer.hpp:4, from /home/balay/spack/var/spack/stage/omega-h-9.13.4-th4b67fz5es6cbgcar742jxamjt3tqjb/omega_h-9.13.4/src/Omega_h_timer.cpp:1: /usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options. #error This file requires compiler and library support \ ^ --- var/spack/repos/builtin/packages/omega-h/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/omega-h/package.py b/var/spack/repos/builtin/packages/omega-h/package.py index 89d9223750..5eb7f47546 100644 --- a/var/spack/repos/builtin/packages/omega-h/package.py +++ b/var/spack/repos/builtin/packages/omega-h/package.py @@ -65,3 +65,9 @@ def cmake_args(self): else: args.append('-DTPL_ENABLE_ZLIB:BOOL=OFF') return args + + def flag_handler(self, name, flags): + flags = list(flags) + if name == 'cxxflags': + flags.append(self.compiler.cxx11_flag) + return (None, None, flags)