Compare commits

..

No commits in common. "b725122c891e57689233174a5d2904610c1339d2" and "0f5a90952b28a74204a3de81ff4a7ab8caf7845f" have entirely different histories.

View File

@ -34,16 +34,29 @@ endif()
# Выбор стандарта по умолчанию (можно переопределить в проекте)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
check_cxx_compiler_flag(-std=c++14 HAVE_FLAG_STD_CXX14)
if(HAVE_FLAG_STD_CXX14)
check_cxx_compiler_flag(-std=c++17 HAVE_FLAG_STD_CXX17)
if(HAVE_FLAG_STD_CXX17)
if(${CMAKE_VERSION} VERSION_LESS "3.8.0")
check_enable_cxx_flag(-std=c++17)
else()
set(CMAKE_CXX_STANDARD 17)
check_cxx_compiler_flag(-std=gnu++17 HAVE_FLAG_STD_GNUXX17)
if(HAVE_FLAG_STD_GNUXX17)
set(CMAKE_CXX_EXTENSIONS YES)
endif()
endif()
else()
check_cxx_compiler_flag(-std=c++14 HAVE_FLAG_STD_CXX14)
if(HAVE_FLAG_STD_CXX14)
set(CMAKE_CXX_STANDARD 14)
check_cxx_compiler_flag(-std=gnu++14 HAVE_FLAG_STD_GNUXX14)
if(HAVE_FLAG_STD_GNUXX14)
set(CMAKE_CXX_EXTENSIONS YES)
endif()
else()
else()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS YES)
endif()
endif()
# Common configuration for GCC, clang and Intel.