Parser issue? - Cont.
Leon Pollak
leonp at plris.com
Thu Nov 6 13:12:10 GMT 2014
On Thursday 06 November 2014 04:22:52 Aleix Pol wrote:
> Hi Leon,
> I've been trying to reproduce your bug and couldn't because your code
> relies on the fact that the source code needs to be in
> /Projects/something/BuildXXX.
Hi, Aleix.
I reworked the project and simplified it significantly.
The project root directory is now '~'.
The sources always resided in ./Test/src, while building is done in
~/Test/BuildXXX.
Now, if you will go into main.cpp and hoover over the SYS_CPU macro
definition, you will see that it is '8148'.
Now, please, open PROJECT->OPEN CONFIGURATION and choose CMAKE.
There you can choose the path of the build directory.
Note that whatever directory you choose (and you have 3 options in my
example), the SYS_CPU remains the same 8148.
BUT:
When you choose the directory, the CMakeLists.txt in lines 4-8 chooses which
BUILD_XXX definition will be defined with '-D' option.
Depending on this BUILD_XXX the corresponding system-xxx.h is included from
system.h.
Each one of system-xxx.h files defines different SYS_CPU value.
As I said, the SYS_CPU value in the main.cpp always remains 8148 while
hoovering, although the correct value is printed when executable is run.
Hope this helps.
--
Dr.Leon M.Pollak
Director
PLR Information Systems Ltd.
Tel.:+972-98657670 | POB 8130, Giborei Israel 5a,
Fax.:+972-98657621 | Poleg Industrial Zone,
Mob.:+972-544739246 | Netanya, 42504, Israel.
More information about the KDevelop
mailing list