summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill@shutemov.name>2011-08-30 23:06:04 +0300
committerKirill A. Shutemov <kirill@shutemov.name>2011-08-30 23:06:04 +0300
commit0b2c4061878bc5b437b1a9e9b5f43c357283980e (patch)
treed65e4af25c301e525040941d24c3a98abcaab547 /CMakeLists.txt
parent2fcf9c82735cec8874d5e12ed18380c77d629706 (diff)
downloadlibgit2-0b2c4061878bc5b437b1a9e9b5f43c357283980e.tar.gz
CMakefile: add -Wstrict-aliasing=2 and fix warnings
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e149cd27f..e73f98256 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,7 +57,7 @@ IF (MSVC)
SET(CMAKE_C_FLAGS_DEBUG "/Od /DEBUG /MTd")
SET(CMAKE_C_FLAGS_RELEASE "/MT /O2")
ELSE ()
- SET(CMAKE_C_FLAGS "-O2 -g -Wall -Wextra")
+ SET(CMAKE_C_FLAGS "-O2 -g -Wall -Wextra -Wstrict-aliasing=2")
IF (NOT MINGW) # MinGW always does PIC and complains if we tell it to
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
ENDIF ()