[CMake] Patch: Unix out-of-source build extension

Andrey aka50 at yandex.ru
Mon Sep 27 16:44:58 EDT 2004


Brad King <brad.king at kitware.com> writes:

> Andrey wrote:
>> I work in XEmacs (FreeBSD) and out-of-source build is usefull, but
>> still cryptic for edit-and-compile, because Makefiles lives in some
>> "build" directory.
>
> Thanks for the patch, but as you can imagine we are very hesitant
> about generating anything into the source tree.  It makes having more
> than one build tree difficult.

I understand Your position, but search through mailing lists show me,
that some people need 'distclean' target. My solution allows to create
Makefiles (can be implemented not only for Unix, for Win too) in
source tree and no distclean needed (except Makefiles removal). Why
not to extend this and allow three possible solutions for build tree:

1. All CMake's stuff in source dir (like in CMake distribution)

2. In separate dirs for various build-settings

3. Object-files, configurations etc in separate build dirs and
Makefiles in source tree with special targets (like release, debug). 

In MSVC developer doesn't think, in which dir objects live, developer
choose from menu: release, debug etc and build. Why unix developer
must create special tools and scripts :). Developer can pass to CMake
some "build-path" and CMake creates all build dirs with default and
user-defined targets (like release, debug, my-super-debug etc) and no
need to create special dirs and scripts. Simple "make release debug
my-super-debug" builds all desired configurations at once. And ofcourse,
all this features configurable due special directives for CMake :). Don't
whant feature, don't use it :).

Laziness - the engine of progress :)

>
> There are other ways to get edit-and-compile to work.  If you are good
> at elisp code, you can setup hotkeys in your .emacs file to
> automatically find the build tree from the current source tree path
> (using a standard naming convention for build trees, for example).
>

Thanks for tip, but I have such script :). I want more general
solution, like mentioned above.

Andrey.


More information about the CMake mailing list