File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1616cmake_minimum_required (VERSION 3.16)
1717project (ffmpeg_encoder_decoder)
1818
19- add_compile_options (-Wall -Wextra -Wpedantic -Werror)
19+ add_compile_options (-Wall -Wextra -Wpedantic)
20+ if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0" )
21+ option (CMAKE_COMPILE_WARNING_AS_ERROR "Treat compiler warnings as errors." ON )
22+ mark_as_advanced (CMAKE_COMPILE_WARNING_AS_ERROR)
23+ else ()
24+ add_compile_options (-Werror)
25+ endif ()
2026
2127# find dependencies
2228find_package (ament_cmake REQUIRED)
@@ -148,4 +154,4 @@ ament_export_include_directories(include)
148154ament_export_libraries(${PROJECT_NAME} )
149155ament_export_targets(${PROJECT_NAME} Targets HAS_LIBRARY_TARGET)
150156
151- ament_package(CONFIG_EXTRAS cmake/${PROJECT_NAME} -extras.cmake.in)
157+ ament_package(CONFIG_EXTRAS cmake/${PROJECT_NAME} -extras.cmake.in)
You can’t perform that action at this time.
0 commit comments