[Bf-blender-cvs] [ee1b2cce5f5] blender2.8: CMake: Default to C11 for Clang and GCC

Sergey Sharybin noreply at git.blender.org
Fri Sep 28 10:14:20 CEST 2018


Commit: ee1b2cce5f5c0c3c2980d91d4401a88b49e47090
Author: Sergey Sharybin
Date:   Fri Sep 28 10:06:59 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBee1b2cce5f5c0c3c2980d91d4401a88b49e47090

CMake: Default to C11 for Clang and GCC

The option WITH_C11 is gone, and C++ is defaulting to C++11 now,
so guess it's fine to assume we need C11 now.

This is technically what we use anyway, with all the re-definitions
of structs (like when we typedef anonymous struct in a header file
first, and them define it to a proper structure in implementation
file).

===================================================================

M	CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f4dd45d5533..4b9e8317e26 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1518,12 +1518,8 @@ if(
 	(CMAKE_C_COMPILER_ID MATCHES "Clang" AND (NOT MSVC)) OR
 	(CMAKE_C_COMPILER_ID MATCHES "Intel")
 )
-	# Use C99 + GNU extensions, works with GCC, Clang, ICC
-	if(WITH_C11)
-		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
-	else()
-		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
-	endif()
+	# Use C11 + GNU extensions, works with GCC, Clang, ICC
+	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
 endif()
 
 # Include warnings first, so its possible to disable them with user defined flags



More information about the Bf-blender-cvs mailing list