CMake: Fix progress reporting for custom targets (#12441)

Adds "include progress.make" to build.make, just like for
add_executable and add_library targets. The code was copied
from cmMakefileTargetGenerator::WriteCommonCodeRules().
This commit is contained in:
Johan Fänge 2011-09-13 17:24:55 +08:00 committed by David Cole
parent 3c101429a4
commit 7ab1162eaa
1 changed files with 14 additions and 0 deletions

View File

@ -34,6 +34,20 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
*this->BuildFileStream *this->BuildFileStream
<< "# Utility rule file for " << this->Target->GetName() << ".\n\n"; << "# Utility rule file for " << this->Target->GetName() << ".\n\n";
if(!this->NoRuleMessages)
{
const char* root = (this->Makefile->IsOn("CMAKE_MAKE_INCLUDE_FROM_ROOT")?
"$(CMAKE_BINARY_DIR)/" : "");
// Include the progress variables for the target.
*this->BuildFileStream
<< "# Include the progress variables for this target.\n"
<< this->LocalGenerator->IncludeDirective << " " << root
<< this->Convert(this->ProgressFileNameFull.c_str(),
cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKEFILE)
<< "\n\n";
}
// write the custom commands for this target // write the custom commands for this target
this->WriteTargetBuildRules(); this->WriteTargetBuildRules();