Feature request: build library on CI with -Werror
leha-bot opened this issue · 3 comments
leha-bot commented
Feature request: build library on CI with -Werror
ned14 commented
Given how frequently github actions likes to change the toolchains, this sounds like a lot of overhead and hassle for little gain for me.
leha-bot commented
Agreed, I will send some minor fixes for warnings to reduce their count and help with this issue 👍
BurningEnlightenment commented
fyi there are two things you can do in the downstream codebase to ease the pain a bit:
- Use
-isystem
and/external:I
to specify the llfio include directory. CMake should do this for imported targets by default. - Add a llfio wrapping header to your code base which adjusts the warning level and only ever include that one:
#pragma once
#include <boost/predef/compiler.h>
#if defined(BOOST_COMP_MSVC_AVAILABLE)
#pragma warning(push, 2)
//#pragma warning(disable : /*...*/)
#elif defined(BOOST_COMP_CLANG_AVAILABLE)
#pragma clang diagnostic push
//#pragma clang diagnostic ignored /*...*/
#endif
#include <llfio/llfio.hpp>
#if defined(BOOST_COMP_MSVC_AVAILABLE)
#pragma warning(pop)
#elif defined(BOOST_COMP_CLANG_AVAILABLE)
#pragma clang diagnostic pop
#endif
// if the ABI permutation isn't relevant to you, you can also conveniently place a namespace alias here:
namespace your_namespace
{
namespace llfio = LLFIO_V2_NAMESPACE;
}