[CMake] Setting the object file directory.

William A. Hoffman billlist at nycap.rr.com
Tue Oct 5 14:56:58 EDT 2004


There is no way to change that name.
CMake creates an exact copy of the source tree in
the binary tree.   I suppose you could put the CMakeList file
in src, then create solaris/obj then run cmake ../../src instead
of cmake ...

-Bill


At 02:26 PM 10/5/2004, Eric Bolz wrote:
>My directory looks like this:
>There are several source directories under the "src" directory
>top ___ src____dir1
>    |       |____dir2
>    |       |____dir3
>    |
>    |___solaris
>    |               |___linux
>
>My CMakeLists file lives at the top level and I specify the souce files as follows:
>SET( SOURCES src/dir1/file1.c  src/dir2/file2.c   src/dir3/file3.c )
>
>I'm doing out of source builds from within the solaris and linux directories by typing "cmake .."
>I want cmake to create a parallel directory tree (for the object files) under the name "obj", not "src"
>It should look like this:
>solaris___obj___dir1
>                   |___dir2
>                   |___dir3
>
>After all, it will contain object files, not source files.
>How can I get cmake to put the object files in a directory called "obj" under linux and solaris.
>
>_______________________________________________
>CMake mailing list
>CMake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list