summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index f1d0ac3..eb1e3b2 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -297,7 +297,7 @@ void cmTarget::DefineProperties(cmake *cm)
"List of options to pass to the compiler.",
"This property specifies the list of options specified "
"so far for this property. "
- "This property exists on targets only. "
+ "This property exists on directories and targets. "
"\n"
"The target property values are used by the generators to set "
"the options for the compiler.\n"
@@ -1611,6 +1611,14 @@ void cmTarget::SetMakefile(cmMakefile* mf)
{
this->InsertInclude(*it);
}
+ const std::vector<cmValueWithOrigin> parentOptions =
+ this->Makefile->GetCompileOptionsEntries();
+
+ for (std::vector<cmValueWithOrigin>::const_iterator it
+ = parentOptions.begin(); it != parentOptions.end(); ++it)
+ {
+ this->InsertCompileOption(*it);
+ }
if(this->TargetTypeValue == cmTarget::SHARED_LIBRARY
|| this->TargetTypeValue == cmTarget::MODULE_LIBRARY)