summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-05-16 13:20:16 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-06-02 09:56:37 (GMT)
commit24466f22c0c0e3235f0a21bd2a298c39df50e2f3 (patch)
tree0769cc145436b80006cdc53eca5f1cab1d1ce6a3 /Source/cmTarget.cxx
parent80ca9c4b41ecdce069a6c3f4c1b558084a748876 (diff)
downloadCMake-24466f22c0c0e3235f0a21bd2a298c39df50e2f3.zip
CMake-24466f22c0c0e3235f0a21bd2a298c39df50e2f3.tar.gz
CMake-24466f22c0c0e3235f0a21bd2a298c39df50e2f3.tar.bz2
Add target_compile_options command.
This command populates the COMPILE_OPTIONS target property.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index ea5552e..1f20be2 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2915,6 +2915,20 @@ void cmTarget::InsertInclude(const cmValueWithOrigin &entry,
}
//----------------------------------------------------------------------------
+void cmTarget::InsertCompileOption(const cmValueWithOrigin &entry,
+ bool before)
+{
+ cmGeneratorExpression ge(entry.Backtrace);
+
+ std::vector<cmTargetInternals::TargetPropertyEntry*>::iterator position
+ = before ? this->Internal->CompileOptionsEntries.begin()
+ : this->Internal->CompileOptionsEntries.end();
+
+ this->Internal->CompileOptionsEntries.insert(position,
+ new cmTargetInternals::TargetPropertyEntry(ge.Parse(entry.Value)));
+}
+
+//----------------------------------------------------------------------------
static void processIncludeDirectories(cmTarget *tgt,
const std::vector<cmTargetInternals::TargetPropertyEntry*> &entries,
std::vector<std::string> &includes,