Commit eef30434 authored by Michael Dickens's avatar Michael Dickens Committed by michael-west

cmake: use "MATCHES" instead of "STREQUAL" for "Clang"

+ allows proper building with both AppleClang and native Clang.
parent 8756224e
......@@ -47,7 +47,7 @@ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
message(WARNING "\nCannot determine the version of the compiler selected to build UHD (GCC : ${CMAKE_CXX_COMPILER}). This build may or not work. We highly recommend using GCC version ${GCC_MIN_VERSION} or more recent.")
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og")
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
execute_process(COMMAND
${CMAKE_CXX_COMPILER} -v
RESULT_VARIABLE res ERROR_VARIABLE err
......@@ -83,7 +83,7 @@ endif()
if(CMAKE_VERSION VERSION_LESS "3.1")
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}")
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
if("${IS_APPLE}" STREQUAL "")
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
else()
......@@ -229,7 +229,7 @@ set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "")
set(UHD_RELEASE_MODE "${UHD_RELEASE_MODE}" CACHE STRING "UHD Release Mode")
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" OR
${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
if(STRIP_BINARIES)
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment