Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
Update compile flags (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
hhenry01 authored Mar 1, 2024
1 parent 83bbba2 commit b7f69bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endif()
# Enable all warnings as errors except unused parameter because auto-generated protobuf files trigger it,
# and clang-tidy can cover it without false-flagging the protobuf files.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20 -Wall -Wextra -Wpedantic -Werror -Wno-unused-parameter -pthread")
# Enable all warnings as errors except nested-anon-types, as it allows us to declare an unnamed struct within an
# anonymous union, which is allowed in the C++ standard. This appears to be a warning specific to clang++ with
# -Wpedantic, and does not appear with g++ or MSVC
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20 -Wall -Wextra -Wpedantic -Werror -Wno-nested-anon-types -pthread")
message(WARNING "Building Network Systems with build type '${CMAKE_BUILD_TYPE}' "
"and flags: '${CMAKE_CXX_FLAGS}'")

Expand Down
2 changes: 1 addition & 1 deletion projects/can_transceiver/src/can_transceiver_ros_intf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class CanTransceiverIntf : public rclcpp::Node
*
* @param mock_gps mock_gps received from the Mock GPS topic
*/
void subMockGpsCb(msg::GPS mock_gps)
void subMockGpsCb(msg::GPS /*mock_gps*/)
{
// TODO(lross03): implement this
}
Expand Down

0 comments on commit b7f69bb

Please sign in to comment.