gentoo/dev-cpp/magic_enum/files/magic_enum-0.9.7-werror.patch
Sam James cd674fe9d3
dev-cpp/magic_enum: add 0.9.7
Thanks to Arniiiii for pursuing this upstream wrt bug #933479. I've
also taken the opportunity to make examples conditional on USE as
it's a header-only library otherwise and nothing needs to be built
(ofc excluding tests).

Closes: https://bugs.gentoo.org/933479
Signed-off-by: Sam James <sam@gentoo.org>
2025-06-21 07:01:09 +01:00

23 lines
890 B
Diff

--- a/example/CMakeLists.txt
+++ b/example/CMakeLists.txt
@@ -2,7 +2,7 @@ include(CheckCXXCompilerFlag)
set(CMAKE_CXX_STANDARD 17)
if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
- set(OPTIONS -Wall -Wextra -Wshadow -pedantic-errors -Werror)
+ set(OPTIONS -Wall -Wextra)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set(OPTIONS /W4 /WX)
if(HAS_PERMISSIVE_FLAG)
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -56,7 +56,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
check_cxx_compiler_flag(/std:c++latest HAS_CPPLATEST_FLAG)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
set(CMAKE_VERBOSE_MAKEFILE ON)
- set(OPTIONS -Wall -Wextra -Wshadow -pedantic-errors -Werror)
+ set(OPTIONS -Wall -Wextra -Wshadow)
check_cxx_compiler_flag(-std=c++20 HAS_CPP20_FLAG)
check_cxx_compiler_flag(-std=c++23 HAS_CPP23_FLAG)