Parser issue? - Cont.
Aleix Pol
aleixpol at kde.org
Sun Oct 19 19:37:00 BST 2014
On Sun, Oct 19, 2014 at 10:42 AM, Leon Pollak <leonp at plris.com> wrote:
> Hello, all.
> My previous mail (attached below) was not answered, so I continued to
> experiment.
> My experiments showed that none of the definitions made in the
> CMakeLists.txt
> file are not recognized by the parser.
> I have no idea why and how BUILD_PPC gets defined, no visible reason. I
> tried
> tochange its place to be the first - no influence.
>
> So, if nobody comments on this, I am going to fill report in
> bugs.kde.org...
> Thanks.
> -----------------------------------------------------------------------
> It seems that code browser/parser does not see correctly the definitions
> dependent on the variables defined in cmake file. I understand the
> complexity
> of the issue next to impossible.
> Still, may be kdevelop gurus may be so kind to suggest something to solve
> this?
> ---
> I have the same code for several different architectures. Thus I have build
> dirs for each CPU type named as BuildARM, BuildPPC, BuildPC, etc...
> My cmake.txt contains:
>
> #define build type XXX: /Projects/CSU/BuildXXX
> string(REPLACE "/" ";" LIST ${CMAKE_BINARY_DIR})
> list(GET LIST 3 BUILD_TYPE)
> if (BUILD_TYPE MATCHES BuildPC)
> add_definitions(-DBUILD_PC)
> elseif (BUILD_TYPE MATCHES BuildARM2)
> add_definitions(-DBUILD_ARM2)
> elseif (BUILD_TYPE MATHES BuildPPC)
> add_definitions(-DBUILD_PPC)
> elseif (BUILD_TYPE MATCHES BuildARM)
> add_definitions(-DBUILD_ARM)
> endif()
>
>
> There is also main system.h file which contains:
>
> #ifdef BUILD_PC
> #define BUILD_ARM
> #endif
>
> #ifdef BUILD_ARM
> #include "system-DVRM.h"
> #elif defined(BUILD_PPC)
> #include "system-TDR.h"
> #elif defined(BUILD_ARM2)
> #include "system-HDVR.h"
> #endif
> #if !defined(SYS_CPU)
> #error No CPU definition
> #endif
>
> (for accuracy - I debug some code in PC for different configurations, in
> the
> example - for ARM).
>
> What is unclear to me, that parser for some reason ALWAYS(!!!) thinks that
> only variable BUILD_PPC is defined! Independent of what configuration is
> chosen, it always thinks that BUILD_PPC is defined.
> I tried to delete all ~.cache and ~.ccashe directories, rebuild DB,
> recompile
> - nothing helps! Only BUILD_PPC is defined all the time.
>
> Is there any way to get out of this?
>
> Many thanks ahead.
> --
> Leon
>
Hi Leon,
Sorry for taking so much time to answer.
In general, the kdev-cmake parser should get this information from the
CMakeCache. Also this should work.
Can you provide a (small) test project I can try with?
Thanks,
Aleix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20141019/1ce507af/attachment.html>
More information about the KDevelop
mailing list