diff options
| author | Ian Elliott <ian@lunarg.com> | 2015-02-13 14:04:01 -0700 |
|---|---|---|
| committer | Ian Elliott <ian@lunarg.com> | 2015-02-13 16:33:18 -0700 |
| commit | f6da0ddd4d4212667ff822576f7cc4e592b63a33 (patch) | |
| tree | ebce416f7af3234c26a389e099a3458aec105e50 | |
| parent | 29d47fedf708c0324b5aa6b39fc47bca4cd22f3c (diff) | |
| download | usermoji-f6da0ddd4d4212667ff822576f7cc4e592b63a33.tar.xz | |
Enable additional Linux warnings, for loader/layers/demos.
The intention is for Linux developers to catch more problems (real or
annoyance) before porting to Windows.
The new warnings are:
-Wpointer-arith
-Wsign-compare
These are not used for the Intel sample driver (mostly because the Intel
compiler from Mesa3D generates lots of these warnings, which code we don't want
to modify), nor for the tests.
Not sure how this affects Glave on Linux.
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | layers/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | loader/CMakeLists.txt | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 01097fdb..92ed4aa1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ include_directories("${PROJECT_SOURCE_DIR}/include") include(FindPkgConfig) if (CMAKE_COMPILER_IS_GNUCC) - set(COMMON_COMPILE_FLAGS "-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers") + set(COMMON_COMPILE_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers") set(COMMON_COMPILE_FLAGS "${COMMON_COMPILE_FLAGS} -fno-strict-aliasing -fno-builtin-memcmp") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 ${COMMON_COMPILE_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_COMPILE_FLAGS}") diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt index 90a205ad..817d2c3f 100644 --- a/layers/CMakeLists.txt +++ b/layers/CMakeLists.txt @@ -46,8 +46,8 @@ if (WIN32) endif() if (NOT WIN32) set (CMAKE_CXX_FLAGS "-std=c++11") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXGL_PROTOTYPES") - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXGL_PROTOTYPES -Wpointer-arith") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES -Wpointer-arith") endif() add_custom_command(OUTPUT xgl_dispatch_table_helper.h diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index a4eba041..41fd9891 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -25,7 +25,7 @@ if (WIN32) target_link_libraries(XGL) endif() if (NOT WIN32) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES -Wpointer-arith") add_library(XGL SHARED loader.c dispatch.c table_ops.h) set_target_properties(XGL PROPERTIES SOVERSION 0) |
