Skip to content

Commit

Permalink
#1173: CI: avoid unsupported flags when compiling with icc
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Jan 13, 2021
1 parent 43da34d commit b82ad6e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions lib/libfort/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand All @@ -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()

Expand Down

0 comments on commit b82ad6e

Please sign in to comment.