issue 352 clang is like gcc for cmake purposes

After ohauer

https://github.com/warmcat/libwebsockets/issues/352

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2015-11-29 18:52:37 +08:00
parent c78fe91564
commit b39c22fc38

View file

@ -474,7 +474,7 @@ if (UNIX)
endif()
endif()
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_C_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
include (CheckCCompilerFlag)
CHECK_C_COMPILER_FLAG(-fvisibility=hidden LWS_HAVE_VISIBILITY)
if (LWS_HAVE_VISIBILITY)
@ -541,7 +541,7 @@ endif()
# Set the so version of the lib.
# Equivalent to LDFLAGS=-version-info x:x:x
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_C_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
foreach(lib ${LWS_LIBRARIES})
set_target_properties(${lib}
PROPERTIES