diff --git a/rcl_logging_spdlog/CMakeLists.txt b/rcl_logging_spdlog/CMakeLists.txt index 0ae2837..3e14735 100644 --- a/rcl_logging_spdlog/CMakeLists.txt +++ b/rcl_logging_spdlog/CMakeLists.txt @@ -20,6 +20,12 @@ find_package(spdlog REQUIRED) if(NOT WIN32) add_compile_options(-Wall -Wextra -Wpedantic) endif() +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options( + -Wformat=2 -Wconversion -Woverloaded-virtual -Wshadow + -Wnon-virtual-dtor -Wold-style-cast -Wcast-qual + ) +endif() add_library(${PROJECT_NAME} src/rcl_logging_spdlog.cpp) target_link_libraries(${PROJECT_NAME} spdlog::spdlog)