Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion eng/cmake/global_compile_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
endif()

add_compile_options(-Xclang -Wall -Wextra -pedantic ${WARNINGS_AS_ERRORS_FLAG} -Wdocumentation -Wdocumentation-unknown-command -fcomment-block-commands=retval -Wcast-qual -Wunused -Wuninitialized -Wmissing-declarations -Wconversion -Wpointer-arith -Wshadow -Wfloat-equal)
else()
elseif(CMAKE_C_COMPILER_ID MATCHES "GCC")
if(WARNINGS_AS_ERRORS)
set(WARNINGS_AS_ERRORS_FLAG "-Werror")
endif()

add_compile_options(-Wall -Wextra -pedantic ${WARNINGS_AS_ERRORS_FLAG} -Wcast-qual -Wunused -Wuninitialized -Wmissing-declarations -Wconversion -Wpointer-arith -Wshadow -Wlogical-op -Wfloat-equal)
else()
message(WARNING "Using an unsupported compiler. Stricter compiler flags are not turned on.")
endif()