summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-02-06 16:18:56 (GMT)
committerBrad King <brad.king@kitware.com>2009-02-06 16:18:56 (GMT)
commit2282748907896da8fb4aabcb5b76051c50ba2a5c (patch)
treefec6a5d27ef8805fa89fbaa77b8a2886c9fd9c28 /Source/cmake.cxx
parent81601796a64807689e6d0af2bbd263b672e8434d (diff)
downloadCMake-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/cmake.cxx')
-rw-r--r--Source/cmake.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 10db0ad..69cf6b4 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2657,6 +2657,27 @@ int cmake::CheckBuildSystem()
}
}
+ // If any byproduct of makefile generation is missing we must re-run.
+ std::vector<std::string> products;
+ if(const char* productStr = mf->GetDefinition("CMAKE_MAKEFILE_PRODUCTS"))
+ {
+ cmSystemTools::ExpandListArgument(productStr, products);
+ }
+ for(std::vector<std::string>::const_iterator pi = products.begin();
+ pi != products.end(); ++pi)
+ {
+ if(!cmSystemTools::FileExists(pi->c_str()))
+ {
+ if(verbose)
+ {
+ cmOStringStream msg;
+ msg << "Re-run cmake, missing byproduct: " << *pi << "\n";
+ cmSystemTools::Stdout(msg.str().c_str());
+ }
+ return 1;
+ }
+ }
+
// Get the set of dependencies and outputs.
std::vector<std::string> depends;
std::vector<std::string> outputs;