From 0c421589e61a7a671ac4d10adc9e923d079dc38c Mon Sep 17 00:00:00 2001 From: t-karatsu <49965247+t-karatsu@users.noreply.github.com> Date: Sat, 31 Aug 2019 01:25:34 +0900 Subject: [PATCH] Fujitsu compiler: Add flags for c11/c99 (#12622) * Fujitsu compiler: Add flags for c11/c99 * Add unit tests about supported flags --- lib/spack/spack/compilers/fj.py | 8 ++++++++ lib/spack/spack/test/compilers.py | 2 ++ 2 files changed, 10 insertions(+) diff --git a/lib/spack/spack/compilers/fj.py b/lib/spack/spack/compilers/fj.py index 3f378746b7..d052779072 100644 --- a/lib/spack/spack/compilers/fj.py +++ b/lib/spack/spack/compilers/fj.py @@ -44,6 +44,14 @@ def cxx11_flag(self): def cxx14_flag(self): return "-std=c++14" + @property + def c99_flag(self): + return "-std=c99" + + @property + def c11_flag(self): + return "-std=c11" + @property def pic_flag(self): return "-KPIC" diff --git a/lib/spack/spack/test/compilers.py b/lib/spack/spack/test/compilers.py index f34b9ceb5a..39b44fbcb9 100644 --- a/lib/spack/spack/test/compilers.py +++ b/lib/spack/spack/test/compilers.py @@ -303,6 +303,8 @@ def test_fj_flags(): supported_flag_test("cxx98_flag", "-std=c++98", "fj@4.0.0") supported_flag_test("cxx11_flag", "-std=c++11", "fj@4.0.0") supported_flag_test("cxx14_flag", "-std=c++14", "fj@4.0.0") + supported_flag_test("c99_flag", "-std=c99", "fj@4.0.0") + supported_flag_test("c11_flag", "-std=c11", "fj@4.0.0") supported_flag_test("pic_flag", "-KPIC", "fj@4.0.0")