diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 2615e4c..9115eb7 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2078,9 +2078,15 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( (*this->BuildFileStream) << firstString; firstString = ""; hasFlags = true; - this->WriteString("<ObjectFileName>", 3); - (*this->BuildFileStream) << "$(IntDir)/" << objectName - << "</ObjectFileName>\n"; + if (lang == "CUDA") { + this->WriteString("<CompileOut>", 3); + (*this->BuildFileStream) << "$(IntDir)/" << objectName + << "</CompileOut>\n"; + } else { + this->WriteString("<ObjectFileName>", 3); + (*this->BuildFileStream) << "$(IntDir)/" << objectName + << "</ObjectFileName>\n"; + } } for (std::string const& config : this->Configurations) { std::string configUpper = cmSystemTools::UpperCase(config); @@ -2688,6 +2694,11 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions( cudaOptions.AddFlag("GPUDebugInfo", "false"); } + // The extension on object libraries the CUDA gives isn't + // consistent with how MSVC generates object libraries for C+, so set + // the default to not have any extension + cudaOptions.AddFlag("CompileOut", "$(IntDir)%(Filename).obj"); + bool notPtx = true; if (this->GeneratorTarget->GetPropertyAsBool("CUDA_SEPARABLE_COMPILATION")) { cudaOptions.AddFlag("GenerateRelocatableDeviceCode", "true"); |