diff --git a/cmake/compilers.cmake b/cmake/compilers.cmake index 2381f1f6..eee777d2 100644 --- a/cmake/compilers.cmake +++ b/cmake/compilers.cmake @@ -1,15 +1,7 @@ -include(CheckCCompilerFlag) - -# --- compiler options - -check_c_compiler_flag(-Wall _has_wall) -if(_has_wall) - add_compile_options(-Wall) +if(MSVC) + add_compile_options(/W4) else() - check_c_compiler_flag(/Wall _has_msvc_wall) - if(_has_msvc_wall) - add_compile_options(/Wall) - endif() + add_compile_options(-Wall) endif() # disable nuisance warnings from Visual Studio