Skip to content

Commit 651d00a

Browse files
committed
[win] Increase CXX_STANDARD_STRING with VS 2026
Use `/std:c++20` by default with Visual Studio 2026
1 parent bba2808 commit 651d00a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmake/modules/CheckCompiler.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,11 @@ endif()
162162
# so we check the value of __cplusplus.
163163
# This default value can be overridden by specifying one at the prompt.
164164
if (MSVC)
165-
set(CXX_STANDARD_STRING "201703L")
165+
if(MSVC_VERSION GREATER_EQUAL 1950)
166+
set(CXX_STANDARD_STRING "202002L")
167+
else()
168+
set(CXX_STANDARD_STRING "201703L")
169+
endif()
166170
else()
167171
execute_process(COMMAND echo __cplusplus
168172
COMMAND ${CMAKE_CXX_COMPILER} -E -x c++ -

0 commit comments

Comments
 (0)