summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2014-11-19 17:55:07 +0000
committerJosé Fonseca <jfonseca@vmware.com>2014-11-19 21:05:05 +0000
commitc6ab4f25e5eb923211f8aab0a4f138267dd1ec6f (patch)
tree94577630826dc6207c55e7b3cccfddd3a7739259
parent8b371170ce2c6a714dba966ab17d596cd06fda24 (diff)
cmake: Don't use gcc specific warnings with g++.
Avoids "warning: command line option ‘-W...’ is valid for Ada/C/ObjC but not for C++". Reviewed-by: Roland Scheidegger <sroland@vmware.com>
-rw-r--r--CMakeLists.txt7
1 files changed, 2 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3e217f5..57a46f85 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -72,16 +72,13 @@ if (CMAKE_COMPILER_IS_GNUCC)
add_definitions(
-Wall
-Wpointer-arith
- -Wstrict-prototypes
- -Wmissing-prototypes
-Wmissing-declarations
- -Wnested-externs
-fno-strict-aliasing
- -Wbad-function-cast
#-Wold-style-definition
#-Wdeclaration-after-statement
)
-endif (CMAKE_COMPILER_IS_GNUCC)
+ set (CMAKE_C_FLAGS "-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast ${CMAKE_CXX_FLAGS}")
+endif ()
if (WIN32)
# Nobody likes to include windows.h: