mirror of
https://github.com/reactos/CMake.git
synced 2025-01-20 18:34:22 +00:00
CUDA: Add support language levels (98/11)
This commit is contained in:
parent
f8aac21947
commit
ce4ec876ce
@ -1,5 +1,6 @@
|
||||
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user