summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-05-25 11:17:46 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-05-25 11:17:46 +0300
commit11a1c56d4b78c731d84dcf4f2e93ce4675353c7b (patch)
treea1f7e1b71796fb4c33b06ca88bbc07cabf0bf65b
parent54d91d83a01042afb733f194d74713baa44eade2 (diff)
disable Wmissing-field-initializers when gcc <= 5.0
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7b6a259..367bec8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,13 @@ set(LIBKMS_ENABLE_KMSCUBE OFF CACHE BOOL "Enable kmscube")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra -Wno-unused-parameter")
+if (CMAKE_COMPILER_IS_GNUCC)
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
+ # GCC 4.x seems to warn too much
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers")
+ endif()
+endif()
+
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
# static link libc