From 745c532f793257c00ee17fed852cf22279031439 Mon Sep 17 00:00:00 2001 From: Eugeny Kalishenko Date: Sun, 20 Dec 2015 14:41:18 +0300 Subject: [PATCH] Useful warnings for gcc added --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e062440..320d486e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,8 +48,9 @@ endif() message("Build type -- ${CMAKE_BUILD_TYPE}") -if(UNIX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +if(CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter -pedantic -fno-strict-aliasing") endif() set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG") -- 2.34.1