From 1d75c8be73e5e78220498b182c629c46d7e524af Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Fri, 23 Jan 2015 17:25:44 -0800 Subject: [PATCH] Improve compatibility with CMake 3.0 and later CMake 3.0 changed the identifier for Apple-supplied Clang to AppleClang. CMake 3.1 changed the behavior of variable expansion in quoted strings and complains with warning CMP0054 twice without these changes. BUG=crbug.com/451610 Change-Id: I0f1514ec302cf5f1b5cfc2c5a1c71c9e20d5e855 Reviewed-on: https://boringssl-review.googlesource.com/3011 Reviewed-by: Adam Langley --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4127fe6..f19fff09 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 2.8.10) project (BoringSSL) -if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -ggdb") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -ggdb -std=c++0x") elseif(MSVC) @@ -11,8 +11,8 @@ elseif(MSVC) set(CMAKE_CXX_FLAGS "/wd4267") endif() -if((CMAKE_COMPILER_IS_GNUCXX AND ${CMAKE_C_COMPILER_VERSION} VERSION_GREATER "4.5.99") OR - "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +if((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_C_COMPILER_VERSION VERSION_GREATER "4.5.99") OR + CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow") endif()