Skip to content

Commit

Permalink
Improve CMake build for Clang compiler
Browse files Browse the repository at this point in the history
Add -Wall option for Clang compiler.
  • Loading branch information
leonlynch committed Feb 3, 2024
1 parent a5b4e80 commit 3375534
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
add_compile_options($<$<CONFIG:Debug>:-ggdb>)
add_compile_options($<$<CONFIG:RelWithDebInfo>:-ggdb>)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_compile_options(-Wall)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
add_compile_options(-Wall)
endif()
Expand Down

0 comments on commit 3375534

Please sign in to comment.