diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-04-29 16:50:29 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-04-29 16:50:29 (GMT) |
commit | 1fff4183c2982e0f179f01ebeec078500735b275 (patch) | |
tree | 453e46996f9f1677a9cda75bb6e5ae4234b9357b /Source/cmBuildCommand.cxx | |
parent | 61d0a75d11c2ff93c972adeaa28a08f6314d5c07 (diff) | |
download | CMake-1fff4183c2982e0f179f01ebeec078500735b275.zip CMake-1fff4183c2982e0f179f01ebeec078500735b275.tar.gz CMake-1fff4183c2982e0f179f01ebeec078500735b275.tar.bz2 |
ENH: Try to see if GenerateBuildCommand produces apropriate result
Diffstat (limited to 'Source/cmBuildCommand.cxx')
-rw-r--r-- | Source/cmBuildCommand.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx index 5785c00..e459b45 100644 --- a/Source/cmBuildCommand.cxx +++ b/Source/cmBuildCommand.cxx @@ -16,6 +16,9 @@ =========================================================================*/ #include "cmBuildCommand.h" +#include "cmLocalGenerator.h" +#include "cmGlobalGenerator.h" + // cmBuildCommand bool cmBuildCommand::InitialPass(std::vector<std::string> const& args) { @@ -27,12 +30,10 @@ bool cmBuildCommand::InitialPass(std::vector<std::string> const& args) const char* define = args[0].c_str(); const char* cacheValue = m_Makefile->GetDefinition(define); - if(cacheValue) - { - return true; - } std::string makecommand; std::string makeprogram = args[1]; + std::string makecmd = m_Makefile->GetLocalGenerator()->GetGlobalGenerator()->GenerateBuildCommand( + makeprogram.c_str(), m_Makefile->GetProjectName(), 0, "Release", true); if(makeprogram.find("msdev") != std::string::npos || makeprogram.find("MSDEV") != std::string::npos ) { @@ -62,6 +63,11 @@ bool cmBuildCommand::InitialPass(std::vector<std::string> const& args) makecommand = makeprogram; makecommand += " -i"; } + std::cerr << "-- Compare: " << makecommand.c_str() << " and " << makecmd.c_str() << ": " << (makecmd == makecommand) << std::endl; + if(cacheValue) + { + return true; + } m_Makefile->AddCacheDefinition(define, makecommand.c_str(), "Command used to build entire project " |