diff options
author | Brad King <brad.king@kitware.com> | 2007-12-21 17:22:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-12-21 17:22:12 (GMT) |
commit | d83b4cd255bcd13b5b7e4279a6e3e959fcb58688 (patch) | |
tree | 1987a83567e98da043994e7fa870fe48c7b08c8a /Source/cmake.cxx | |
parent | 6586149d64be27694652b40bfbcc4d19f6c2c5eb (diff) | |
download | CMake-d83b4cd255bcd13b5b7e4279a6e3e959fcb58688.zip CMake-d83b4cd255bcd13b5b7e4279a6e3e959fcb58688.tar.gz CMake-d83b4cd255bcd13b5b7e4279a6e3e959fcb58688.tar.bz2 |
ENH: Add a depends check step to custom targets. Add support for the IMPLICIT_DEPENDS feature of custom commands when building in custom targets. Convert multiple-output pair checks to be per-target instead of global.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index dc1c0d2..45f013f 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2547,29 +2547,24 @@ int cmake::CheckBuildSystem() return 1; } - // Now that we know the generator used to build the project, use it - // to check the dependency integrity. - const char* genName = mf->GetDefinition("CMAKE_DEPENDS_GENERATOR"); - if (!genName || genName[0] == '\0') + if(this->ClearBuildSystem) { - genName = "Unix Makefiles"; - } - // this global generator is never set to the cmake object so it is never - // deleted, so make it an auto_ptr - std::auto_ptr<cmGlobalGenerator> ggd(this->CreateGlobalGenerator(genName)); - if (ggd.get()) - { - // Check the dependencies in case source files were removed. - std::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator()); - lgd->SetGlobalGenerator(ggd.get()); + // Get the generator used for this build system. + const char* genName = mf->GetDefinition("CMAKE_DEPENDS_GENERATOR"); + if(!genName || genName[0] == '\0') + { + genName = "Unix Makefiles"; + } - if(this->ClearBuildSystem) + // Create the generator and use it to clear the dependencies. + std::auto_ptr<cmGlobalGenerator> + ggd(this->CreateGlobalGenerator(genName)); + if(ggd.get()) { + std::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator()); + lgd->SetGlobalGenerator(ggd.get()); lgd->ClearDependencies(mf, verbose); } - - // Check for multiple output pairs. - ggd->CheckMultipleOutputs(mf, verbose); } // Get the set of dependencies and outputs. |