[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] Why simple `cmake` does not launch default generator on current directory?
From:       Nils Gladitz <nilsgladitz () gmail ! com>
Date:       2014-06-11 19:39:18
Message-ID: 5398B066.8060909 () gmail ! com
[Download RAW message or body]

On 11.06.2014 21:28, Adam Strzelecki wrote:
> Hello,
> 
> We started using CMake recently in our projects. And it is really a timesaver \
> comparing to Qmake/autotools, however there is one thing that bothers me. 
> Why typing simple: cmake in command line doesn't trigger configure with default \
> generator (i.e. Makefile)? It just prints help, which is anyway accessible via \
> cmake -h/--help. 
> This is really weird comparing to other tools such as ./configure, quake, make, \
> that do not expect any parameter to launch them up. 
> Fortunately there is `cmake .`, but the dot is kinda superfluous.
> 

The preferred way to build with cmake is "out-of-source" [1].
Which means that the source directory remains untouched and all build 
artifacts go to a separate build directory.
For that you create an empty directory and call "cmake <path to source 
directory>" from it.

This will allow you to have multiple build directories that work with a 
single source directory.
It also makes it easier to discard a build.

Nils

[1] http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees
-- 

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://www.cmake.org/mailman/listinfo/cmake


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic