-
Notifications
You must be signed in to change notification settings - Fork 198
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
Propagate CMAKE_EXPORT_COMPILE_COMMANDS to CMake subprocess #2144
Comments
aliounis
added a commit
to aliounis/cFE
that referenced
this issue
Sep 13, 2022
Propagates variable CMAKE_EXPORT_COMPILE_COMANDS to the cmake subprocess in mission_build.cmake
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
When building cFE alongside of other apps the setting for the CMake variable
CMAKE_EXPORT_COMPILE_COMMANDS
only applies to the efl2cfetbl target due to the architecture of the CMake build system for cFS. This makes it difficult for many development tools (like visual studio code) to properly understand the full cFE environment without putting in significant manual effort to specify the include paths and other compiler settings, thing which are usually captured in the compilation database built whenCMAKE_EXPORT_COMPILE_COMMANDS
is set toON
Describe the solution you'd like
Ultimately this comes down to the subprocess call in mission_build.cmake (around line 438 in the current main branch) where the setting for
CMAKE_EXPORT_COMPILE_COMMANDS
is not propagated to the subprocess. The fix is as simple as adding this linesomewhere between
${CMAKE_COMMAND}
and${SELECTED_TOOLCHAIN_FILE}
.Describe alternatives you've considered
This is the simplelest and least disruptive to the existing build process. Alternatives would be to use ExternalProject or add_custom_command/add_custom_target which would probably play nicer than the execute_process, but they would also need to pass the same flag in this manor.
Additional context
N/A
Requester Info
Andrew Liounis, NASA/GSFC
The text was updated successfully, but these errors were encountered: