diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2015-02-18 13:16:48 +0000 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2015-02-18 13:16:48 +0000 |
commit | 1b85b63a39060a704aad7a10d085721f42b6ac1c (patch) | |
tree | 187c37cde30ba0679401d2fe0791866349e823b7 /CMakeLists.txt | |
parent | 83bc6862386b2d465879bcd372d61ec754534970 (diff) |
cmake: Drop -Wdeclaration-after-statement.
MSVC 2013 does support C99 declarations after statements. There were some
bugs before 2013 Update 4 but it there are no known issues with Update 4
so far. And that's what we already require.
Trivial.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 93abb11f8..4236c89ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -209,13 +209,7 @@ if (NOT MSVC) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") ENDIF (CXX_COMPILER_FLAG_WALL) - # Unfortunately MSVC does not support C99. Among all features enabled - # by C99, declarations after statements is the most frequently used. - # For portability sake, we request gcc to warn when this is used. - CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement" C_COMPILER_FLAG_WDECL_AFTER_STMT) - IF (C_COMPILER_FLAG_WDECL_AFTER_STMT) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wdeclaration-after-statement") - ENDIF () + # MSVC does not support C99 variable length arrays CHECK_C_COMPILER_FLAG("-Wvla" C_COMPILER_FLAG_WVLA) IF (C_COMPILER_FLAG_WVLA) SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wvla") |