diff options
author | Brad King <brad.king@kitware.com> | 2006-06-15 13:45:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-06-15 13:45:02 (GMT) |
commit | 60487a227e76100ea812c0788f8499861d51ba70 (patch) | |
tree | 126e59f975aaf54a5e7e82a634fd228259d1f394 /Source/cmake.cxx | |
parent | 17258b398b44b311cc1144cbe5549de9352564da (diff) | |
download | CMake-60487a227e76100ea812c0788f8499861d51ba70.zip CMake-60487a227e76100ea812c0788f8499861d51ba70.tar.gz CMake-60487a227e76100ea812c0788f8499861d51ba70.tar.bz2 |
BUG: Always check dependency integrity whether or not CMake will re-run because the generator no longer checks integrity during generation.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 9a99f8e..550e0a6 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2035,9 +2035,7 @@ int cmake::CheckBuildSystem() // This method will check the integrity of the build system if the // option was given on the command line. It reads the given file to - // determine whether CMake should rerun. If it does rerun then the - // generation step will check the integrity of dependencies. If it - // does not then we need to check the integrity here. + // determine whether CMake should rerun. // If no file is provided for the check, we have to rerun. if(this->CheckBuildSystemArgument.size() == 0) @@ -2086,6 +2084,25 @@ 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') + { + genName = "Unix Makefiles"; + } + cmGlobalGenerator *ggd = this->CreateGlobalGenerator(genName); + if (ggd) + { + // Check the dependencies in case source files were removed. + std::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator()); + lgd->SetGlobalGenerator(ggd); + lgd->CheckDependencies(mf, verbose, this->ClearBuildSystem); + + // Check for multiple output pairs. + ggd->CheckMultipleOutputs(mf, verbose); + } + // Get the set of dependencies and outputs. const char* dependsStr = mf->GetDefinition("CMAKE_MAKEFILE_DEPENDS"); const char* outputsStr = mf->GetDefinition("CMAKE_MAKEFILE_OUTPUTS"); @@ -2130,24 +2147,6 @@ int cmake::CheckBuildSystem() } } - // compute depends based on the generator specified - const char* genName = mf->GetDefinition("CMAKE_DEPENDS_GENERATOR"); - if (!genName || genName[0] == '\0') - { - genName = "Unix Makefiles"; - } - cmGlobalGenerator *ggd = this->CreateGlobalGenerator(genName); - if (ggd) - { - // Check the dependencies in case source files were removed. - std::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator()); - lgd->SetGlobalGenerator(ggd); - lgd->CheckDependencies(mf, verbose, this->ClearBuildSystem); - - // Check for multiple output pairs. - ggd->CheckMultipleOutputs(mf, verbose); - } - // No need to rerun. return 0; } |