diff options
author | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2013-08-21 22:22:03 +0000 |
---|---|---|
committer | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2013-08-21 22:22:03 +0000 |
commit | a728db0cee59b793f8ec04ada6f90d0a565ee1b7 (patch) | |
tree | 0957e88f3297de9a389d159646a891fca1bfb21d /CMakeLists.txt | |
parent | cba14e8a933d78abd44e014f324116980764b99b (diff) | |
download | navit-svn-a728db0cee59b793f8ec04ada6f90d0a565ee1b7.tar.gz |
Fix:core:Build with -Wcast-align -Wmissing-prototypes, -Wpointer-arith, fix corresponding warnings.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5586 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-x | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 569ffa81..dbf976fd 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -634,7 +634,11 @@ CHECK_FUNCTION_EXISTS (_atoi64 HAVE__ATOI64) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) -add_definitions("-Wall") +if(CMAKE_COMPILER_IS_GNUCC OR CCMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wcast-align -Wpointer-arith -Wmissing-prototypes ") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wcast-align -Wpointer-arith ") +endif() + if (EXTRA_DEFINES) add_definitions("${EXTRA_DEFINES}") endif(EXTRA_DEFINES) |