aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Dickens <michael.dickens@ettus.com>2016-03-02 11:57:55 -0500
committerMichael Dickens <michael.dickens@ettus.com>2016-03-02 11:57:55 -0500
commitfdc2abb088d3b1c7499c6b66591f436a855b3c77 (patch)
tree637912eba197aebe2d0553c9a264b4e0be04f1cc
parentb6cecf3e6ecfd4c6e93e1106c9d428a39603db2b (diff)
downloaduhd-fdc2abb088d3b1c7499c6b66591f436a855b3c77.tar.gz
uhd-fdc2abb088d3b1c7499c6b66591f436a855b3c77.tar.bz2
uhd-fdc2abb088d3b1c7499c6b66591f436a855b3c77.zip
cmake: add compiler support for Clang.
-rw-r--r--host/CMakeLists.txt5
1 files 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)