Skip to content

Commit 72f279a

Browse files
authored
Fix warning as error in ffmpeg encoder decoder
1 parent 62ccbc4 commit 72f279a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

patch/ros-humble-ffmpeg-encoder-decoder.patch

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,23 @@ index da089e4..01e8eea 100644
5252
formats.push_back(*p);
5353
}
5454
}
55+
56+
diff --git a/CMakeLists.txt b/CMakeLists.txt
57+
index 7ba08db..b283bda 100644
58+
--- a/CMakeLists.txt
59+
+++ b/CMakeLists.txt
60+
@@ -16,7 +16,13 @@
61+
cmake_minimum_required(VERSION 3.16)
62+
project(ffmpeg_encoder_decoder)
63+
64+
-add_compile_options(-Wall -Wextra -Wpedantic -Werror)
65+
+add_compile_options(-Wall -Wextra -Wpedantic)
66+
+if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0")
67+
+ option(CMAKE_COMPILE_WARNING_AS_ERROR "Treat compiler warnings as errors." ON)
68+
+ mark_as_advanced(CMAKE_COMPILE_WARNING_AS_ERROR)
69+
+else()
70+
+ add_compile_options(-Werror)
71+
+endif()
72+
73+
# find dependencies
74+
find_package(ament_cmake REQUIRED)

0 commit comments

Comments
 (0)