chore(build): containers, toolchains and portability fixes

This commit is contained in:
faumaray committed 2026-12-03 08:09:47 +00:00
1 parent 71fcad80d3
commit 7686be1b23
1 file changed
+6 -4
+6 -4
View File
@@ -33,7 +33,7 @@ function(void_probe_capabilities)
endif()
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_FLAGS "-std=c++26")
set(CMAKE_REQUIRED_FLAGS "-std=c++${CMAKE_CXX_STANDARD}")
check_cxx_source_compiles(
"#include <expected>\nint main() { std::expected<int, int> e{0}; return *e; }\n"
VOID_HAS_STD_EXPECTED
@@ -46,10 +46,12 @@ function(void_probe_capabilities)
endif()
cmake_push_check_state(RESET)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16)
set(CMAKE_REQUIRED_FLAGS "-std=c++26 -freflection")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16 AND
CMAKE_CXX_STANDARD GREATER_EQUAL 26)
set(CMAKE_REQUIRED_FLAGS "-std=c++${CMAKE_CXX_STANDARD} -freflection")
else()
set(CMAKE_REQUIRED_FLAGS "-std=c++26")
set(CMAKE_REQUIRED_FLAGS "-std=c++${CMAKE_CXX_STANDARD}")
endif()
check_cxx_source_compiles(
"#include <meta>\nconsteval bool probe() { constexpr auto r = ^^int; return std::meta::is_type(r); }\nstatic_assert(probe());\nint main() { return 0; }\n"