From d824b168cf08a82ecc282793bf84e3c36117f8ba Mon Sep 17 00:00:00 2001 From: Greg Eisenhauer Date: Thu, 8 Aug 2024 10:59:19 -0400 Subject: [PATCH] Try compiler flag matching all *Clang --- source/adios2/CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/adios2/CMakeLists.txt b/source/adios2/CMakeLists.txt index 54ae2861d9..d3e9ed6caf 100644 --- a/source/adios2/CMakeLists.txt +++ b/source/adios2/CMakeLists.txt @@ -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