diff options
author | Chris Robinson <[email protected]> | 2007-12-06 21:50:28 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2007-12-06 21:50:28 -0800 |
commit | 7892c2e65369062da328b798a97f9409d7559d94 (patch) | |
tree | 6d8fa12a14898566895ca4cb5258eacb71a348ab | |
parent | e9eaacd0bdfaed7e7c4b827f1ebadae2e799de15 (diff) |
Test for -W switch
-rw-r--r-- | CMakeLists.txt | 7 |
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() |