summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2016-11-02 15:13:06 +0000
committeriphydf <iphydf@users.noreply.github.com>2016-11-06 01:32:10 +0000
commitcf94537266a97a7f5309fdb2c566b2ac4860fa9a (patch)
tree398bcf60bad4ed99cb322ce826883370e0892669 /cmake
parentee3121c3f6025562972c167d4db2e8ed38860479 (diff)
Enable all possible C compiler warning flags.
We disable the ones that fire, so we can use -Werror. We can then investigate each warning individually and see whether to fix it or to keep silencing it.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/ModulePackage.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmake/ModulePackage.cmake b/cmake/ModulePackage.cmake
index a556aef0..26c6c39a 100644
--- a/cmake/ModulePackage.cmake
+++ b/cmake/ModulePackage.cmake
@@ -31,8 +31,13 @@ function(pkg_use_module mod)
31 if(${mod}_FOUND) 31 if(${mod}_FOUND)
32 link_directories(${${mod}_LIBRARY_DIRS}) 32 link_directories(${${mod}_LIBRARY_DIRS})
33 include_directories(${${mod}_INCLUDE_DIRS}) 33 include_directories(${${mod}_INCLUDE_DIRS})
34 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${mod}_CFLAGS_OTHER}") 34 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${mod}_CFLAGS_OTHER}" PARENT_SCOPE)
35 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${mod}_CFLAGS_OTHER}") 35 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${mod}_CFLAGS_OTHER}" PARENT_SCOPE)
36
37 foreach(dir ${${mod}_INCLUDE_DIRS})
38 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isystem ${dir}" PARENT_SCOPE)
39 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${dir}" PARENT_SCOPE)
40 endforeach()
36 endif() 41 endif()
37endfunction() 42endfunction()
38 43