mirror of
https://github.com/reactos/CMake.git
synced 2024-11-28 14:01:21 +00:00
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
This commit is contained in:
parent
6294296906
commit
4a3ae1710e
@ -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());
|
||||
|
@ -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")
|
||||
|
@ -0,0 +1 @@
|
||||
-- This status message is expected to be visible
|
Loading…
Reference in New Issue
Block a user