From 22612c512c23f2d5b1d34c57db39a3e59de8b0d3 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Sun, 19 Feb 2017 14:31:11 -0500 Subject: [PATCH] Fixing warning add --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ab7c673..8a97cf3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,8 +14,12 @@ else() endif() # Be moderately paranoid with flags -# But only globally, don't inherit -add_compile_options(-pedantic -Wall -Wextra -O0) +if(CMAKE_COMPILER_IS_GNUCC) + add_definitions("-Wall -Wextra") +endif() +if(MSVC) + add_definitions("/W4") +endif() add_library(CLI INTERFACE) target_include_directories(CLI INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")