From 6ac8cf8126ed4044ae7b99cf28513059ae0c5652 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Fri, 22 May 2020 16:07:59 -0400 Subject: [PATCH] IWYU: fix 0.14 build (#16761) * IWYU: fix 0.14 build The CMake patch used for 0.13 hadn't been applied to the master when 0.14 was released, and this version of IWYU requires C++14 or higher. * Flake8 --- var/spack/repos/builtin/packages/iwyu/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/iwyu/package.py b/var/spack/repos/builtin/packages/iwyu/package.py index 4e0b45a5a0..eaf0a57913 100644 --- a/var/spack/repos/builtin/packages/iwyu/package.py +++ b/var/spack/repos/builtin/packages/iwyu/package.py @@ -21,9 +21,14 @@ class Iwyu(CMakePackage): version('0.12', sha256='a5892fb0abccb820c394e4e245c00ef30fc94e4ae58a048b23f94047c0816025') version('0.11', sha256='2d2877726c4aed9518cbb37673ffbc2b7da9c239bf8fe29432da35c1c0ec367a') - patch('iwyu-013-cmake.patch', when='@0.13') + patch('iwyu-013-cmake.patch', when='@0.13:0.14') depends_on('llvm+clang@10.0:10.999', when='@0.14') depends_on('llvm+clang@9.0:9.999', when='@0.13') depends_on('llvm+clang@8.0:8.999', when='@0.12') depends_on('llvm+clang@7.0:7.999', when='@0.11') + + @when('@0.14:') + def cmake_args(self): + return [self.define('CMAKE_CXX_STANDARD', 14), + self.define('CMAKE_CXX_EXTENSIONS', False)]