1.8 KiB
1.8 KiB
P0 Warnings-as-Errors Isolation for Boost Headers
Task ID: X-BASE-02 Phase: P0 Status: APPROVED
1. Context and baseline
Building with -DVOID_WARNINGS_AS_ERRORS=ON on GCC 16.2.0 (-std=c++26) fails inside fetched Boost 1.84.0 headers (boost/intrusive/detail/ebo_functor_holder.hpp, boost/beast/core/detail/string.hpp, boost/beast/http/span_body.hpp) when compiling src/Net/Http.cpp.
2. Deliverables
- Mark FetchContent Boost headers as
SYSTEMincmake/Dependencies.cmake. - Keep
-Wall -Wextra -Wpedantic -Werrorstrict across all Void-owned sources incmake/Module.cmake.
3. Exact files and interfaces
cmake/Dependencies.cmake: addSYSTEMtoFetchContent_Declare(Boost ...); ensure Boost target properties preserveSYSTEM TRUEwithout modifying global warning flags.src/Net/Http.cpp(only if template instantiation inside Void TU still surfaces a Boost diagnostic): isolate strictly at the offending#include/site via scoped#pragma GCC diagnostic push/pop.
4. Edge cases
- Do NOT disable warnings globally or weaken
VOID_WARNINGS_AS_ERRORSincmake/Module.cmake. - Any warning originating in Void's own code must be fixed at its source.
5. Acceptance criteria
- Full all-module configure/build with
-DVOID_ENABLE_TESTING=ON -DVOID_WARNINGS_AS_ERRORS=ONexits0with zero warnings or errors. - Full
VoidTestsruns and passes.
6. Verification commands
cmake -S . -B /tmp/void-p0-werror -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DVOID_ENABLE_TESTING=ON -DVOID_WARNINGS_AS_ERRORS=ON \
-DFETCHCONTENT_FULLY_DISCONNECTED=ON \
-DFETCHCONTENT_SOURCE_DIR_BOOST=/home/faumaray/Projects/VoidLibrary/build/_deps/boost-src
cmake --build /tmp/void-p0-werror --parallel 4
/tmp/void-p0-werror/tests/VoidTests