CMake: enable -std=gnu99 for clang and icc.
authorBrecht Van Lommel <brecht@solidangle.com>
Mon, 23 Nov 2015 17:22:53 +0000 (18:22 +0100)
committerBrecht Van Lommel <brecht@solidangle.com>
Mon, 23 Nov 2015 17:22:53 +0000 (18:22 +0100)
CMakeLists.txt

index 507676667c98c78d612c694b8b4730de87e79338..cae1c24df3301319b5f13d27466b8a87a469f188 100644 (file)
@@ -2774,7 +2774,7 @@ if(WITH_CPP11)
 endif()
 
 # Visual Studio has all standards it supports available by default
-if(CMAKE_COMPILER_IS_GNUCC)
+if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "Intel")
        # Use C99 + GNU extensions, works with GCC, Clang, ICC
        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
 endif()