current state of using cmake to compile kdevelop

Alexander Neundorf neundorf at kde.org
Wed May 11 15:13:02 UTC 2005


On Wednesday 11 May 2005 00:21, Alexander Dymo wrote:
> Hmm, let's look at the output below. What -lgcc does there?
>
> Linking CXX shared library libkdevfileview.so
> /usr/local/bin/cmake -E remove -f libkdevfileview.a libkdevfileview.so
> c++ -fPIC -Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -shared
> -Wl,-soname,libkdevfileview.so -o libkdevfileview.so
> "kdevfileview.dir/fileviewpart.o" "kdevfileview.dir/filetreewidget.o"
> "kdevfileview.dir/partwidget.o" "kdevfileview.dir/vcscolorsconfigwidget.o"
> "kdevfileview.dir/stdfiletreewidgetimpl.o"
> "kdevfileview.dir/filetreeviewwidgetimpl.o"
> "kdevfileview.dir/vcsfiletreewidgetimpl.o"
> "kdevfileview.dir/fileitemfactory.o"
> "kdevfileview.dir/vcscolorsconfigwidgetbase.o"
> "kdevfileview.dir/vcscolorsconfigwidgetbase.moc.o"
> -L/develop/kde_svn/build/lib/interfaces
> -L/develop/kde_svn/build/lib/interfaces/extensions
> -L/develop/kde_svn/build/lib/interfaces/extensions/dcop
> -L/develop/kde_svn/build/lib/interfaces/external
> -L/develop/kde_svn/build/lib/kdevelop -L/develop/kde_svn/build/lib/util
> -L/develop/kde_svn/build/lib/widgets/propeditor -L/opt/kde3/lib
> -L/usr/X11R6/lib -L/usr/lib/qt3/lib -lqassistantclient -lqt-mt -lSM -lICE
> -lX11 -lXext -ldl -lpthread -lkdecore -lkdeui -lkparts -lkio -lktexteditor
> -lkdevelop -lkscript -lktexteditor -lDCOP -lkinterfacedesigner -lkparts
> -lkdevpropertyeditor -lqassistantclient -lqt-mt -lSM -lICE -lX11 -lXext
> -ldl -lpthread -lkdecore -lkdeui -lkio -Wl,--whole-archive -lkdevinterfaces
> -lkdevextensions -lkdevutil -lkdevdcopextensions -Wl,--no-whole-archive
> -Wl,-rpath,/develop/kde_svn/build/lib/interfaces:/develop/kde_svn/build/lib
>/interfaces/extensions:/develop/kde_svn/build/lib/interfaces/extensions/dcop
>:/develop/kde_svn/build/lib/interfaces/external:/develop/kde_svn/build/lib/k
>develop:/develop/kde_svn/build/lib/util:/develop/kde_svn/build/lib/widgets/p
>ropeditor:/opt/kde3/lib:/usr/X11R6/lib:/usr/lib/qt3/lib -lgcc

In ${CMAKE_ROOT}/Modules/CMakeCXXInformation.cmake you can find the following 
lines:

IF(CMAKE_COMPILER_IS_GNUCXX)
  SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} 
-lgcc")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)

So in case it is gcc the -lgcc is explicitely added, so I guess they have a 
reason to do this.

Bye
Alex
-- 
Work: alexander.neundorf at jenoptik.com - http://www.jenoptik-los.de
Home: neundorf at kde.org                - http://www.kde.org
      alex at neundorf.net               - http://www.neundorf.net




More information about the KDevelop-devel mailing list