From fce03995d84337b15d29532a982c2cb43c048ff7 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Mon, 18 Jan 2021 20:01:10 +0300 Subject: [PATCH] Fix Clang detection: the correct compiler id for clang on macos is AppleClang, not Clang --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec616b0c..2b084066 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ if(PSEMEK_BUILD_TYPE STREQUAL "DEBUG") endif() set(PSEMEK_CXX_FLAGS) -if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) +if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")) list(APPEND PSEMEK_CXX_FLAGS -Wall -Werror -Wextra -pedantic -Wno-narrowing -Wno-sign-compare) endif() if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU")) @@ -20,7 +20,7 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU")) list(APPEND PSEMEK_CXX_FLAGS -Wno-maybe-uninitialized) endif() if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) - # gives false-positive on audio::engine::impl::~impl + # -Wdtor-name gives false-positive on audio::engine::impl::~impl list(APPEND PSEMEK_CXX_FLAGS -Wno-dtor-name) endif()