diff options
author | Michael Dickens <mlk@alum.mit.edu> | 2018-12-06 13:33:00 -0500 |
---|---|---|
committer | Brent Stapleton <bstapleton@g.hmc.edu> | 2018-12-07 10:18:43 -0800 |
commit | dfcc8bc211ce9251b500d69744dca95fc70e6541 (patch) | |
tree | 21cde2f341ecb7caa4b125ca78f2bac8a7d10085 /host/CMakeLists.txt | |
parent | ba47770d84e4a463efc94a1c6f6e15284376e11b (diff) | |
download | uhd-dfcc8bc211ce9251b500d69744dca95fc70e6541.tar.gz uhd-dfcc8bc211ce9251b500d69744dca95fc70e6541.tar.bz2 uhd-dfcc8bc211ce9251b500d69744dca95fc70e6541.zip |
cmake: use "MATCHES" instead of "STREQUAL" for "Clang"
+ allows proper building with both AppleClang and native Clang.
Diffstat (limited to 'host/CMakeLists.txt')
-rw-r--r-- | host/CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index cfbc81d34..8515a5b53 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -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") |