mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-10 00:10:19 +03:00
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>
23 lines
890 B
Diff
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)
|