summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cpack.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-12-10 13:16:29 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-12-10 13:17:06 (GMT)
commitd99e1cca20a58abce5c300dbfef98e1180e3c7bf (patch)
tree837a619eb11dca4a8f5de79db2e15d5080ec70a7 /Source/CPack/cpack.cxx
parent5f3b067bee1b30b6d74ef48f31e9e2bbb27cd27a (diff)
parent4a3ae1710ecefedef8c345cd00599b335bc164d2 (diff)
downloadCMake-d99e1cca20a58abce5c300dbfef98e1180e3c7bf.zip
CMake-d99e1cca20a58abce5c300dbfef98e1180e3c7bf.tar.gz
CMake-d99e1cca20a58abce5c300dbfef98e1180e3c7bf.tar.bz2
Merge topic 'cpack-status-callback'
4a3ae1710e CPack/External: Fix status messages of staging scripts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2696
Diffstat (limited to 'Source/CPack/cpack.cxx')
-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 7cf69fc..4e49727 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -89,6 +89,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)
{
@@ -202,6 +211,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());