aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt76
1 files changed, 34 insertions, 42 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bbbf23cf3..ee4133e92 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -555,48 +555,40 @@ IF(LIBUTIL_LIBRARY)
DOC "Path to libutil header")
ENDIF(LIBUTIL_LIBRARY)
- # Process with warn flags
- IF(CMAKE_COMPILER_IS_GNUCC)
- CHECK_C_COMPILER_FLAG(-Wall SUPPORT_WALL)
- CHECK_C_COMPILER_FLAG(-Wall SUPPORT_W)
- CHECK_C_COMPILER_FLAG(-Wpointer-arith SUPPORT_WPOINTER)
- CHECK_C_COMPILER_FLAG(-Wno-unused-parameter SUPPORT_WPARAM)
- CHECK_C_COMPILER_FLAG(-Wno-unused-function SUPPORT_WFUNCTION)
- CHECK_C_COMPILER_FLAG(-Wunused-variable SUPPORT_WUNUSED_VAR)
- CHECK_C_COMPILER_FLAG(-Wno-pointer-sign SUPPORT_WPOINTER_SIGN)
- CHECK_C_COMPILER_FLAG(-pedantic SUPPORT_PEDANTIC_FLAG)
- CHECK_C_COMPILER_FLAG("-std=c99" SUPPORT_STD_FLAG)
-
- SET(CMAKE_C_WARN_FLAGS "")
-
- IF(SUPPORT_W)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -W")
- ENDIF(SUPPORT_W)
- IF(SUPPORT_WALL)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wall")
- ENDIF(SUPPORT_WALL)
- IF(SUPPORT_WPOINTER)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wpointer-arith")
- ENDIF(SUPPORT_WPOINTER)
- IF(SUPPORT_WPARAM)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-unused-parameter")
- ENDIF(SUPPORT_WPARAM)
- IF(SUPPORT_WFUNCTION)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-unused-function")
- ENDIF(SUPPORT_WFUNCTION)
- IF(SUPPORT_WUNUSED_VAR)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wunused-variable")
- ENDIF(SUPPORT_WUNUSED_VAR)
- IF(SUPPORT_WPOINTER_SIGN)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-pointer-sign")
- ENDIF(SUPPORT_WPOINTER_SIGN)
- IF(SUPPORT_PEDANTIC_FLAG)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -pedantic")
- ENDIF(SUPPORT_PEDANTIC_FLAG)
- IF(SUPPORT_STD_FLAG)
- SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -std=c99")
- ENDIF(SUPPORT_STD_FLAG)
- ENDIF(CMAKE_COMPILER_IS_GNUCC)
+# Process with warn flags
+SET(CMAKE_C_WARN_FLAGS "")
+CHECK_C_COMPILER_FLAG(-Wall SUPPORT_WALL)
+CHECK_C_COMPILER_FLAG(-Wall SUPPORT_W)
+CHECK_C_COMPILER_FLAG(-Wpointer-arith SUPPORT_WPOINTER)
+CHECK_C_COMPILER_FLAG(-Wno-unused-parameter SUPPORT_WPARAM)
+CHECK_C_COMPILER_FLAG(-Wno-unused-function SUPPORT_WFUNCTION)
+CHECK_C_COMPILER_FLAG(-Wunused-variable SUPPORT_WUNUSED_VAR)
+CHECK_C_COMPILER_FLAG(-Wno-pointer-sign SUPPORT_WPOINTER_SIGN)
+CHECK_C_COMPILER_FLAG(-pedantic SUPPORT_PEDANTIC_FLAG)
+IF(SUPPORT_W)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -W")
+ENDIF(SUPPORT_W)
+IF(SUPPORT_WALL)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wall")
+ENDIF(SUPPORT_WALL)
+IF(SUPPORT_WPOINTER)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wpointer-arith")
+ENDIF(SUPPORT_WPOINTER)
+IF(SUPPORT_WPARAM)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-unused-parameter")
+ENDIF(SUPPORT_WPARAM)
+IF(SUPPORT_WFUNCTION)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-unused-function")
+ENDIF(SUPPORT_WFUNCTION)
+IF(SUPPORT_WUNUSED_VAR)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wunused-variable")
+ENDIF(SUPPORT_WUNUSED_VAR)
+IF(SUPPORT_WPOINTER_SIGN)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-pointer-sign")
+ENDIF(SUPPORT_WPOINTER_SIGN)
+IF(SUPPORT_PEDANTIC_FLAG)
+ SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -pedantic")
+ENDIF(SUPPORT_PEDANTIC_FLAG)
# Optimization flags
IF(NOT CMAKE_C_OPT_FLAGS)