Skip to content

Commit

Permalink
cmake: simplify compiler flags
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Nov 1, 2023
1 parent 37ac9c2 commit de33e44
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions cmake/compilers.cmake
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit de33e44

Please sign in to comment.