[CMake] surprising new behaviour of cmake cvs - object filecreation

Ken Martin ken.martin at kitware.com
Wed Dec 8 10:28:47 EST 2004



> until recently I added a lot of sources files:
> 
> SET(SRCS main.cpp ../blah.cpp ../lib/foo.cpp) etc.
> and all object files were created in the current directory (i.e. ./
> main.o, ./blah.o, ./foo.o).
> Now suddenly they are created in the same directory where the source file
> is located, i.e. ./main.o, ../blah.o, ../lib/foo.o. Is this intentional ?
> Is this due to a change in cmake or did I change something in my
> CMakeLists.txt (I'm quite sure I didn't). ?

This is intentional. Basically the old behavior was considered a bug by most
people so we fixed it. The problem is in cases like:

SET (SRCS ../lib/foo.c ../extra/foo.c)

The two foo.o files clobber each other if they are in the current directory.

Thanks
Ken






More information about the CMake mailing list