Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make autoware_cmake Clang-friendly #11

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all 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
31 changes: 30 additions & 1 deletion autoware_cmake/cmake/autoware_package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,38 @@
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
endif()

# Ignore PCL errors in Clang
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# Ignore PCL errors in Clang
add_compile_options(-Wno-gnu-anonymous-struct -Wno-nested-anon-types)

# Flag unknown (e.g. GNU-specific) options, but do not fail compilation
add_compile_options(-Wno-error=unknown-warning-option)

# temporary
add_compile_options(
# Iteration 1
-Wno-error=delete-non-abstract-non-virtual-dtor
-Wno-error=delete-abstract-non-virtual-dtor
-Wno-error=deprecated-copy
-Wno-error=c11-extensions
-Wno-error=unused-but-set-variable
-Wno-error=unused-private-field
-Wno-error=infinite-recursion
-Wno-error=implicit-const-int-float-conversion
-Wno-error=unused-lambda-capture
-Wno-error=unused-const-variable
#Iteration 2
-Wno-error=deprecated-builtins
-Wno-error=format-security
-Wno-error=inconsistent-missing-override
-Wno-error=overloaded-virtual
-Wno-error=pessimizing-move

Check warning on line 51 in autoware_cmake/cmake/autoware_package.cmake

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (pessimizing)
-Wno-error=sign-conversion
-Wno-error=unused-function
#Iteration 3
-Wno-error=defaulted-function-deleted
-Wno-error=unused-parameter
)
endif()

# Ignore Boost deprecated messages
Expand Down
Loading