diff options
author | Kirill A. Shutemov <kirill@shutemov.name> | 2011-08-30 23:06:04 +0300 |
---|---|---|
committer | Kirill A. Shutemov <kirill@shutemov.name> | 2011-08-30 23:06:04 +0300 |
commit | 0b2c4061878bc5b437b1a9e9b5f43c357283980e (patch) | |
tree | d65e4af25c301e525040941d24c3a98abcaab547 /CMakeLists.txt | |
parent | 2fcf9c82735cec8874d5e12ed18380c77d629706 (diff) | |
download | libgit2-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.txt | 2 |
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 () |