[Cmake] Object File Location

Jan Woetzel jw at mip.informatik.uni-kiel.de
Mon May 12 11:13:12 EDT 2003


Cody Batt wrote:

> We would like to generate all of our object files into a separate 
> directory.  As it is, the object files are generated in the same 
> directory as the source files.  I've been looking in the CMAKE docs, 
> but I can't find a way to specify the object file location.  Has 
> anyone else done this with CMAKE? 


There are at least two solutions:
(1)
Use one directory for source (e.g. ~/src) and another for builds ,
go to the build directory (e.g. ~/build) and run cmake with the source 
directory as argument.
  cd ~/build
  cmake ~/src
compile in ~/build as usual

(2)
You can set a subdir for objects, libs and binaries with:
LIBRARY_OUTPUT_PATH
and
EXECUTABLE_OUTPUT_PATH

Regards,
Jan.



-- 

  Dipl.-Ing. Jan Woetzel
--------------------------------------------------
  University of Kiel






More information about the CMake mailing list