summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallTargetGenerator.cxx
diff options
context:
space:
mode:
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 fc088df..f5be726 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;