diff --git a/cmake/modules/CheckCompiler.cmake b/cmake/modules/CheckCompiler.cmake index 1211684ed61c3..806be1c9a1ef2 100644 --- a/cmake/modules/CheckCompiler.cmake +++ b/cmake/modules/CheckCompiler.cmake @@ -162,7 +162,11 @@ endif() # so we check the value of __cplusplus. # This default value can be overridden by specifying one at the prompt. if (MSVC) - set(CXX_STANDARD_STRING "201703L") + if(MSVC_VERSION GREATER_EQUAL 1950) + set(CXX_STANDARD_STRING "202002L") + else() + set(CXX_STANDARD_STRING "201703L") + endif() else() execute_process(COMMAND echo __cplusplus COMMAND ${CMAKE_CXX_COMPILER} -E -x c++ - diff --git a/io/io/test/TFileTests.cxx b/io/io/test/TFileTests.cxx index 0cce4a4aba097..16c58e8fd46a6 100644 --- a/io/io/test/TFileTests.cxx +++ b/io/io/test/TFileTests.cxx @@ -1,6 +1,7 @@ #include #include #include +#include #include "gtest/gtest.h" diff --git a/roottest/root/io/evolution/rules/execSourceTypes.cxx b/roottest/root/io/evolution/rules/execSourceTypes.cxx index f742782c1c86b..123b627a2a4f7 100644 --- a/roottest/root/io/evolution/rules/execSourceTypes.cxx +++ b/roottest/root/io/evolution/rules/execSourceTypes.cxx @@ -8,6 +8,7 @@ #include #include #include +#include struct A { float f = 1.1;