Skip to content

Commit

Permalink
#1602: make version checking more concise
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Nov 17, 2021
1 parent ea8ea4c commit 6977d88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake-modules/SetCXXCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)

if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
# 4.9.3 complains about std::min not being constexpr
if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 5))
if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 5))
message("${PROJECT_NAME} currently requires g++ 5 or greater. If you need it to work with 4.9, please complain.")
endif ()
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6)
Expand All @@ -17,7 +17,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
if (APPLE)
list(APPEND TARGET_CXX_FLAGS -stdlib=libc++ -DCLI11_EXPERIMENTAL_OPTIONAL=0)
endif ()
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7)
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7)
list(APPEND TARGET_CXX_FLAGS -DCLI11_EXPERIMENTAL_OPTIONAL=0)
endif()
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6)
Expand Down

0 comments on commit 6977d88

Please sign in to comment.