summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:14:16 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:14:16 +0900
commitc5223aaf98b2d10aee32aa614519ee7a23698998 (patch)
treeeecf071a613334f3cf49c9345393cbd500e999df /Source
parentfa4077b016648a9fd90c99fdb782124a9097df71 (diff)
downloadcmake-c5223aaf98b2d10aee32aa614519ee7a23698998.tar.gz
cmake-c5223aaf98b2d10aee32aa614519ee7a23698998.tar.bz2
cmake-c5223aaf98b2d10aee32aa614519ee7a23698998.zip
Imported Upstream version 3.15.7upstream/3.15.7
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmLinkLineDeviceComputer.cxx36
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx8
3 files changed, 26 insertions, 20 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index ba06c4f7e..c4c477929 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 15)
-set(CMake_VERSION_PATCH 6)
+set(CMake_VERSION_PATCH 7)
#set(CMake_VERSION_RC 0)
diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx
index 8d2add635..2cb2fd635 100644
--- a/Source/cmLinkLineDeviceComputer.cxx
+++ b/Source/cmLinkLineDeviceComputer.cxx
@@ -163,33 +163,33 @@ bool requireDeviceLinking(cmGeneratorTarget& target, cmLocalGenerator& lg,
return cmSystemTools::IsOn(resolveDeviceSymbols);
}
- if (const char* separableCompilation =
- target.GetProperty("CUDA_SEPARABLE_COMPILATION")) {
- if (cmSystemTools::IsOn(separableCompilation)) {
- bool doDeviceLinking = false;
- switch (target.GetType()) {
- case cmStateEnums::SHARED_LIBRARY:
- case cmStateEnums::MODULE_LIBRARY:
- case cmStateEnums::EXECUTABLE:
- doDeviceLinking = true;
- break;
- default:
- break;
- }
- return doDeviceLinking;
- }
- }
-
// Determine if we have any dependencies that require
// us to do a device link step
const std::string cuda_lang("CUDA");
cmGeneratorTarget::LinkClosure const* closure =
target.GetLinkClosure(config);
-
bool closureHasCUDA =
(std::find(closure->Languages.begin(), closure->Languages.end(),
cuda_lang) != closure->Languages.end());
+
if (closureHasCUDA) {
+ if (const char* separableCompilation =
+ target.GetProperty("CUDA_SEPARABLE_COMPILATION")) {
+ if (cmSystemTools::IsOn(separableCompilation)) {
+ bool doDeviceLinking = false;
+ switch (target.GetType()) {
+ case cmStateEnums::SHARED_LIBRARY:
+ case cmStateEnums::MODULE_LIBRARY:
+ case cmStateEnums::EXECUTABLE:
+ doDeviceLinking = true;
+ break;
+ default:
+ break;
+ }
+ return doDeviceLinking;
+ }
+ }
+
cmComputeLinkInformation* pcli = target.GetLinkInformation(config);
if (pcli) {
cmLinkLineDeviceComputer deviceLinkComputer(
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 7a901763e..fa102f882 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1404,6 +1404,7 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
std::string comment = lg->ConstructComment(ccg);
comment = cmVS10EscapeComment(comment);
std::string script = lg->ConstructScript(ccg);
+ bool symbolic = false;
// input files for custom command
std::stringstream additional_inputs;
{
@@ -1430,6 +1431,12 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
ConvertToWindowsSlash(dep);
additional_inputs << sep << dep;
sep = ";";
+ if (!symbolic) {
+ if (cmSourceFile* sf = this->Makefile->GetSource(
+ dep, cmSourceFileLocationKind::Known)) {
+ symbolic = sf->GetPropertyAsBool("SYMBOLIC");
+ }
+ }
}
}
if (this->ProjectType != csproj) {
@@ -1438,7 +1445,6 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
}
// output files for custom command
std::stringstream outputs;
- bool symbolic = false;
{
const char* sep = "";
for (std::string const& o : ccg.GetOutputs()) {