Skip to content

Commit

Permalink
YCMEPHelper: If CMAKE_EXPORT_COMPILE_COMMANDS is defined and ON, pass…
Browse files Browse the repository at this point in the history
… it to all subprojects (#442)

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

* Update CHANGELOG.md
  • Loading branch information
traversaro authored Feb 14, 2024
1 parent f8ba554 commit ddfa4a1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
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

0 comments on commit ddfa4a1

Please sign in to comment.