Commit e9d5cc08 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

CMake: allow legacy C++ standard names

parent 1f371066
......@@ -129,11 +129,11 @@ IF(NOT ROOT_FOUND)
ENDIF()
# Downgrade to C++14 if ROOT is not build with C++17 support
IF(ROOT_CXX_FLAGS MATCHES ".*std=c\\+\\+17.*")
IF(ROOT_CXX_FLAGS MATCHES ".*std=c\\+\\+1[7z].*")
IF(NOT SUPPORT_STD_CXX17)
MESSAGE(FATAL_ERROR "ROOT was built with C++17 support but current compiler doesn't support it")
ENDIF()
ELSEIF(ROOT_CXX_FLAGS MATCHES ".*std=c\\+\\+1[14].*")
ELSEIF(ROOT_CXX_FLAGS MATCHES ".*std=c\\+\\+1[14y].*")
SET(CMAKE_CXX_STANDARD 14)
ELSEIF(ROOT_CXX_FLAGS MATCHES ".*std=c\\+\\+.*")
MESSAGE(FATAL_ERROR "ROOT was built with an unsupported C++ version: ${ROOT_CXX_FLAGS}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment