Updates will be applied April 15th at 12pm EDT (UTC-0400). GitLab could be a little slow between 12 - 12:45pm EDT.

Commit 1d861038 authored by Brad King's avatar Brad King

Merge branch 'vs-cuda-fix-flags' into release-3.9

parents c24e6656 bbc1f364
......@@ -2530,7 +2530,7 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions(
cudaOptions.RemoveFlag("AdditionalCompilerOptions");
if (!aco.empty()) {
aco = this->LocalGenerator->EscapeForShell(aco, false);
cudaOptions.AppendFlag("AdditionalOptions", "-Xcompiler=" + aco);
cudaOptions.AppendFlagString("AdditionalOptions", "-Xcompiler=" + aco);
}
}
......@@ -2619,8 +2619,8 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaLinkOptions(
// Suppress deprecation warnings for default GPU targets during device link.
if (cmSystemTools::VersionCompareGreaterEq(
this->GlobalGenerator->GetPlatformToolsetCudaString(), "8.0")) {
cudaLinkOptions.AppendFlag("AdditionalOptions",
"-Wno-deprecated-gpu-targets");
cudaLinkOptions.AppendFlagString("AdditionalOptions",
"-Wno-deprecated-gpu-targets");
}
this->CudaLinkOptions[configName] = pOptions.release();
......
......@@ -16,6 +16,11 @@ set(CMAKE_CUDA_STANDARD 11)
add_library(CUDASeparateLibA STATIC file1.cu file2.cu file3.cu)
if(CMAKE_CUDA_SIMULATE_ID STREQUAL "MSVC")
# Test adding a flag that is not in our CUDA flag table for VS.
if(NOT CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 8)
string(APPEND CMAKE_CUDA_FLAGS " --ftemplate-depth 50")
endif()
# Test adding a flag that nvcc should pass to the host compiler.
target_compile_options(CUDASeparateLibA PRIVATE -Xcompiler=-bigobj)
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