Commit af7e1545 authored by Raul Tambre's avatar Raul Tambre
Browse files

CUDA, CXX: Remove HAS_FULL_SUPPORT for C++17 and 20

CMake has no features for C++ versions past 14 and it seems unlikely we'd want
to add any.
Remove the related code.
parent f970f4c3
......@@ -94,20 +94,10 @@ endmacro()
macro(cmake_record_cxx_compile_features)
set(_result 0)
if(_result EQUAL 0 AND DEFINED CMAKE_CXX20_STANDARD_COMPILE_OPTION)
if(CMAKE_CXX20_STANDARD__HAS_FULL_SUPPORT)
_has_compiler_features_cxx(20)
else()
_record_compiler_features_cxx(20)
endif()
unset(CMAKE_CXX20_STANDARD__HAS_FULL_SUPPORT)
_has_compiler_features_cxx(20)
endif()
if(_result EQUAL 0 AND DEFINED CMAKE_CXX17_STANDARD_COMPILE_OPTION)
if(CMAKE_CXX17_STANDARD__HAS_FULL_SUPPORT)
_has_compiler_features_cxx(17)
else()
_record_compiler_features_cxx(17)
endif()
unset(CMAKE_CXX17_STANDARD__HAS_FULL_SUPPORT)
_has_compiler_features_cxx(17)
endif()
if(_result EQUAL 0 AND DEFINED CMAKE_CXX14_STANDARD_COMPILE_OPTION)
if(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT)
......@@ -138,20 +128,10 @@ endmacro()
macro(cmake_record_cuda_compile_features)
set(_result 0)
if(_result EQUAL 0 AND DEFINED CMAKE_CUDA20_STANDARD_COMPILE_OPTION)
if(CMAKE_CUDA20_STANDARD__HAS_FULL_SUPPORT)
_has_compiler_features_cuda(20)
else()
_record_compiler_features_cuda(20)
endif()
unset(CMAKE_CUDA20_STANDARD__HAS_FULL_SUPPORT)
_has_compiler_features_cuda(20)
endif()
if(_result EQUAL 0 AND DEFINED CMAKE_CUDA17_STANDARD_COMPILE_OPTION)
if(CMAKE_CUDA17_STANDARD__HAS_FULL_SUPPORT)
_has_compiler_features_cuda(17)
else()
_record_compiler_features_cuda(17)
endif()
unset(CMAKE_CUDA17_STANDARD__HAS_FULL_SUPPORT)
_has_compiler_features_cuda(17)
endif()
if(_result EQUAL 0 AND DEFINED CMAKE_CUDA14_STANDARD_COMPILE_OPTION)
if(CMAKE_CUDA14_STANDARD__HAS_FULL_SUPPORT)
......
......@@ -155,10 +155,6 @@ macro(__compiler_clang_cxx_standards lang)
set(CMAKE_${lang}17_EXTENSION_COMPILE_OPTION "-std=gnu++1z")
endif()
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 6.0)
set(CMAKE_${lang}17_STANDARD__HAS_FULL_SUPPORT ON)
endif()
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 11.0)
set(CMAKE_${lang}20_STANDARD_COMPILE_OPTION "-std=c++20")
set(CMAKE_${lang}20_EXTENSION_COMPILE_OPTION "-std=gnu++20")
......@@ -180,8 +176,6 @@ macro(__compiler_clang_cxx_standards lang)
# This clang++ is missing some features because of MSVC compatibility.
unset(CMAKE_${lang}11_STANDARD__HAS_FULL_SUPPORT)
unset(CMAKE_${lang}14_STANDARD__HAS_FULL_SUPPORT)
unset(CMAKE_${lang}17_STANDARD__HAS_FULL_SUPPORT)
unset(CMAKE_${lang}20_STANDARD__HAS_FULL_SUPPORT)
endif()
__compiler_check_default_language_standard(${lang} 2.1 98)
......
......@@ -18,7 +18,6 @@ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.10)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 17.1)
set(CMAKE_CXX17_STANDARD_COMPILE_OPTION --c++17)
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION --c++17 --gnu_extensions)
set(CMAKE_CXX17_STANDARD__HAS_FULL_SUPPORT ON)
endif()
endif()
endif()
......
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