diff options
author | Ray Molenkamp <github@lazydodo.com> | 2018-05-28 23:35:59 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2018-05-28 23:35:59 +0300 |
commit | 5d1a172783e65a6c4c52ad112aff64d3b63d0b6c (patch) | |
tree | 02be093686847beb79d430a197ae09b4b1055a69 /CMakeLists.txt | |
parent | 66577c8732f4957e4afa5cafb18259ea589e74b6 (diff) | |
parent | 81060ff6b26c22331d2066bb83d492bbe61e936c (diff) |
Merge remote-tracking branch 'origin/master' into blender2.8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 74e6596de82..02aa3697d00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1548,7 +1548,12 @@ else() endif() # Visual Studio has all standards it supports available by default -if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "Intel") +# Clang on windows copies this behavior and does not support these switches +if( + CMAKE_COMPILER_IS_GNUCC OR + (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") |