From cb0514042c8fdf407dd44b228d51b6a94d881526 Mon Sep 17 00:00:00 2001
From: Soeren Peters <peters@irmb.tu-bs.de>
Date: Fri, 23 Oct 2020 12:51:26 +0200
Subject: [PATCH] Changed AppleClang no warning flag from no-reorder-ctor to
 no-reorder. Disable unroll-all-loops for GNU when IWYU is enabled. Fixed
 Cycle in include-mapping.

---
 CMake/compilerflags/AppleClang.cmake                   | 2 +-
 CMake/compilerflags/GNU.cmake                          | 4 +++-
 src/cpu/VirtualFluidsCore/LBM/InterpolationProcessor.h | 5 ++---
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/CMake/compilerflags/AppleClang.cmake b/CMake/compilerflags/AppleClang.cmake
index 1887de8bf..aecc48fa5 100644
--- a/CMake/compilerflags/AppleClang.cmake
+++ b/CMake/compilerflags/AppleClang.cmake
@@ -19,4 +19,4 @@ list(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-Wall")
 list(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-Wunreachable-code")
 
 list(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-Wno-unused-function")
-list(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-Wno-reorder-ctor")
+list(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-Wno-reorder")
diff --git a/CMake/compilerflags/GNU.cmake b/CMake/compilerflags/GNU.cmake
index 8f932429c..bd69600c6 100644
--- a/CMake/compilerflags/GNU.cmake
+++ b/CMake/compilerflags/GNU.cmake
@@ -11,8 +11,10 @@ list(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS_RELEASE "-O3") # optimizat
 
 # all
 list(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-fPIC") # position independent code for shared libraries
-LIST(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-funroll-all-loops")
 
+if(NOT BUILD_VF_INCLUDE_WHAT_YOU_USE) # optimization flag '-funroll-all-loops' is not supported for IWYU
+    LIST(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-funroll-all-loops")
+endif()
 
 #############################################################################################################
 # warnings
diff --git a/src/cpu/VirtualFluidsCore/LBM/InterpolationProcessor.h b/src/cpu/VirtualFluidsCore/LBM/InterpolationProcessor.h
index b3de5c873..627549dc9 100644
--- a/src/cpu/VirtualFluidsCore/LBM/InterpolationProcessor.h
+++ b/src/cpu/VirtualFluidsCore/LBM/InterpolationProcessor.h
@@ -1,10 +1,9 @@
-#ifndef D3Q27INTRPOLATIOPROCESSOR_H_
-#define D3Q27INTRPOLATIOPROCESSOR_H_
+#ifndef INTERPOLATIONPROCESSOR_H
+#define INTERPOLATIONPROCESSOR_H
 
 #include "BCArray3D.h"
 #include "BoundaryConditions.h"
 #include "DistributionArray3D.h"
-#include "InterpolationProcessor.h"
 #include "LBMSystem.h"
 
 struct D3Q27ICell {
-- 
GitLab