Skip to content

Commit 4e416b4

Browse files
Set CMAKE_CXX26_COMPILE_FEATURES to cxx_std_26 in toolchain file (#24954)
Set CMAKE_CXX26_COMPILE_FEATURES to cxx_std_26 in toolchain file. Without this, when setting target_compile_features(target PUBLIC cxx_std_26), the `-std=gnu++26` doesn't get added to the compiler flags.
1 parent d0aa66d commit 4e416b4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmake/Modules/Platform/Emscripten.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ if (EMSCRIPTEN_FORCE_COMPILERS)
209209
set(CMAKE_CXX23_COMPILE_FEATURES "cxx_std_23")
210210
set(CMAKE_CXX_COMPILE_FEATURES "${CMAKE_CXX_COMPILE_FEATURES};cxx_std_23")
211211
if ("${CMAKE_VERSION}" VERSION_GREATER_EQUAL "3.25") # 3.25+
212+
set(CMAKE_CXX26_COMPILE_FEATURES "cxx_std_26")
212213
set(CMAKE_CXX_COMPILE_FEATURES "${CMAKE_CXX_COMPILE_FEATURES};cxx_std_26")
213214
endif()
214215
if ("${CMAKE_VERSION}" VERSION_GREATER_EQUAL "3.21")

0 commit comments

Comments
 (0)