[CMake] Interference between siblings

Weiguang Guan guanw at rhpcs.mcmaster.ca
Fri Oct 8 16:36:48 EDT 2004


Hi Bill,

I appreciate your insight into the problem I have. Thank you for your 
time. 

Weiguang

-- 
========================================================
Weiguang Guan, Research Engineer
RHPCS, McMaster University
========================================================
On Fri, 8 Oct 2004, William A. Hoffman wrote:

> OK, so they are linking different libraries. 
> 
> The ...../src) has this:
> -ldl -lpthread -lvtkRendering -lXt -lvtkDICOMParser -lvtkexpat -lm -lGLU 
> 
> And ccmake ...../src/apps/scivis does not.
> 
> In the ..../src version cmake may have more knowledge of what libraries link
> to each other.  It may have incorrect knowledge.  CMake remembers library
> depend information in the cache.
> 
> So:
> 
> TARGET_LINK_LIBRARIES(A B C)
> ....
> TARGET_LINK_LIBRARIES(D A) // this will cause D to link to A B and C
> because cmake knows that A links to B and C.
> 
> There are ways to export this depend information from a project.
> However, in this case it sounds like there is too much depend information.
> So there may be a bad TARGET_LINK_LIBRARIES command or LINK_LIBRARIES command
> in the project somewhere.
> 
> -Bill
> 
> 
> At 04:10 PM 10/8/2004, Weiguang Guan wrote:
> >I was not hiding anything, just thought it might be boring for CMake users
> >to read the lengthy Makefiles generated from CMakeLists.txt. Below I just
> >list the linking part of Makefiles generated from different source roots 
> >with verbose turned ON.
> >
> >One is (ccmake ...../src)
> >c++       -Wno-deprecated -fPIC  AppWindow.o scivis.o moc_AppWindow.o    
> >-o /1/home/guanw/visualization/software/build/apps/bin/scivis -rdynamic 
> >-L/1/home/guanw/visualization/software/build/apps/InsightApplications-1.8.0/lib 
> >-L/1/home/guanw/visualization/software/install/lib 
> >-L/1/home/guanw/visualization/software/install/lib/vtk 
> >-L/1/home/guanw/visualization/software/install/lib/InsightToolkit 
> >-L/usr/lib/qt3/lib -L/usr/X11R6/lib -lvtkqt -lvtkHDF -lmfhdf -ldf -ljpeg 
> >-lz -lsz -lvtkRendering -lvtkPatented -lvtkHybrid -lvtkIO -lvtkImaging 
> >-lvtkGraphics -lvtkFiltering -lvtkCommon -lvtkftgl -lvtkjpeg -lvtkpng 
> >-lvtkzlib -lvtktiff -lqassistantclient -lqt-mt -lSM -lICE -lX11 -lXext 
> >-ldl -lpthread -lvtkRendering -lXt -lvtkDICOMParser -lvtkexpat -lm -lGLU 
> >-lGL -lvtkfreetype -lvtkzlib -lvtkjpeg 
> >-Wl,-rpath,/1/home/guanw/visualization/software/build/apps/InsightApplications-1.8.0/lib:/1/home/guanw/visualization/software/install/lib:/1/home/guanw/visualization/software/install/lib/vtk:/1/home/guanw/visualization/software/install/lib/InsightToolkit:/usr/lib/qt3/lib:/usr/X11R6/lib
> >
> >and the other (ccmake ...../src/apps/scivis)
> >c++       -Wno-deprecated -fPIC  AppWindow.o scivis.o moc_AppWindow.o    
> >-o /1/home/guanw/visualization/software/build/apps/scivis/scivis -rdynamic 
> >-L/1/home/guanw/visualization/software/install/lib 
> >-L/1/home/guanw/visualization/software/install/lib/vtk 
> >-L/1/home/guanw/visualization/software/install/lib/InsightToolkit 
> >-L/usr/lib/qt3/lib -L/usr/X11R6/lib -lvtkqt -lvtkHDF -lmfhdf -ldf -ljpeg 
> >-lz -lsz -lvtkRendering -lvtkPatented -lvtkHybrid -lvtkIO -lvtkImaging 
> >-lvtkGraphics -lvtkFiltering -lvtkCommon -lvtkftgl -lvtkjpeg -lvtkpng 
> >-lvtkzlib -lvtktiff -lqassistantclient -lqt-mt -lSM -lICE -lX11 -lXext 
> >-ldl -lpthread 
> >-Wl,-rpath,/1/home/guanw/visualization/software/install/lib:/1/home/guanw/visualization/software/install/lib/vtk:/1/home/guanw/visualization/software/install/lib/InsightToolkit:/usr/lib/qt3/lib:/usr/X11R6/lib
> >
> >Linking with libvtkfreetype causes Qt app have problem with fonts. And 
> >with -Wl, -rpath option the application has an error message: Xlib:  
> >extension "XFree86-DRI" missing on display ":0.0", don't know why.
> >
> >
> >Weiguang
> >
> >-- 
> >========================================================
> >Weiguang Guan, Research Engineer
> >RHPCS, McMaster University
> >========================================================
> >On Fri, 8 Oct 2004, William A. Hoffman wrote:
> >
> >> No I do not, exactly what problem are you having?
> >> You still have not said how the makefiles are different?
> >> 
> >> -Bill
> >> 
> >> 
> >> At 03:37 PM 10/8/2004, Weiguang Guan wrote:
> >> >Do you think it is a good idea to let each directory or proejct have its 
> >> >own CACHE?
> >> >
> >> >Weiguang
> >> >
> >> >On Fri, 8 Oct 2004, William A. Hoffman wrote:
> >> >
> >> >> Different how?  CACHE variables are common to all directories and
> >> >> could affect a Makefile.
> >> >> 
> >> >> -Bill
> >> >> 
> >> >> >Take the Makefile for app1 as an example. It is different from the 
> >> >> >Makefile generated by using ccmake ....../src/apps/app1.
> >> >> > 
> >> >> >Weiguang
> >> >> >
> >> >> >-- 
> >> >> >========================================================
> >> >> >Weiguang Guan, Research Engineer
> >> >> >RHPCS, McMaster University
> >> >> >========================================================
> >> >> >
> >> >> >_______________________________________________
> >> >> >CMake mailing list
> >> >> >CMake at www.cmake.org
> >> >> >http://www.cmake.org/mailman/listinfo/cmake 
> >> >> 
> >> 
> >
> >_______________________________________________
> >CMake mailing list
> >CMake at www.cmake.org
> >http://www.cmake.org/mailman/listinfo/cmake 
> 



More information about the CMake mailing list