Add workaround for failing clang build
authorsfan5 <sfan5@live.de>
Sat, 6 Dec 2014 18:36:40 +0000 (19:36 +0100)
committersfan5 <sfan5@live.de>
Sat, 6 Dec 2014 18:56:31 +0000 (19:56 +0100)
src/CMakeLists.txt

index 98a2f5a94ac0f942b6f1f02fa074acf82cc62558..2fc30b842c0c62f92e048053c4836ff5a7c37673 100644 (file)
@@ -645,6 +645,11 @@ else()
                endif(HAS_UNUSED_BUT_SET_VARIABLE_WARNING)
        endif()
 
+       if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+               # clang does not understand __extern_always_inline but libc headers use it
+               set(OTHER_FLAGS "${OTHER_FLAGS} \"-D__extern_always_inline=extern __always_inline\"")
+       endif()
+
        if(MINGW)
                set(OTHER_FLAGS "-mthreads -fexceptions")
        endif()