Replace default "make all" with "make help"

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Replace default "make all" with "make help"

DKLind
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.
Reply | Threaded
Open this post in threaded view
|

Re: Replace default "make all" with "make help"

J Decker

On Wed, Aug 2, 2017 at 8:12 AM, DKLind <[hidden email]> 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.

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"
Sent from the CMake mailing list archive 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


--

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