[CMake] [BUG] wrong rule for object file

Alexander Neundorf a.neundorf-work at gmx.net
Wed Nov 23 15:52:53 EST 2005


Hi, 
 
with current cvs, the following problem occurs.  
I have a small testcase attached, it looks like this: 
 
~/src$ tree cmake-ofiles-subdirs 
cmake-ofiles-subdirs/ 
|-- CMakeLists.txt 
|-- foo/ 
|   |-- foo.cpp 
|   `-- foo.h 
`-- main.cpp 
 
The project builds without problems. 
But it has the following problem: 
 
~/src/cmake-ofiles-subdirs$ make foo.o 
make[1]: *** No rule to make target `CMakeFiles/test.dir/foo.o'.  Stop. 
make: *** [foo.o] Error 2 
 
CMakeFiles/test.dir/build.make doesn't have a rule for 
CMakeFiles/test.dir/foo.o, but it has a rule for 
CMakeFiles/test.dir/foo/foo.o . 
So either foo.o should be built in CMakeFiles/test.dir/ and not in 
CMakeFiles/test.dir/foo/, or the target foo.o in the main Makefile should 
be  
foo.o: 
  $(MAKE) -f CMakeFiles/test.dir/build.make CMakeFiles/test.dir/foo/foo.o 
 
instead of (wrong as it is right now): 
 
foo.o: 
  $(MAKE) -f CMakeFiles/test.dir/build.make CMakeFiles/test.dir/foo.o 
 
Bye 
Alex 
 

-- 
Highspeed-Freiheit. Bei GMX supergünstig, z.B. GMX DSL_Cityflat,
DSL-Flatrate für nur 4,99 Euro/Monat*  http://www.gmx.net/de/go/dsl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake-ofiles-subdirs.tar.gz
Type: application/x-tgz
Size: 457 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20051123/cd3dee0c/cmake-ofiles-subdirs.tar.bin


More information about the CMake mailing list