diff options
author | Melanie Cappelaere <melanie.cappelaere@barco.com> | 2018-05-18 08:25:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-05-18 14:12:19 (GMT) |
commit | fd0da95f6333b7a12f4f9b22e60adb429430d283 (patch) | |
tree | 74b56856c23e51e4fe53bd5ac095ad346560a775 /Source/cmExtraEclipseCDT4Generator.cxx | |
parent | e81e024330c57b154a30f8c8af1a15a49d1614e5 (diff) | |
download | CMake-fd0da95f6333b7a12f4f9b22e60adb429430d283.zip CMake-fd0da95f6333b7a12f4f9b22e60adb429430d283.tar.gz CMake-fd0da95f6333b7a12f4f9b22e60adb429430d283.tar.bz2 |
Eclipse: Add property to include additional contents in .cproject file
Similar to ECLIPSE_EXTRA_NATURES which can be used to add a third party
nature to the .project, this property offers the possibility to inject
third party contents into the .cproject.
An example of where this is useful is MCUXpresso. This is an IDE based
on Eclipse. Compiling through CMake generated Eclipse projects works
fine by using a custom toolchain. However, in order to be able to debug
using such a project, an extra storageModule specific to the target
board is needed in the cproject.
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 258c9ca..e7279d9 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -1001,6 +1001,13 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const xml.EndElement(); // project xml.EndElement(); // storageModule + + // Append additional cproject contents without applying any XML formatting + if (const char* extraCProjectContents = + mf->GetState()->GetGlobalProperty("ECLIPSE_EXTRA_CPROJECT_CONTENTS")) { + fout << extraCProjectContents; + } + xml.EndElement(); // cproject } |