From fdc2abb088d3b1c7499c6b66591f436a855b3c77 Mon Sep 17 00:00:00 2001 From: Michael Dickens Date: Wed, 2 Mar 2016 11:57:55 -0500 Subject: cmake: add compiler support for Clang. --- host/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index d3ae2b71c..46615bd19 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -134,7 +134,8 @@ SET(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "") #force UHD_RELEASE_MODE to be a string for cmake-gui SET(UHD_RELEASE_MODE "${UHD_RELEASE_MODE}" CACHE STRING "UHD Release Mode") -IF(CMAKE_COMPILER_IS_GNUCXX) +IF(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" OR + ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") IF(STRIP_BINARIES) IF(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s") @@ -151,7 +152,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX) UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN) UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-fvisibility-inlines-hidden HAVE_VISIBILITY_INLINES_HIDDEN) ENDIF(NOT WIN32) -ENDIF(CMAKE_COMPILER_IS_GNUCXX) +ENDIF() IF(MSVC) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/cmake/msvc) -- cgit v1.2.3