[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop-devel
Subject: kdev4 assert with findQt4.cmake provided by default cmake install
From: cedric <cedric.borgese () gmail ! com>
Date: 2008-04-25 23:51:48
Message-ID: 200804260151.48103.cedric.borgese () gmail ! com
[Download RAW message or body]
when you try to import a cmake project that use qt4, this code in
FindQt4.cmake (the one from the cmake project, in the kde svn provided one,
the code isn't present)
LIST(FIND ${qt4_files} OPTIONS _index)
IF(NOT _index EQUAL -1)
LIST(REMOVE_ITEM ${qt4_files} OPTIONS)
LIST(LENGTH ${qt4_files} _length)
WHILE(_length GREATER ${_index})
LIST(GET ${qt4_files} ${_index} _opt_value)
LIST(REMOVE_AT ${qt4_files} ${_index})
LIST(APPEND ${qt4_options} ${_opt_value})
LIST(LENGTH ${qt4_files} _length)
ENDWHILE(_length GREATER ${_index})
ENDIF(NOT _index EQUAL -1)
cause an assert in cmakeast.cpp line 2225 when parsing the line "
LIST(REMOVE_AT ${qt4_files} ${_index})"
the problem comes from LIST(FIND ${qt4_files} OPTIONS _index) that is not
defined (see cmakeprojectvisitor.cpp line 1079) and _index (and its value) is
not added to the list of variables (m_vars)
this finish as an assertion when trying to convert the value of _index to an
interger.
I write the attached patch (not sure at all it is the right way to do it, but
at least it works) and now I can import my project.
["kdevelop.patch" (text/x-diff)]
Index: buildtools/managers/cmake/parser/cmakeprojectvisitor.cpp
===================================================================
--- buildtools/managers/cmake/parser/cmakeprojectvisitor.cpp (révision 801014)
+++ buildtools/managers/cmake/parser/cmakeprojectvisitor.cpp (copie de travail)
@@ -1076,6 +1076,8 @@
m_vars->insert(list->list(), theList);
break;
case ListAst::FIND:
+ Q_ASSERT(!list->CMakeAst::outputArguments().isEmpty());
+ m_vars->insert(list->CMakeAst::outputArguments().last().value, \
QStringList(QString::number(theList.indexOf(output)))); #warning Implement me
break;
case ListAst::INSERT: {
_______________________________________________
KDevelop-devel mailing list
KDevelop-devel@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic