summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackGenerator.cxx
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-01-25 20:31:33 (GMT)
committerRegina Pfeifer <regina@mailbox.org>2019-01-29 15:32:52 (GMT)
commitbcee24aecc1eaf6615eac9f24ae06acdf38845d3 (patch)
tree7a5ce493d66e1ff9a154bbd7503bd6e646624444 /Source/CPack/cmCPackGenerator.cxx
parent9620cb935a49e7b4955f5b1d0ffa2e93b4327591 (diff)
downloadCMake-bcee24aecc1eaf6615eac9f24ae06acdf38845d3.zip
CMake-bcee24aecc1eaf6615eac9f24ae06acdf38845d3.tar.gz
CMake-bcee24aecc1eaf6615eac9f24ae06acdf38845d3.tar.bz2
Use `std::function` for callbacks
Diffstat (limited to 'Source/CPack/cmCPackGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 4728f69..3309e1b 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -43,12 +43,6 @@ cmCPackGenerator::~cmCPackGenerator()
this->MakefileMap = nullptr;
}
-void cmCPackGeneratorProgress(const char* msg, float prog, void* ptr)
-{
- cmCPackGenerator* self = static_cast<cmCPackGenerator*>(ptr);
- self->DisplayVerboseOutput(msg, prog);
-}
-
void cmCPackGenerator::DisplayVerboseOutput(const char* msg, float progress)
{
(void)progress;
@@ -696,7 +690,9 @@ int cmCPackGenerator::InstallCMakeProject(
cm.SetHomeOutputDirectory("");
cm.GetCurrentSnapshot().SetDefaultDefinitions();
cm.AddCMakePaths();
- cm.SetProgressCallback(cmCPackGeneratorProgress, this);
+ cm.SetProgressCallback([this](const char* msg, float prog) {
+ this->DisplayVerboseOutput(msg, prog);
+ });
cm.SetTrace(this->Trace);
cm.SetTraceExpand(this->TraceExpand);
cmGlobalGenerator gg(&cm);