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")