aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7de8ae76..b5721a0e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,7 +51,12 @@ SET(EXTRA_LIBS m ${EXTRA_LIBS})
IF("${MSVC}")
# ???
ELSE()
- ADD_DEFINITIONS(-W -Wall)
+ CHECK_C_COMPILER_FLAG(-W HAVE_W_SWITCH)
+ IF("${HAVE_W_SWITCH}")
+ ADD_DEFINITIONS(-W)
+ ENDIF()
+
+ ADD_DEFINITIONS(-Wall)
IF(WERROR)
ADD_DEFINITIONS(-Werror)
ENDIF()