diff options
author | Brad King <brad.king@kitware.com> | 2013-06-05 13:39:05 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-06-05 13:39:05 (GMT) |
commit | 93317839b0aa7b47e37aad96ef3e0d4cfea236ba (patch) | |
tree | f01fec3a9f24ff5e7460ae25c8e4ac078371c2e0 /Source/cmTarget.cxx | |
parent | ff8917fdd2e8739a46c84ab03911258c23779744 (diff) | |
parent | a984f3257e95f29a72da6566859d4c6a8a5d749b (diff) | |
download | CMake-93317839b0aa7b47e37aad96ef3e0d4cfea236ba.zip CMake-93317839b0aa7b47e37aad96ef3e0d4cfea236ba.tar.gz CMake-93317839b0aa7b47e37aad96ef3e0d4cfea236ba.tar.bz2 |
Merge topic 'add_compile_options-command'
a984f32 Introduce add_compile_options command.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ab051d0..7d25b91 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" @@ -1640,6 +1640,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); + } this->SetPropertyDefault("C_VISIBILITY_PRESET", 0); this->SetPropertyDefault("CXX_VISIBILITY_PRESET", 0); |