summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.h
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-05-13 14:42:06 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-05-14 15:50:14 (GMT)
commit7b23001f20440d6c631d9fd6df4ec0092efce4f5 (patch)
treebd15c78ec01bda6717564d63abebf03c32484487 /Source/cmGlobalNinjaGenerator.h
parentd745df4b01f860c16fd65494a9735d1c73cfde04 (diff)
downloadCMake-7b23001f20440d6c631d9fd6df4ec0092efce4f5.zip
CMake-7b23001f20440d6c631d9fd6df4ec0092efce4f5.tar.gz
CMake-7b23001f20440d6c631d9fd6df4ec0092efce4f5.tar.bz2
Ninja: Add support for additional clean files
Additional clean files for the Ninja generator can be registered via the new method `cmGlobalNinjaGenerator::AddAdditionalCleanFile`. If there are additional clean files, a new rule `CLEAN_ADDITIONAL` and a new build target `CMakeFiles/clean.additional` get generated. The `clean` target will depend on `CMakeFiles/clean.additional`, if the target exists.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.h')
-rw-r--r--Source/cmGlobalNinjaGenerator.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index ffcea60..0f90b30 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -257,6 +257,13 @@ public:
};
MapToNinjaPathImpl MapToNinjaPath() { return MapToNinjaPathImpl(this); }
+ // -- Additional clean files
+ void AddAdditionalCleanFile(std::string fileName);
+ const char* GetAdditionalCleanTargetName() const
+ {
+ return "CMakeFiles/clean.additional";
+ }
+
void AddCXXCompileCommand(const std::string& commandLine,
const std::string& sourceFile);
@@ -398,6 +405,7 @@ private:
void WriteBuiltinTargets(std::ostream& os);
void WriteTargetAll(std::ostream& os);
void WriteTargetRebuildManifest(std::ostream& os);
+ bool WriteTargetCleanAdditional(std::ostream& os);
void WriteTargetClean(std::ostream& os);
void WriteTargetHelp(std::ostream& os);
@@ -470,6 +478,7 @@ private:
std::string OutputPathPrefix;
std::string TargetAll;
std::string CMakeCacheFile;
+ std::set<std::string> AdditionalCleanFiles;
};
#endif // ! cmGlobalNinjaGenerator_h