[CMake] Replace default "make all" with "make help"

J Decker d3ck0r at gmail.com
Wed Aug 2 16:35:26 EDT 2017


On Wed, Aug 2, 2017 at 8:12 AM, DKLind <davidklind at gmail.com> wrote:

> Is it possible to replace the default target of the "Unix Makefiles"
> generated Makefile of 'all' with 'help'? By default, I mean when no target
> is specified when invoking 'make', the 'all' target is assumed.


Because cmake works with so many targets, it's unlikely this would be of
much use; ninja itself has ability to specify default target, but that's
not available from CMake; also generators like Visual Studio, et al.  don't
have 'all' they have ALL_BUILD and no 'help' target.

https://cmake.org/cmake/help/v3.0/command/build_command.html
I suppose you could wrap your CMakeLists in another that checks $<target>
and if not set, then trigger cmake --build with --target help....

that's probably a really bad idea in general though.

If someone is using cmake to build though; one would think they would just
'know' that make help is a thing to do...

Or - why would you want your one project to behave any different than all
the others in the world? (or perhaps a nicer phrasing)  Why do you want to
do this?


>
> ------------------------------
> View this message in context: Replace default "make all" with "make help"
> <http://cmake.3232098.n2.nabble.com/Replace-default-make-all-with-make-help-tp7595988.html>
> Sent from the CMake mailing list archive
> <http://cmake.3232098.n2.nabble.com/> at Nabble.com.
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170802/a8744e69/attachment.html>


More information about the CMake mailing list