[CMake] CMAKE equivalent of qmake's MOC_DIR

Hendrik Sattler post at hendrik-sattler.de
Thu Jul 24 08:26:54 EDT 2008


Zitat von David Boosalis <dn31415 at yahoo.com>:

>
> The one complaint I have with building in another directory is when   
> working with emacs.  I like to do my make inside of emacs, that way   
> when there is a compile error message I can click on it from emacs   
> and it takes me right to the offending line.  The only problem is   
> that if I have to close all files after editing them as emacs gets   
> confused if a file is open, and assumes the build is where the   
> source file is, so it fails. 
>
> Emacs users hate doing extra steps such as closing files ( I hav eto  
>  do a extra  key stroke operation for each file that is open (to   
> close file)  before recompiling from the build directory.

Then don't.
M-x compile
Now add: -C <full-path-to-binary-dir>

It will remember that on the next compile invocation. Yes, it assumes  
compilation in the current directory. You can probably use some  
Lisp-Hack to automatically modify the compile command to "the right  
thing" on emacs startup...

HS




More information about the CMake mailing list