[CMake] headers and recompile part II

Duncan Mac-Vicar Prett dmacvicar at suse.de
Wed May 30 06:10:13 EDT 2007


Some time ago I asked here why my object files did not get rebuilt when a 
header was touched. ( 
http://public.kitware.com/pipermail/cmake/2007-April/013803.html ), and Bill 
Hoffman pointed me to the right file.

I realized its because cmake is injecting dependencies on the installed 
headers (the system library) instead of the source header.

In the target, my includes line is like:

INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} 
${CMAKE_CURRENT_BINARY_DIR} )

and I include the headers like

#include "zypp/ResObject.h"

( I don't use <zypp/ResObject.h> )

Still, on depend.make I get:
zypp/CMakeFiles/zypp.dir/ResObject.o: /usr/include/zypp/ResObject.h

Any pointers? Thanks!

-- 
Duncan Mac-Vicar Prett  
Novell :: SUSE R&D, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)


More information about the CMake mailing list