Building kdevelop-pg
Andreas Pakulat
apaku at gmx.de
Thu Aug 17 00:07:52 UTC 2006
On 17.08.06 00:51:35, Jakob Petsovits wrote:
> On Wednesday, 16. August 2006 21:58, Andreas Pakulat wrote:
> > The problem is that kdev-cmg "depends" on either the not-yet-built
> > kdev-pg or on several source files existing already in the kdev-cmg
> > source dir (namely kdevcmg_parser.cpp, kdevcmg_visitor.cpp and
> > kdevcmg_default_visitor.cpp). These source files are not in svn and thus
> > one has a problem.
>
> hm, right. that's my fault, obviously, as I mixed up hard and soft
> dependencies in a non-functioning way.
> Please try it again from current SVN; kdev-pg is now a hard dependency of
> kdev-cmg and CMake doesn't check for those source files beforehand.
Aah...
> > I was also unable to just built kdev-pg on it's own, seems like various
> > files are missing:
> >
> > /home/andreas/KDE-work/4.0/kdevelop-pg/kdev-pg/kdev-pg-ast.h:24:31: error:
> > kdev-pg-allocator.h: Datei oder Verzeichnis nicht gefunden
>
> No, that one's not missing, it's just in $SRCDIR/include/.
> Normally, CMake also takes the includes from the parent dir(s) into account
> (where that directory is specified), but running "cmake ." just in kdev-pg/
> can't do that of course, it doesn't know.
Yep, figured that out too ;-)
BTW: I find CMakeLists.txt much easier to read than Makefile.am and I
didn't even read any cmake tutorial yet...
> Anyways, with a bit of luck it should work now.
Unfortunately not quite. One problem is that you let flex generate the
kdev-cmg-lexer.cc in the builddir, but add the srcdir/..lexer.cc to the list of
source files. Attached is a patch to fix that.
> Very unprobable that this is the error cause :)
> Sorry for the inconveniences,
Not really inconvience, I expect these things from stuff in trunk, at
the moment at least. And kdev-pg kind of belongs to trunk ;-)
Andreas
--
You will win success in whatever calling you adopt.
-------------- next part --------------
Index: kdev-cmg/CMakeLists.txt
===================================================================
--- kdev-cmg/CMakeLists.txt (Revision 573675)
+++ kdev-cmg/CMakeLists.txt (Arbeitskopie)
@@ -63,7 +63,7 @@ SET_SOURCE_FILES_PROPERTIES(
IF(FLEX_EXECUTABLE)
# Add command to run the lexer.
ADD_CUSTOM_COMMAND(
- OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/kdev-cmg-lexer.cc"
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/kdev-cmg-lexer.cc"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/kdev-cmg-lexer.ll"
"${CMAKE_CURRENT_SOURCE_DIR}/kdevcmg_parser.h"
COMMAND ${FLEX_EXECUTABLE}
@@ -72,11 +72,11 @@ IF(FLEX_EXECUTABLE)
)
SET(parser_srcs
- ${CMAKE_CURRENT_SOURCE_DIR}/kdev-cmg-lexer.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/kdev-cmg-lexer.cc
${parser_srcs}
)
SET_SOURCE_FILES_PROPERTIES(
- ${CMAKE_CURRENT_SOURCE_DIR}/kdev-cmg-lexer.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/kdev-cmg-lexer.cc
GENERATED
)
ELSE(FLEX_EXECUTABLE)
More information about the KDevelop-devel
mailing list