From 7892c2e65369062da328b798a97f9409d7559d94 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 6 Dec 2007 21:50:28 -0800 Subject: [PATCH] Test for -W switch --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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()