diff options
-rw-r--r-- | Source/CPack/cpack.cxx | 10 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt | 1 |
3 files changed, 13 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()); diff --git a/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake b/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake index e308ccb..2d7f993 100644 --- a/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake +++ b/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake @@ -22,3 +22,5 @@ expect_file(${CPACK_TEMPORARY_DIRECTORY}/f1/share/cpack-test/f1.txt) expect_file(${CPACK_TEMPORARY_DIRECTORY}/f2/share/cpack-test/f2.txt) expect_file(${CPACK_TEMPORARY_DIRECTORY}/f3/share/cpack-test/f3.txt) expect_file(${CPACK_TEMPORARY_DIRECTORY}/f4/share/cpack-test/f4.txt) + +message(STATUS "This status message is expected to be visible") diff --git a/Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt b/Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt new file mode 100644 index 0000000..37d635f --- /dev/null +++ b/Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt @@ -0,0 +1 @@ +-- This status message is expected to be visible |