-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add external library and add_subdirectory to project tree #194
Comments
Am Samstag, 18. November 2023, 09:56:53 CET schrieb ksrp1984:
When I add "include_directories" they are added in the eclipse project. But
if I use "add_library" or "add_subdirectory" which are not in the root
directory of the project, then they are not displayed in the eclipse
Your are talking of cmake commands here, right? The plugin does not parse any
cmakelists.txt, so it will not show libraries or dierectories.
The includes folder is fed by the indexer which in turn is fed from parsing
the compile_commands.json file generated by cmake in the build directory.
project. Maybe I'm doing something wrong in my CMakeList? Or is it
impossible to add display of external files in the cmake4eclipse project?
You might want to add a 'linked folder' in the project but you have to enable
linked folders for your workbench first.
Is it possible to implement this somehow?
/ Martin
…--
Cd wrttn wtht vwls s mch trsr.
|
I added symbolic links. Now the parser correctly analyzes functions and variables. But it doesn't recognize target_compile_definitions for subdirectories. Even if I add a definition with the "public" option to a subdirectory, this definition is correctly recognized by the parser in the main target's sources, but the parser does not see it in the subdirectory. The definition was added correctly to compile_commands.json. The compiler works correctly, i.e. all makefiles are created correctly. The problem is only with the parser Perhaps the problem is that compile_commands.json contains the real path to the file and definitions of variables for this file. And the parser sees a link that is located in the project directory. Perhaps he thinks that these are different files? But then why does it correctly recognize the functions. |
symbolic links are not 'linked folders'. The latter can be added in the project properties on the Source Folders page. |
I tried it, nothing changed. The parser does not see compilation definitions in linked folders |
Is it possible to look at the "cmake compilation DB" log. What data is transferred from it to the indexer. Only include directories are displayed in the project settings (Preprocessor Include Paths Macros etc). This may help me understand what the problem is, it's probably an internal parser error. System: Windows, compiler: arm-none-eabi-gcc |
I looked at the parser log output. For the main file there is a section "Macro definitions (option -D)" But for a file in a subdirectory only "Macro definitions (from language + headers in index)". There is no "Macro definitions (option -D)". In compile_commands.json the -D macros are the same for all files |
I was able to solve this problem by adding providers: Compilation Database Parser + CDT GCC Build Output Parser. For CDT The GCC build output parser needs to add "arm-none-eabi" to the "compiler command pattern". This works with the GCC compiler, but a solution could not be found for the IAR compiler (ARMCC). |
When I add "include_directories" they are added in the eclipse project. But if I use "add_library" or "add_subdirectory" which are not in the root directory of the project, then they are not displayed in the eclipse project. Maybe I'm doing something wrong in my CMakeList? Or is it impossible to add display of external files in the cmake4eclipse project? Is it possible to implement this somehow?
The text was updated successfully, but these errors were encountered: