summaryrefslogtreecommitdiff
path: root/Source/cmInstallTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-08-03 16:31:08 -0400
committerBrad King <brad.king@kitware.com>2007-08-03 16:31:08 -0400
commitbffcff45302210b65728d4d6a4b831e1605150f0 (patch)
treeec02cebffba81d55eeaeabdd58544516dfb0423e /Source/cmInstallTargetGenerator.cxx
parentd7118006deaf15c6e1b796b33cd883dd9bfa14fb (diff)
downloadcmake-bffcff45302210b65728d4d6a4b831e1605150f0.tar.gz
ENH: Added warning when an install rule is created from an EXCLUDE_FROM_ALL target. Added a foo/preinstall version of targets that need relinking so that exclude-from-all targets can be manually relinked for installation.
Diffstat (limited to 'Source/cmInstallTargetGenerator.cxx')
-rw-r--r--Source/cmInstallTargetGenerator.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index fc088dfd63..f5be726f1a 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -45,6 +45,17 @@ cmInstallTargetGenerator
//----------------------------------------------------------------------------
void cmInstallTargetGenerator::GenerateScript(std::ostream& os)
{
+ // Warn if installing an exclude-from-all target.
+ if(this->Target->GetPropertyAsBool("EXCLUDE_FROM_ALL"))
+ {
+ cmOStringStream msg;
+ msg << "WARNING: Target \"" << this->Target->GetName()
+ << "\" has EXCLUDE_FROM_ALL set and will not be built by default "
+ << "but an install rule has been provided for it. CMake does "
+ << "not define behavior for this case.";
+ cmSystemTools::Message(msg.str().c_str(), "Warning");
+ }
+
// Track indentation.
Indent indent;