Skip to content

Commit b081206

Browse files
committed
benchmark/CMakeLists.txt: Do not require -std=c++11 on MSVC (all recent Microsoft compilers have it enabled by default)
1 parent 3d3d41d commit b081206

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎benchmark/CMakeLists.txt‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU"
3434
endif()
3535
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-parameter -Wextra -Wreorder -Wconversion")
3636

37-
CHECK_CXX_COMPILER_FLAG("-std=c++11" HAS_CPP11_FLAG)
38-
if (HAS_CPP11_FLAG)
39-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
40-
else()
41-
message(FATAL_ERROR "Unsupported compiler -- xsimd requires C++11 support!")
37+
if(NOT MSVC)
38+
CHECK_CXX_COMPILER_FLAG("-std=c++11" HAS_CPP11_FLAG)
39+
if (HAS_CPP11_FLAG)
40+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
41+
else()
42+
message(FATAL_ERROR "Unsupported compiler -- xsimd requires C++11 support!")
43+
endif()
4244
endif()
4345
endif()
4446

0 commit comments

Comments
 (0)