From b82ad6e8fc2b79ca0d29e5b865b24680c8ac61b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Wed, 13 Jan 2021 23:50:19 +0100 Subject: [PATCH] #1173: CI: avoid unsupported flags when compiling with icc --- lib/libfort/CMakeLists.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/libfort/CMakeLists.txt b/lib/libfort/CMakeLists.txt index 2c2cb3a3f5..f9770b74dd 100644 --- a/lib/libfort/CMakeLists.txt +++ b/lib/libfort/CMakeLists.txt @@ -52,16 +52,20 @@ else() set(ADDITIONAL_WARNINGS "\ -Wall \ -Wextra \ - -Wdouble-promotion \ -Wshadow \ -Wformat=2 \ -Wno-variadic-macros \ - -Wcast-align \ -Wstrict-aliasing=2 \ - -Wstrict-overflow=5 \ -Wfloat-equal \ -Wwrite-strings \ ") + if(NOT "${FORT_COMPILER}" STREQUAL "Intel") + set(ADDITIONAL_WARNINGS "${ADDITIONAL_WARNINGS} \ + -Wdouble-promotion \ + -Wcast-align \ + -Wstrict-overflow=5 \ + ") + endif() #Supress if("${FORT_COMPILER}" STREQUAL "Intel") set(ADDITIONAL_WARNINGS "${ADDITIONAL_WARNINGS} \ @@ -75,7 +79,10 @@ else() -Wlogical-op") endif() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ADDITIONAL_WARNINGS} -Wpedantic") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ADDITIONAL_WARNINGS}") + if(NOT "${FORT_COMPILER}" STREQUAL "Intel") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpedantic") + endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ADDITIONAL_WARNINGS}") endif()