diff options
author | Brad King <brad.king@kitware.com> | 2006-04-11 15:06:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-04-11 15:06:19 (GMT) |
commit | d5719f22c1dca3e100f1e3b5dfaa4fe7d26796a0 (patch) | |
tree | 714a99bed97290f96ff8f846fa6864cebbdc0a28 /Source/cmGlobalGenerator.cxx | |
parent | b613cf0be806cc1d37d2b590f1a5ba7898236ae8 (diff) | |
download | CMake-d5719f22c1dca3e100f1e3b5dfaa4fe7d26796a0.zip CMake-d5719f22c1dca3e100f1e3b5dfaa4fe7d26796a0.tar.gz CMake-d5719f22c1dca3e100f1e3b5dfaa4fe7d26796a0.tar.bz2 |
ENH: Added support for multiple outputs generated by a single custom command. For Visual Studio generators the native tool provides support. For Xcode and Makefile generators a simple trick is used. The first output is considered primary and has the build rule attached. Other outputs simply depend on the first output with no build rule. During cmake_check_build_system CMake detects when a secondary output is missing and removes the primary output to make sure all outputs are regenerated. This approach always builds the custom command at the right time and only once even during parallel builds.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 9e9bbe4..57f2eb0 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1428,9 +1428,10 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget( target.SetType(cmTarget::GLOBAL_TARGET, name); target.SetInAll(false); - std::vector<std::string> fileDepends; + std::vector<std::string> no_outputs; + std::vector<std::string> no_depends; // Store the custom command in the target. - cmCustomCommand cc(0, fileDepends, *commandLines, 0, 0); + cmCustomCommand cc(no_outputs, no_depends, *commandLines, 0, 0); target.GetPostBuildCommands().push_back(cc); target.SetProperty("EchoString", message); if ( depends_on_all ) @@ -1453,3 +1454,10 @@ void cmGlobalGenerator::AppendDirectoryForConfig(const char*, const char*, // this method to append the subdirectory for the given build // configuration. } + +//---------------------------------------------------------------------------- +void cmGlobalGenerator::CheckMultipleOutputs(cmMakefile*, bool) +{ + // Only certain generators need this check. They define this + // method. +} |