summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorNaram Qashat <cyberbotx@cyberbotx.com>2012-10-29 14:06:42 -0400
committerNaram Qashat <cyberbotx@cyberbotx.com>2012-10-29 14:06:42 -0400
commitca55e15d44c79b706b363157baf715bc92d7e3ac (patch)
tree6f6acfaed1b5987562416c77405b43c9b68af756 /CMakeLists.txt
parentbb5e4127d7930eb5877ff4984e6b52715987fc24 (diff)
Fix building under Mac OS X via Makefiles if not using an Xcode project. This is a hack but CMake currently provides no other way to determine if the detected C++ compiler was identified as Clang.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 359ad8045..16ffa164a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,7 +80,7 @@ set(DEFAULT_LIBRARY_DIRS)
set(DEFAULT_INCLUDE_DIRS)
# If we are using a GNU compiler (have to use CXX because it seems to fail on C), we will be able to determine it's default paths for libraries and includes
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# First look for the compiler's default library directories
execute_process(COMMAND ${CMAKE_C_COMPILER} -print-search-dirs OUTPUT_VARIABLE LINES OUTPUT_STRIP_TRAILING_WHITESPACE)
# Find only the part after "libraries: "
@@ -146,7 +146,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(DEFAULT_INCLUDE_DIRS)
remove_list_duplicates(DEFAULT_INCLUDE_DIRS)
endif(DEFAULT_INCLUDE_DIRS)
-endif(CMAKE_COMPILER_IS_GNUCXX)
+endif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# If we are using Visual Studio, locate the path of the Windows Server 2008 SDK or Windows Server 2003 Platform SDK, depending on which is installed
if(MSVC)