[Bf-blender-cvs] [b9e0fe2] master: CMake: check GNU compiler before using extension
Campbell Barton
noreply at git.blender.org
Sun Nov 22 22:39:48 CET 2015
Commit: b9e0fe20034e355809a260b5adba52889f325b8e
Author: Campbell Barton
Date: Mon Nov 23 08:31:29 2015 +1100
Branches: master
https://developer.blender.org/rBb9e0fe20034e355809a260b5adba52889f325b8e
CMake: check GNU compiler before using extension
Minor edit, don't assume non-msvc compilers are gcc/gnu compatible.
===================================================================
M CMakeLists.txt
===================================================================
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b5317cc..7319a34 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2768,9 +2768,8 @@ if(WITH_CPP11)
endif()
endif()
-if(MSVC)
- # Visual Studio has all standards it supports available by default
-else()
+# Visual Studio has all standards it supports available by default
+if(CMAKE_COMPILER_IS_GNUCC)
# Use C99 + GNU extensions, works with GCC, Clang, ICC
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
endif()
More information about the Bf-blender-cvs
mailing list