mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-21 23:00:50 +08:00
Refactor: Use anonymous namespace instead of static
s in cpack.cxx
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
This commit is contained in:
@@ -29,19 +29,20 @@
|
|||||||
#include "cmSystemTools.h"
|
#include "cmSystemTools.h"
|
||||||
#include "cmake.h"
|
#include "cmake.h"
|
||||||
|
|
||||||
static const char* cmDocumentationName[][2] = {
|
namespace {
|
||||||
|
const char* cmDocumentationName[][2] = {
|
||||||
{ nullptr, " cpack - Packaging driver provided by CMake." },
|
{ nullptr, " cpack - Packaging driver provided by CMake." },
|
||||||
{ nullptr, nullptr }
|
{ nullptr, nullptr }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char* cmDocumentationUsage[][2] = {
|
const char* cmDocumentationUsage[][2] = {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
{ nullptr, " cpack [options]" },
|
{ nullptr, " cpack [options]" },
|
||||||
{ nullptr, nullptr }
|
{ nullptr, nullptr }
|
||||||
// clang-format on
|
// clang-format on
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char* cmDocumentationOptions[][2] = {
|
const char* cmDocumentationOptions[][2] = {
|
||||||
{ "-G <generators>", "Override/define CPACK_GENERATOR" },
|
{ "-G <generators>", "Override/define CPACK_GENERATOR" },
|
||||||
{ "-C <Configuration>", "Specify the project configuration" },
|
{ "-C <Configuration>", "Specify the project configuration" },
|
||||||
{ "-D <var>=<value>", "Set a CPack variable." },
|
{ "-D <var>=<value>", "Set a CPack variable." },
|
||||||
@@ -90,10 +91,11 @@ int cpackDefinitionArgument(const char* argument, const char* cValue,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cpackProgressCallback(const std::string& message, float /*unused*/)
|
void cpackProgressCallback(const std::string& message, float /*unused*/)
|
||||||
{
|
{
|
||||||
std::cout << "-- " << message << std::endl;
|
std::cout << "-- " << message << std::endl;
|
||||||
}
|
}
|
||||||
|
} // namespace
|
||||||
|
|
||||||
// this is CPack.
|
// this is CPack.
|
||||||
int main(int argc, char const* const* argv)
|
int main(int argc, char const* const* argv)
|
||||||
|
Reference in New Issue
Block a user