From 7ab1162eaa1490be745f2b2a24ba7b4a3ec69112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20F=C3=A4nge?= Date: Tue, 13 Sep 2011 17:24:55 +0800 Subject: [PATCH] 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(). --- Source/cmMakefileUtilityTargetGenerator.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index f52f7ab50..a82c50349 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -34,6 +34,20 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles() *this->BuildFileStream << "# 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 this->WriteTargetBuildRules();