[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:       Adam Strzelecki <ono () java ! pl>
Date:       2014-06-12 10:18:49
Message-ID: 9114EB88-A433-461C-AF66-22E1B9863781 () java ! pl
[Download RAW message or body]

> Because that would create an in-source build, and you almost never want that. 
> One wants to build out of source. Sadly CMake will stumble if you try to 
> create an out-of-source build from a directory that is an in-source build, so 
> not having that default of "cmake ." actually saves everyone a lot of trouble.

It is clear to me that out-of-source builds are better for many reasons, but I don't \
see how `cmake` dumping 3 pages of usage not mentioning anything about that lets user \
to understand that.

Moreover there is a lack of consequence whether path argument is obligatory or not, \
because `cmake -GNinja` or `cmake -DDUMMY=1` works in source directory without \
needing to specify extra dot.

In-source builds may be convenient too if you're working remotely via ssh in git \
managed folder, which I do a lot. This saves you lot of `cd` typing and it is quicker \
to do `git clean ...` than move forth and back to build folder.

If CMake is supposed to be meta-`make`, why it doesn't behave like `make`? If it \
suppose to help understand what is going on it should output rather:

===
CMake Warning: Current directory is source directory. Out-of-source builds are \
recommended. Specify `cmake .` to skip this warning or create separate build folder.
===

But I am really against that, since command line user shouldn't be treated like \
stupid user. Anyway for beginners GUI is preferred way to go.

Regards,
-- 
Adam
-- 

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