The following issue has been SUBMITTED. ====================================================================== https://public.kitware.com/Bug/view.php?id=15721 ====================================================================== Reported By: Thomas Ruschival Assigned To: ====================================================================== Project: CMake Issue ID: 15721 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-08-31 09:23 EDT Last Modified: 2015-08-31 09:23 EDT ====================================================================== Summary: Indexer configuration of Eclipse CDT4 Project does not recognize symbols set by modules Description: The 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? ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-08-31 09:23 Thomas RuschivalNew Issue ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers