diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2022-08-23 17:21:40 (GMT) |
---|---|---|
committer | Alex Turbov <i.zaufi@gmail.com> | 2022-11-17 12:37:11 (GMT) |
commit | 807aa8e35382ab55120ccb1e6ae88523ad7ee5a3 (patch) | |
tree | dce282673319fcd2616c8273efcae5e8e1ddd7da /Source | |
parent | 96dcfa6b446e5e94143b2d83c587d09b0d00031f (diff) | |
download | CMake-807aa8e35382ab55120ccb1e6ae88523ad7ee5a3.zip CMake-807aa8e35382ab55120ccb1e6ae88523ad7ee5a3.tar.gz CMake-807aa8e35382ab55120ccb1e6ae88523ad7ee5a3.tar.bz2 |
CMakeSetup.cxx: Use anonymous namespace instead of `static`
Diffstat (limited to 'Source')
-rw-r--r-- | Source/QtDialog/CMakeSetup.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index a15ec81..3113d64 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -22,11 +22,12 @@ #include "cmSystemTools.h" // IWYU pragma: keep #include "cmake.h" -static const char* cmDocumentationName[][2] = { { nullptr, - " cmake-gui - CMake GUI." }, - { nullptr, nullptr } }; +namespace { +const char* cmDocumentationName[][2] = { { nullptr, + " cmake-gui - CMake GUI." }, + { nullptr, nullptr } }; -static const char* cmDocumentationUsage[][2] = { +const char* cmDocumentationUsage[][2] = { { nullptr, " cmake-gui [options]\n" " cmake-gui [options] <path-to-source>\n" @@ -36,12 +37,13 @@ static const char* cmDocumentationUsage[][2] = { { nullptr, nullptr } }; -static const char* cmDocumentationOptions[][2] = { +const char* cmDocumentationOptions[][2] = { { "-S <path-to-source>", "Explicitly specify a source directory." }, { "-B <path-to-build>", "Explicitly specify a build directory." }, { "--preset=<preset>", "Specify a configure preset." }, { nullptr, nullptr } }; +} // anonymous namespace #if defined(Q_OS_MAC) static int cmOSXInstall(std::string dir); @@ -252,6 +254,7 @@ int main(int argc, char** argv) # include <unistd.h> # include "cm_sys_stat.h" + static bool cmOSXInstall(std::string const& dir, std::string const& tool) { if (tool.empty()) { @@ -277,6 +280,7 @@ static bool cmOSXInstall(std::string const& dir, std::string const& tool) << "': " << strerror(err) << "\n"; return false; } + static int cmOSXInstall(std::string dir) { if (!cmHasLiteralSuffix(dir, "/")) { |