You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 when CMAKE_EXPORT_COMPILE_COMMANDS is set to ON
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 line
somewhere 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:
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: