Skip to content

Commit

Permalink
benchmark/CMakeLists.txt: Do not require -std=c++11 on MSVC (all rece…
Browse files Browse the repository at this point in the history
…nt Microsoft compilers have it enabled by default)
  • Loading branch information
emmenlau committed Sep 3, 2020
1 parent 3d3d41d commit b081206
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU"
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-parameter -Wextra -Wreorder -Wconversion")

CHECK_CXX_COMPILER_FLAG("-std=c++11" HAS_CPP11_FLAG)
if (HAS_CPP11_FLAG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else()
message(FATAL_ERROR "Unsupported compiler -- xsimd requires C++11 support!")
if(NOT MSVC)
CHECK_CXX_COMPILER_FLAG("-std=c++11" HAS_CPP11_FLAG)
if (HAS_CPP11_FLAG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else()
message(FATAL_ERROR "Unsupported compiler -- xsimd requires C++11 support!")
endif()
endif()
endif()

Expand Down

0 comments on commit b081206

Please sign in to comment.