dev-cafe / autocmake

CMake plugin composer.
http://autocmake.org
BSD 3-Clause "New" or "Revised" License
42 stars 18 forks source link

Let setup shows also wrong input #170

Closed miroi closed 8 years ago

miroi commented 8 years ago

Hi,

for debugging purposes it would be good to print out offending keys;

for example, here I don't know what went wrong with setup command:

milias@login.grid.umb.sk:~/Work/qch/software/software_projects/mathlibs-tester_devel/mathlibs-tester_devel/.python ./setup --fc=pgf90  --int64 --static --cmake-options="-DMATH_LIB_SEARCH_ORDER='SYSTEM_NATIVE'"  build_pgf90_i8_sysnative_static
ERROR: bad input to ./setup

Usage:
  ./setup [options] [<builddir>]
  ./setup (-h | --help)

Options:
  --fc=<FC>                              Fortran compiler [default: gfortran].
  --extra-fc-flags=<EXTRA_FCFLAGS>       Extra Fortran compiler flags [default: ''].
  --cc=<CC>                              C compiler [default: gcc].
  --extra-cc-flags=<EXTRA_CFLAGS>        Extra C compiler flags [default: ''].
  --cxx=<CXX>                            C++ compiler [default: g++].
  --extra-cxx-flags=<EXTRA_CXXFLAGS>     Extra C++ compiler flags [default: ''].
  --int64                                Enable 64bit integers [default: False].
  --blas=<BLAS>                          Detect and link BLAS library (auto or off) [default: auto].
  --lapack=<LAPACK>                      Detect and link LAPACK library (auto or off) [default: auto].
  --mkl=<MKL>                            Pass MKL flag to the Intel compiler and linker and skip BLAS/LAPACK detection (sequential, parallel, cluster, or off) [default: off].
  --python=<PYTHON_INTERPRETER>          The Python interpreter (development version) to use. [default: ''].
  --coverage                             Enable code coverage [default: False].
  --explicit-libs=<LIBS>                 Explicit linker specification for extra libraries passed directly to the linker [default: off].
  --type=<TYPE>                          Set the CMake build type (debug, release, or relwithdeb) [default: release].
  --generator=<STRING>                   Set the CMake build system generator [default: Unix Makefiles].
  --show                                 Show CMake command and exit.
  --cmake-executable=<CMAKE_EXECUTABLE>  Set the CMake executable [default: cmake].
  --cmake-options=<STRING>               Define options to CMake [default: ''].
  --prefix=<PATH>                        Set the install path for make install.
  <builddir>                             Build directory.
  -h --help                              Show this screen.
milias@login.grid.umb.sk:~/Work/qch/software/software_projects/mathlibs-tester_devel/mathlibs-tester_devel/.
bast commented 8 years ago

I agree and I also welcome PRs on this. In your case setup does not know what to do with --static.

bast commented 8 years ago

I don't see a way of how to get this information from standard Docopt.