diff options
-rw-r--r-- | CMakeLists.txt | 7 |
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 |