Skip to content

Fix clang-cl detection and add LIBPL_WARNINGS_AS_ERRORS#233

Open
mrexodia wants to merge 3 commits intoWerWolv:masterfrom
mrexodia:werror-fixes
Open

Fix clang-cl detection and add LIBPL_WARNINGS_AS_ERRORS#233
mrexodia wants to merge 3 commits intoWerWolv:masterfrom
mrexodia:werror-fixes

Conversation

@mrexodia
Copy link
Copy Markdown
Contributor

@mrexodia mrexodia commented Apr 14, 2026

When using clang-cl the CMAKE_CXX_COMPILER_ID=Clang so this would set -Wall which enables all the warnings (unlike clang). This triggered a bunch of warnings related to c++98 compatibility which would then turn into an error.

Additionally I made LIBPL_WARNINGS_AS_ERRORS default to OFF when the project is used through FetchContent/add_subdirectory, because compiling with warnings as errors is generally bad practice there (newer compilers can introduce new warnings which then error out your main project for no reason).

Also downgraded the standard requirement to C++20 as discussed on Discord.

(The actual 'proper' way to enable this is using CMAKE_COMPILE_WARNING_AS_ERROR and a preset, but that's not relevant for now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant