From 1fff4183c2982e0f179f01ebeec078500735b275 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Fri, 29 Apr 2005 12:50:29 -0400 Subject: [PATCH] ENH: Try to see if GenerateBuildCommand produces apropriate result --- Source/cmBuildCommand.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx index 5785c00ce..e459b458a 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 const& args) { @@ -27,12 +30,10 @@ bool cmBuildCommand::InitialPass(std::vector 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 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 "