View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015721CMakeCMakepublic2015-08-31 09:232016-06-10 14:31
ReporterThomas Ruschival 
Assigned ToAlex Neundorf 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake 3.3 
Target VersionFixed in Version 
Summary0015721: Indexer configuration of Eclipse CDT4 Project does not recognize symbols set by modules
DescriptionThe issue is a minor one regarding the macros ( symbol definitions) for the eclipse CDT indexer.
The cmake-generated eclipse project only recognizes symbols that are explicitly added with add_defintions() in CMakeLists.txt. The eclipse project does not consider any target-specific COMPILE_DEFINITIONS for indexing the source.

Also a list of compile defintions defined by a module that can be used in target compile defintions cannot be used with add_definitions().

Currently I mitigate this behavior by
find_package(FOO REQUIRED) # FOO defines a list FOO_COMPILE_DEFINITIONS

# This does not work since each symbol has to start with -D
# ADD_DEFINITIONS(${FOO_COMPILE_DEFINITIONS})

foreach( DEF ${FOO_COMPILE_DEFINITIONS})
   ADD_DEFINITIONS("-D${DEF}")
endforeach(DEF)

IMHO this is somewhat ugly. I would prefer to have all definitions used for the targets added to the indexer settings of eclipse to allow for easy source navigation. Since the project is build by makefiles anyway adding all symbols doesn't affect the build.

Does this make sense or am I looking in the wrong direction?
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0042833)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2015-08-31 09:23 Thomas Ruschival New Issue
2015-08-31 16:16 Alex Neundorf Assigned To => Alex Neundorf
2015-08-31 16:16 Alex Neundorf Status new => assigned
2016-06-10 14:29 Kitware Robot Note Added: 0042833
2016-06-10 14:29 Kitware Robot Status assigned => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team