summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-11-05 13:05:08 (GMT)
committerBrad King <brad.king@kitware.com>2010-11-05 13:05:08 (GMT)
commit95f149e61f1ad8c8cadd74f2dbe36a2613815cc2 (patch)
treef1cec8d2621f029c8243db86ed1a73ec1bed4008 /Source
parent07cfa57ec5f9f906e075512646100719a0a615aa (diff)
downloadCMake-95f149e61f1ad8c8cadd74f2dbe36a2613815cc2.zip
CMake-95f149e61f1ad8c8cadd74f2dbe36a2613815cc2.tar.gz
CMake-95f149e61f1ad8c8cadd74f2dbe36a2613815cc2.tar.bz2
Define LINK_DEPENDS target property (#11406)
Custom Makefile link rules may need to depend on linker scripts. Define this property to allow user-specified link-time dependencies.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx7
-rw-r--r--Source/cmTarget.cxx12
2 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 0c150df..9153f3a 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1534,6 +1534,13 @@ void cmMakefileTargetGenerator
{
depends.push_back(*obj);
}
+
+ // Add user-specified dependencies.
+ if(const char* linkDepends =
+ this->Target->GetProperty("LINK_DEPENDS"))
+ {
+ cmSystemTools::ExpandListArgument(linkDepends, depends);
+ }
}
//----------------------------------------------------------------------------
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 5380257..ca61b1f 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -532,6 +532,18 @@ void cmTarget::DefineProperties(cmake *cm)
"configurations explicitly.");
cm->DefineProperty
+ ("LINK_DEPENDS", cmProperty::TARGET,
+ "Additional files on which a target binary depends for linking.",
+ "Specifies a semicolon-separated list of full-paths to files on which "
+ "the link rule for this target depends. "
+ "The target binary will be linked if any of the named files is newer "
+ "than it."
+ "\n"
+ "This property is ignored by non-Makefile generators. "
+ "It is intended to specify dependencies on \"linker scripts\" for "
+ "custom Makefile link rules.");
+
+ cm->DefineProperty
("LINK_INTERFACE_LIBRARIES", cmProperty::TARGET,
"List public interface libraries for a shared library or executable.",
"By default linking to a shared library target transitively "