summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2019-07-04 19:44:44 (GMT)
committerAlex Turbov <i.zaufi@gmail.com>2019-07-09 22:06:26 (GMT)
commit0328b64efdf102206e855d16cd9b765f268c6bc9 (patch)
treef05f4e21dbd4f77711ac324ec0c84ae7566dd2c1
parentb821f9ad62d97b975255380674aaedfce296a8b8 (diff)
downloadCMake-0328b64efdf102206e855d16cd9b765f268c6bc9.zip
CMake-0328b64efdf102206e855d16cd9b765f268c6bc9.tar.gz
CMake-0328b64efdf102206e855d16cd9b765f268c6bc9.tar.bz2
Refactor: Remove one-time used macros
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
-rw-r--r--Source/cmakemain.cxx61
1 files changed, 30 insertions, 31 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index f80829f..4f088a8 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -54,34 +54,6 @@ static const char* cmDocumentationUsageNote[][2] = {
{ nullptr, nullptr }
};
-# define CMAKE_BUILD_OPTIONS \
- " <dir> = Project binary directory to be built.\n" \
- " --parallel [<jobs>], -j [<jobs>]\n" \
- " = Build in parallel using the given number of jobs. \n" \
- " If <jobs> is omitted the native build tool's \n" \
- " default number is used.\n" \
- " The CMAKE_BUILD_PARALLEL_LEVEL environment " \
- "variable\n" \
- " specifies a default parallel level when this " \
- "option\n" \
- " is not given.\n" \
- " --target <tgt>..., -t <tgt>... \n" \
- " = Build <tgt> instead of default targets.\n" \
- " --config <cfg> = For multi-configuration tools, choose <cfg>.\n" \
- " --clean-first = Build target 'clean' first, then build.\n" \
- " (To clean only, use --target 'clean'.)\n" \
- " --verbose, -v = Enable verbose output - if supported - including\n" \
- " the build commands to be executed. \n" \
- " -- = Pass remaining options to the native tool.\n"
-
-# define CMAKE_INSTALL_OPTIONS \
- " <dir> = Project binary directory to install.\n" \
- " --config <cfg> = For multi-configuration tools, choose <cfg>.\n" \
- " --component <comp> = Component-based install. Only install <comp>.\n" \
- " --prefix <prefix> = The installation prefix CMAKE_INSTALL_PREFIX.\n" \
- " --strip = Performing install/strip.\n" \
- " -v --verbose = Enable verbose output.\n"
-
static const char* cmDocumentationOptions[][2] = {
CMAKE_STANDARD_OPTIONS_TABLE,
{ "-E", "CMake command mode." },
@@ -539,7 +511,24 @@ static int do_build(int ac, char const* const* av)
std::cerr <<
"Usage: cmake --build <dir> [options] [-- [native-options]]\n"
"Options:\n"
- CMAKE_BUILD_OPTIONS
+ " <dir> = Project binary directory to be built.\n"
+ " --parallel [<jobs>], -j [<jobs>]\n"
+ " = Build in parallel using the given number of jobs. \n"
+ " If <jobs> is omitted the native build tool's \n"
+ " default number is used.\n"
+ " The CMAKE_BUILD_PARALLEL_LEVEL environment "
+ "variable\n"
+ " specifies a default parallel level when this "
+ "option\n"
+ " is not given.\n"
+ " --target <tgt>..., -t <tgt>... \n"
+ " = Build <tgt> instead of default targets.\n"
+ " --config <cfg> = For multi-configuration tools, choose <cfg>.\n"
+ " --clean-first = Build target 'clean' first, then build.\n"
+ " (To clean only, use --target 'clean'.)\n"
+ " --verbose, -v = Enable verbose output - if supported - including\n"
+ " the build commands to be executed. \n"
+ " -- = Pass remaining options to the native tool.\n"
;
/* clang-format on */
return 1;
@@ -625,8 +614,18 @@ static int do_install(int ac, char const* const* av)
}
if (dir.empty()) {
- std::cerr << "Usage: cmake --install <dir> "
- "[options]\nOptions:\n" CMAKE_INSTALL_OPTIONS;
+ /* clang-format off */
+ std::cerr <<
+ "Usage: cmake --install <dir> [options]\n"
+ "Options:\n"
+ " <dir> = Project binary directory to install.\n"
+ " --config <cfg> = For multi-configuration tools, choose <cfg>.\n"
+ " --component <comp> = Component-based install. Only install <comp>.\n"
+ " --prefix <prefix> = The installation prefix CMAKE_INSTALL_PREFIX.\n"
+ " --strip = Performing install/strip.\n"
+ " -v --verbose = Enable verbose output.\n"
+ ;
+ /* clang-format on */
return 1;
}