diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-07-19 17:35:45 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-07-19 17:35:45 +0900 |
commit | 95a6d19a4336571f5af703fa953e161c66f16e37 (patch) | |
tree | 08c2876aeb15f84c2d2f4aefa1e541fe52f9bbac | |
parent | ffa2228462afe5f2d330bc2aecad1029742222c4 (diff) | |
download | libquotient-95a6d19a4336571f5af703fa953e161c66f16e37.tar.gz libquotient-95a6d19a4336571f5af703fa953e161c66f16e37.zip |
Make sure -Wall is used regardless of the parent project settings
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d118d82..bca58b40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,12 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) "MinSizeRel" "RelWithDebInfo") endif() +# Setup command line parameters for the compiler and linker +CHECK_CXX_COMPILER_FLAG("-Wall" WALL_FLAG_SUPPORTED) +if ( WALL_FLAG_SUPPORTED AND NOT CMAKE_CXX_FLAGS MATCHES "(^| )-Wall($| )") + string(APPEND CMAKE_CXX_FLAGS " -Wall") +endif ( WALL_FLAG_SUPPORTED ) + if ( CMAKE_VERSION VERSION_LESS "3.1" ) CHECK_CXX_COMPILER_FLAG("-std=c++11" STD_FLAG_SUPPORTED) if ( STD_FLAG_SUPPORTED ) |