summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt3
-rw-r--r--src/CMakeLists.txt4
2 files changed, 3 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c85a5157..c2c27097 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -296,8 +296,7 @@ configure_file(
${PROJECT_SOURCE_DIR}/src/system.hh.in
${PROJECT_BINARY_DIR}/system.hh)
-if((CMAKE_CXX_COMPILER MATCHES "clang") OR
- (CMAKE_CXX_COMPILER MATCHES "clang\\+\\+"))
+if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9cd54dbe..06acecf2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -144,7 +144,7 @@ if (WIN32 OR CYGWIN)
endif()
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
- if (CMAKE_CXX_COMPILER MATCHES "clang\\+\\+")
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_definitions(
# -Weverything
# -Wno-disabled-macro-expansion
@@ -199,7 +199,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
DEPENDS ${_header_filename})
endmacro(ADD_PCH_RULE _header_filename _src_list _other_srcs)
- elseif (CMAKE_CXX_COMPILER MATCHES "g\\+\\+")
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(GXX_WARNING_FLAGS
-pedantic
-Wall