diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-09 02:27:57 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-09 02:27:57 +0300 |
commit | 1c91b96f8740daad93991d50c086fbaf1f08770d (patch) | |
tree | e4d62d7f1d22d23eed1bebf00c80cb175bc58ce6 /cmake/build/ci | |
parent | common.cmake: more precise platform detection (diff) | |
download | cmake-common-1c91b96f8740daad93991d50c086fbaf1f08770d.tar.gz cmake-common-1c91b96f8740daad93991d50c086fbaf1f08770d.zip |
better usage messages & READMEs
Diffstat (limited to 'cmake/build/ci')
-rwxr-xr-x | cmake/build/ci/appveyor.py | 16 | ||||
-rwxr-xr-x | cmake/build/ci/travis.py | 15 |
2 files changed, 23 insertions, 8 deletions
diff --git a/cmake/build/ci/appveyor.py b/cmake/build/ci/appveyor.py index bb4d31d..ed656b3 100755 --- a/cmake/build/ci/appveyor.py +++ b/cmake/build/ci/appveyor.py @@ -5,9 +5,14 @@ # For details, see https://github.com/egor-tensin/cmake-common. # Distributed under the MIT License. -# This is similar to build.py, but auto-fills some parameters for build.py from -# the AppVeyor-defined environment variables. -# The project is built in C:\Projects\build. +'''Build a CMake project on AppVeyor. + +This is similar to build.py, but auto-fills some parameters for build.py from +the AppVeyor-defined environment variables. + + +The project is built in C:\Projects\build. +''' import argparse from enum import Enum @@ -113,7 +118,10 @@ def _parse_args(argv=None): argv = sys.argv[1:] logging.info('Command line arguments: %s', argv) - parser = argparse.ArgumentParser(description='Build a CMake project on AppVeyor') + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument('--install', metavar='DIR', dest='install_dir', help='install directory') parser.add_argument('cmake_args', nargs='*', metavar='CMAKE_ARG', default=[], diff --git a/cmake/build/ci/travis.py b/cmake/build/ci/travis.py index 3712bf9..ab93711 100755 --- a/cmake/build/ci/travis.py +++ b/cmake/build/ci/travis.py @@ -5,9 +5,13 @@ # For details, see https://github.com/egor-tensin/cmake-common. # Distributed under the MIT License. -# This is similar to build.py, but auto-fills some parameters for build.py from -# the Travis-defined environment variables. -# The project is built in $HOME/build. +'''Build a CMake project on Travis. + +This is similar to build.py, but auto-fills some parameters for build.py from +the Travis-defined environment variables. + +The project is built in $HOME/build. +''' import argparse import logging @@ -50,7 +54,10 @@ def _parse_args(argv=None): argv = sys.argv[1:] logging.info('Command line arguments: %s', argv) - parser = argparse.ArgumentParser(description='Build a CMake project on Travis') + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument('--install', metavar='DIR', dest='install_dir', help='install directory') parser.add_argument('cmake_args', nargs='*', metavar='CMAKE_ARG', default=[], |