summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorNils Gladitz <n.gladitz@abberior-instruments.com>2018-12-01 08:15:17 (GMT)
committerBrad King <brad.king@kitware.com>2018-12-07 12:33:30 (GMT)
commit4a3ae1710ecefedef8c345cd00599b335bc164d2 (patch)
tree9d978e7ef95b168cd579035bea99b1ca3ad64abf /Source
parent62942969062fcc9f24ca057b6983532a973cfad6 (diff)
downloadCMake-4a3ae1710ecefedef8c345cd00599b335bc164d2.zip
CMake-4a3ae1710ecefedef8c345cd00599b335bc164d2.tar.gz
CMake-4a3ae1710ecefedef8c345cd00599b335bc164d2.tar.bz2
CPack/External: Fix status messages of staging scripts
Set progress callback on cmake instance used by CPack. The progress callback is used to output STATUS messages which are otherwise missing when issued from e.g. CPack External staging scripts. Fixes: #18567
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cpack.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index c083945..623cdcd 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -88,6 +88,15 @@ int cpackDefinitionArgument(const char* argument, const char* cValue,
return 1;
}
+static void cpackProgressCallback(const char* message, float progress,
+ void* clientdata)
+{
+ (void)progress;
+ (void)clientdata;
+
+ std::cout << "-- " << message << std::endl;
+}
+
// this is CPack.
int main(int argc, char const* const* argv)
{
@@ -201,6 +210,7 @@ int main(int argc, char const* const* argv)
cmake cminst(cmake::RoleScript);
cminst.SetHomeDirectory("");
cminst.SetHomeOutputDirectory("");
+ cminst.SetProgressCallback(cpackProgressCallback, nullptr);
cminst.GetCurrentSnapshot().SetDefaultDefinitions();
cmGlobalGenerator cmgg(&cminst);
cmMakefile globalMF(&cmgg, cminst.GetCurrentSnapshot());