Skip to content

Commit

Permalink
Try compiler flag matching all *Clang
Browse files Browse the repository at this point in the history
  • Loading branch information
eisenhauer committed Aug 8, 2024
1 parent 65be4b9 commit d824b16
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions source/adios2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,15 @@ if (ADIOS2_HAVE_Derived_Variable)
DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/lexer.h)
ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp PROPERTIES COMPILE_FLAGS -Wno-sign-compare)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/parser.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-but-set-variable)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/parser.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-but-set-variable)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "IntelLLVM")
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/parser.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-but-set-variable)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
SET_SOURCE_FILES_PROPERTIES(toolkit/derived/Expression.cpp toolkit/derived/Function.cpp PROPERTIES COMPILE_FLAGS "/wd4005 /wd4065 /wd4267 -DYY_NO_UNISTD_H")
endif()
add_library(adios2_core_derived
Expand Down

0 comments on commit d824b16

Please sign in to comment.