Skip to content
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

YCMEPHelper: If CMAKE_EXPORT_COMPILE_COMMANDS is defined and ON, pass it to all subprojects #442

Merged
merged 2 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased Patch]

### Changed

* YCMEPHelper: If CMAKE_EXPORT_COMPILE_COMMANDS is defined and ON, pass it to all subprojects (https://github.com/robotology/ycm/pull/442).

### Deprecated

* FindGLFW3: Use glfw3Config.cmake and mark module as deprecated. Instead of using `find_package(GLFW3)`, please use `find_package(glfw3 NO_MODULE)` and link the `glfw` imported target (https://github.com/robotology/ycm/pull/441).
Expand Down
6 changes: 6 additions & 0 deletions modules/YCMEPHelper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,12 @@ macro(_YCM_SETUP)
"-DCMAKE_PREFIX_PATH:PATH=${_CMAKE_PREFIX_PATH}") # Path used by cmake for finding stuff
list(APPEND _YCM_EP_CMAKE_ARGS ${_YCM_EP_ADDITIONAL_CMAKE_ARGS})

# If CMAKE_EXPORT_COMPILE_COMMANDS is defined, pass it along to the sub-projects
# See https://github.com/robotology/robotology-superbuild/issues/1596
if(DEFINED CMAKE_EXPORT_COMPILE_COMMANDS AND ${CMAKE_EXPORT_COMPILE_COMMANDS})
list(APPEND _YCM_EP_CMAKE_ARGS "-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=${CMAKE_EXPORT_COMPILE_COMMANDS}")
endif()

# Default CMAKE_CACHE_ARGS (Initial cache, forced)
set(_YCM_EP_CMAKE_CACHE_ARGS "-DCMAKE_INSTALL_PREFIX:PATH=${YCM_EP_INSTALL_DIR}") # Where to do the installation

Expand Down
Loading