summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.h
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2013-06-07 18:26:03 (GMT)
committerBrad King <brad.king@kitware.com>2013-07-01 13:01:01 (GMT)
commit539356f1281902f5494828eca963d95e2b726dda (patch)
treef7271145dacaf817b96f518998c49bd8671da535 /Source/cmGlobalNinjaGenerator.h
parent874e17120db832656a77665e2ac13168aaf1e207 (diff)
downloadCMake-539356f1281902f5494828eca963d95e2b726dda.zip
CMake-539356f1281902f5494828eca963d95e2b726dda.tar.gz
CMake-539356f1281902f5494828eca963d95e2b726dda.tar.bz2
Ninja: Custom Command file depends don't need to exist before building
When converting custom commands for the ninja build system we need to make sure that any file dependencies that exist in the build tree are converted to phony targets. This tells ninja that these files might not exist when starting the build, but could be generated during the build. This is done by tracking all dependencies for custom command targets. After all have been written out we remove all items from the set that have been seen as a target, custom command output, an alias, or a file in the source directory. Anything that is left is considered to be a file that will be generated as a side effect of another custom command.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.h')
-rw-r--r--Source/cmGlobalNinjaGenerator.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index a7c8100..e046c7c 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -321,6 +321,7 @@ private:
void WriteAssumedSourceDependencies();
void WriteTargetAliases(std::ostream& os);
+ void WriteUnknownExplicitDependencies(std::ostream& os);
void WriteBuiltinTargets(std::ostream& os);
void WriteTargetAll(std::ostream& os);
@@ -358,6 +359,12 @@ private:
/// The set of custom command outputs we have seen.
std::set<std::string> CustomCommandOutputs;
+ //The combined explicit dependencies of all build commands that the global
+ //generator has issued. When combined with CombinedBuildOutputs it allows
+ //us to detect the set of explicit dependencies that have
+ std::set<std::string> CombinedBuildExplicitDependencies;
+ std::set<std::string> CombinedBuildOutputs;
+
/// The mapping from source file to assumed dependencies.
std::map<std::string, std::set<std::string> > AssumedSourceDependencies;