diff options
-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 ) |