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

build_system: remove unused-parameter flag for AppleClang #354

Merged
merged 1 commit into from
Apr 9, 2018
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set(CMAKE_CXX_STANDARD 11)

list(APPEND CMAKE_FIND_ROOT_PATH ${CMAKE_BINARY_DIR}/third_party)

cmake_policy(SET CMP0025 NEW)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment why this was needed.

Copy link
Collaborator Author

@JonasVautherin JonasVautherin Apr 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can do it if you insist, but I tend to disagree on that :-). "CMP0025" is so unique that you cannot miss the CMake documentation when Googling it, and its first line says:

Compiler id for Apple Clang is now AppleClang.

I generally don't like adding comments, but I agree it is necessary sometimes when we have to do weird tricks. This is not a trick at all. To me it would be the same as as putting a comment above std::shared_ptr<...> to explain what a shared pointer is. It is general knowledge, and I believe my source code is not the place for general documentation :D. Comments tend to get outdated and clutter the code.

Again, if you insist, I can add a comment there :D.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, agreed.


project(dronecore)

option(BUILD_TESTS "Build tests" ON)
Expand Down
4 changes: 3 additions & 1 deletion cmake/compiler_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ else()
endif()

set(warnings "${warnings} -Wlogical-op")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(warnings "${warnings} -Wno-missing-braces")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
set(warnings "${warnings} -Wno-missing-braces -Wno-unused-parameter")
endif()
endif()

Expand Down