Commit ce4ec876 authored by Robert Maynard's avatar Robert Maynard

CUDA: Add support language levels (98/11)

parent f8aac219
Pipeline #35185 passed with stage
set(CMAKE_CUDA_COMPILER "@CMAKE_CUDA_COMPILER@")
set(CMAKE_CUDA_COMPILER_ID "@CMAKE_CUDA_COMPILER_ID@")
set(CMAKE_CUDA_STANDARD_COMPUTED_DEFAULT "@CMAKE_CUDA_STANDARD_COMPUTED_DEFAULT@")
set(CMAKE_CUDA_COMPILER_ENV_VAR "CUDACXX")
......
......@@ -8,9 +8,10 @@ set(CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS -shared)
set(CMAKE_INCLUDE_SYSTEM_FLAG_CUDA -isystem=)
set(CMAKE_CUDA_COMPILE_OPTIONS_VISIBILITY -Xcompiler=-fvisibility=)
if (NOT CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 7.0)
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11")
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=c++11")
set(CMAKE_CUDA11_STANDARD_COMPILE_OPTION "-std=c++11")
set(CMAKE_CUDA11_EXTENSION_COMPILE_OPTION "-std=c++11")
endif()
set(CMAKE_CUDA98_STANDARD_COMPILE_OPTION "")
set(CMAKE_CUDA98_EXTENSION_COMPILE_OPTION "")
set(CMAKE_CUDA11_STANDARD_COMPILE_OPTION "-std=c++11")
set(CMAKE_CUDA11_EXTENSION_COMPILE_OPTION "-std=c++11")
set(CMAKE_CUDA_STANDARD_DEFAULT 98)
......@@ -1472,6 +1472,9 @@ void cmLocalGenerator::AddCompilerRequirementFlag(
langStdMap["C"].push_back("11");
langStdMap["C"].push_back("99");
langStdMap["C"].push_back("90");
langStdMap["CUDA"].push_back("11");
langStdMap["CUDA"].push_back("98");
}
std::string standard(standardProp);
......
......@@ -267,6 +267,9 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
this->SetPropertyDefault("CXX_STANDARD", CM_NULLPTR);
this->SetPropertyDefault("CXX_STANDARD_REQUIRED", CM_NULLPTR);
this->SetPropertyDefault("CXX_EXTENSIONS", CM_NULLPTR);
this->SetPropertyDefault("CUDA_STANDARD", CM_NULLPTR);
this->SetPropertyDefault("CUDA_STANDARD_REQUIRED", CM_NULLPTR);
this->SetPropertyDefault("CUDA_EXTENSIONS", CM_NULLPTR);
this->SetPropertyDefault("LINK_SEARCH_START_STATIC", CM_NULLPTR);
this->SetPropertyDefault("LINK_SEARCH_END_STATIC", CM_NULLPTR);
}
......
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