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

List:       kdevelop-bugs
Subject:    [Bug 285991] New: cmake add_definitions does not work for
From:       Bernd Buschinski <b.buschinski () googlemail ! com>
Date:       2011-11-07 12:35:34
Message-ID: bug-285991-40295 () http ! bugs ! kde ! org/
[Download RAW message or body]

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

           Summary: cmake add_definitions does not work for
                    multiple-sourcegroups
           Product: kdevelop
           Version: git master
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: Build tools: CMake
        AssignedTo: kdevelop-bugs@kdevelop.org
        ReportedBy: b.buschinski@googlemail.com


Created an attachment (id=65338)
 --> (http://bugs.kde.org/attachment.cgi?id=65338)
testcase, main.cpp:17 and main2.cpp:14

Version:           git master (using KDE 4.7.3) 
OS:                Linux

Code completition does not work for code in #ifdef .. #end if cmake defines the
define

add_definitions(-DHAVE_TEST)

and you have more than one "sourcegroup"

set (soureA ...)
set (soureB ...)

it only works in on of the "sourcegroups"

Reproducible: Always

Steps to Reproduce:
- create a simple cmake project
- modify the cmake CMakeLists.txt to

add_definitions(-DHAVE_TEST)

set(kdevDefineTest2_SRCS main.cpp)
set(kdevDefineTest2_MAIN2_SRCS main2.cpp)

qt4_automoc(${kdevDefineTest2_SRCS})
add_executable(kdevDefineTest2 ${kdevDefineTest2_SRCS}
${kdevDefineTest2_MAIN2_SRCS})


- also create a main2.cpp
- put some code in main1.cpp in #ifdef HAVE_TEST ... #endif
- test code completition in it
- it works.

- now put some code in main2.cpp in  #ifdef HAVE_TEST ... #endif
- test code completition in it

Actual Results:  
- it doesn't work

Expected Results:  
- it should also work

see testcase main.cpp:17 and main2.cpp:14

-- 
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