mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-25 13:00:04 +00:00
Add -fextra-semi to Clang builds (#2787)
This will catch instances on the bots where PRs introduce unneeded semi-colons, which are going to cause downstream users problems. Fixes #2781
This commit is contained in:
parent
698b56a8f0
commit
370375d235
@ -235,6 +235,21 @@ endmacro(spvtools_pch)
|
||||
|
||||
add_subdirectory(external)
|
||||
|
||||
# Warning about extra semi-colons.
|
||||
#
|
||||
# This is not supported on all compilers/versions. so enabling only
|
||||
# for clang, since that works for all versions that our bots run.
|
||||
#
|
||||
# This is intentionally done after adding the external subdirectory,
|
||||
# so we don't enforce this flag on our dependencies, some of which do
|
||||
# not pass it.
|
||||
#
|
||||
# If the minimum version of CMake supported is updated to 3.0 or
|
||||
# later, then check_cxx_compiler_flag could be used instead.
|
||||
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
add_compile_options("-Wextra-semi")
|
||||
endif()
|
||||
|
||||
add_subdirectory(source)
|
||||
add_subdirectory(tools)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user