Add check for Clang.

This commit is contained in:
Pavel Krajcevski 2013-03-11 14:51:32 -04:00
parent fa56d37080
commit cd17ddaa0b

View file

@ -145,7 +145,13 @@ IF( NOT HAS_INLINE_ASSEMBLY AND NOT HAS_INLINE_ASSEMBLY_WITH_FLAGS )
ENDIF()
# Check to see whether or not our compiler supports atomic operations
IF( CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX )
IF( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
SET( COMPILER_CLANG True )
ELSEIF( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" )
SET( COMPILER_GNU True )
ENDIF()
IF( COMPILER_CLANG OR COMPILER_GNU )
CHECK_CXX_SOURCE_RUNS("
int main() {