[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-bugs
Subject:    [Bug 287462] cmake definition don't work for subdir cmakelists
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2011-11-24 22:07:40
Message-ID: E1RThSG-0004W4-CY () bugs ! kde ! org
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=287462


Andreas Pakulat <apaku@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Andreas Pakulat <apaku gmx de>  2011-11-24 22:07:38 ---
Git commit a795ae0c796f59d217a5c5603013710c197867e8 by Andreas Pakulat.
Committed on 24/11/2011 at 23:02.
Pushed by apaku into branch 'master'.

Fix providing defines for cmake-projects

This fixes parsing of c++ files in subdirectories of a CMake project
when the c++ file uses defines set in a parent directories CMakeLists.txt.

i.e. when
project/CMakeLists.txt has add_definitions(-DHAVE_TEST)
project/src/foo.cpp has a #ifdef HAVE_TEST section
the C++ plugin wouldn't parse inside that section since the cmake manager
did not provide the HAVE_TEST define for foo.cpp since its set in a parent
directory.

Using the formerParent API should ensure that cases such as
add_subdirectory(a/b) work correctly, similarly to the include-dirs
calculation.

As the comment says, this is not producing 100% correct results (compared
to the actual defines when compiling the files of a target), but it guess
the result is good enough and for getting it perfect a redesign of the
codebase would be needed.

BUG: 287462

M  +26   -0    projectmanagers/cmake/cmakemodelitems.cpp
M  +1    -1    projectmanagers/cmake/cmakemodelitems.h

http://commits.kde.org/kdevelop/a795ae0c796f59d217a5c5603013710c197867e8

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic