File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -35,11 +35,14 @@ gtest_discover_tests(httplib-test)
3535if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang|MSVC" )
3636 # Check for C++20 support
3737 include (CheckCXXCompilerFlag)
38- check_cxx_compiler_flag("-std=c++20" COMPILER_SUPPORTS_CXX20)
3938 if (MSVC )
40- set (COMPILER_SUPPORTS_CXX20 TRUE )
39+ check_cxx_compiler_flag("/std:c++20" COMPILER_SUPPORTS_CXX20)
40+ else ()
41+ check_cxx_compiler_flag("-std=c++20" COMPILER_SUPPORTS_CXX20)
4142 endif ()
4243
44+ message (STATUS "C++20 support: ${COMPILER_SUPPORTS_CXX20} " )
45+
4346 if (COMPILER_SUPPORTS_CXX20)
4447 add_executable (httplib-test -stream test -stream.cc)
4548 target_compile_features (httplib-test -stream PRIVATE cxx_std_20)
@@ -48,6 +51,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang|MSVC")
4851 )
4952 target_link_libraries (httplib-test -stream PRIVATE httplib GTest::gtest_main)
5053 gtest_discover_tests(httplib-test -stream)
54+ message (STATUS "Building httplib-test-stream (C++20 streaming tests)" )
5155 else ()
5256 message (STATUS "C++20 not supported, skipping test-stream" )
5357 endif ()
You can’t perform that action at this time.
0 commit comments