diff options
author | Brad King <brad.king@kitware.com> | 2009-02-06 16:18:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-02-06 16:18:56 (GMT) |
commit | 2282748907896da8fb4aabcb5b76051c50ba2a5c (patch) | |
tree | fec6a5d27ef8805fa89fbaa77b8a2886c9fd9c28 /Source/cmGlobalUnixMakefileGenerator3.cxx | |
parent | 81601796a64807689e6d0af2bbd263b672e8434d (diff) | |
download | CMake-2282748907896da8fb4aabcb5b76051c50ba2a5c.zip CMake-2282748907896da8fb4aabcb5b76051c50ba2a5c.tar.gz CMake-2282748907896da8fb4aabcb5b76051c50ba2a5c.tar.bz2 |
BUG: Fix OS X AppBundle/FW byproducts dependencies
App Bundle and Framework directories, symlinks, and Info.plist files we
create during generation are byproducts, not outputs. We should re-run
CMake only when they are missing, not when they are old.
See issue #8465.
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.cxx | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index c72ff18..bad299c 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -352,18 +352,26 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() cmakefileStream << " \"" << lg->Convert(tmpStr.c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() << "\"\n"; - const std::vector<std::string>& outfiles = - lg->GetMakefile()->GetOutputFiles(); - for(std::vector<std::string>::const_iterator k= outfiles.begin(); - k != outfiles.end(); ++k) - { - cmakefileStream << " \"" << - lg->Convert(k->c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() - << "\"\n"; - } } cmakefileStream << " )\n\n"; + // CMake must rerun if a byproduct is missing. + { + cmakefileStream + << "# Byproducts of CMake generate step:\n" + << "SET(CMAKE_MAKEFILE_PRODUCTS\n"; + const std::vector<std::string>& outfiles = + lg->GetMakefile()->GetOutputFiles(); + for(std::vector<std::string>::const_iterator k = outfiles.begin(); + k != outfiles.end(); ++k) + { + cmakefileStream << " \"" << + lg->Convert(k->c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() + << "\"\n"; + } + cmakefileStream << " )\n\n"; + } + this->WriteMainCMakefileLanguageRules(cmakefileStream, this->LocalGenerators); } |