summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-01-31 13:36:18 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-01-31 13:36:24 (GMT)
commit4499cc8bb65e217e1cb2959452ed391af82e757b (patch)
tree1eada76ab92c4f4dad203e736248c0d9fce44af8 /Source
parenta7ee918f197300ffed8f4ae0fafe6c3c2f4ea1b6 (diff)
parentfa583869f7e75cdc4c7499f0dbfab2cdac5061bd (diff)
downloadCMake-4499cc8bb65e217e1cb2959452ed391af82e757b.zip
CMake-4499cc8bb65e217e1cb2959452ed391af82e757b.tar.gz
CMake-4499cc8bb65e217e1cb2959452ed391af82e757b.tar.bz2
Merge topic 'msvc_cuda_files_use_consistent_obj_names'
fa583869 CUDA: Use MSVC default pattern for naming object files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1722
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx17
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");