We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2298c4e commit c8eee02Copy full SHA for c8eee02
CMakeLists.txt
@@ -12,6 +12,9 @@ project(popt
12
# Set soversion
13
set(POPT_SOVERSION 0)
14
15
+# Configurable stuff
16
+option(ENABLE_WERROR "Stop build on warnings" OFF)
17
+
18
# Set up GNU conventions and standard FHS paths
19
include(GNUInstallDirs)
20
@@ -79,6 +82,9 @@ if (Iconv_FOUND)
79
82
endif()
80
83
81
84
add_compile_options(-Wall)
85
+if (ENABLE_WERROR)
86
+ add_compile_options(-Werror)
87
+endif()
88
89
add_subdirectory(src)
90
add_subdirectory(doc)
ci/Dockerfile
@@ -16,5 +16,5 @@ RUN dnf -y install \
COPY . .
-RUN cmake -S . -B ./build
+RUN cmake -S . -B ./build -DENABLE_WERROR=ON
CMD cd build && ctest --output-on-failure --force-new-ctest-process
0 commit comments