Skip to content

Commit

Permalink
Add more CMake variables to pass to vendor projects (#519)
Browse files Browse the repository at this point in the history
* CMAKE_FIND_DEBUG_MODE: Similar to CMAKE_VERBOSE_MAKEFILE, this flag
  causes CMake to generate additional console output.
* CMAKE_MODULE_PATH: Similar to CMAKE_PREFIX_PATH, this list of
  directories can be used to help CMake search additional locations for
  package finding modules.

Signed-off-by: Scott K Logan <logans@cottsay.net>
  • Loading branch information
cottsay authored Mar 13, 2024
1 parent f44a937 commit 9743c9c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ament_cmake_vendor_package/cmake/ament_vendor.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,18 @@ function(_ament_vendor TARGET_NAME VCS_TYPE VCS_URL VCS_VERSION PATCHES CMAKE_AR
set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_VERBOSE_MAKEFILE [=[${CMAKE_VERBOSE_MAKEFILE}]=] CACHE INTERNAL \"\")")
endif()

if(DEFINED CMAKE_FIND_DEBUG_MODE)
set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_FIND_DEBUG_MODE [=[${CMAKE_FIND_DEBUG_MODE}]=] CACHE INTERNAL \"\")")
endif()

if(DEFINED CMAKE_BUILD_TYPE)
set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_BUILD_TYPE [=[${CMAKE_BUILD_TYPE}]=] CACHE INTERNAL \"\")")
endif()

if(DEFINED CMAKE_MODULE_PATH)
set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_MODULE_PATH [=[${CMAKE_MODULE_PATH}]=] CACHE INTERNAL \"\")")
endif()

list(PREPEND CMAKE_PREFIX_PATH ${_AMENT_CMAKE_VENDOR_PACKAGE_PREFIX_PATH})
set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_PREFIX_PATH [=[${CMAKE_PREFIX_PATH}]=] CACHE INTERNAL \"\")")

Expand Down

0 comments on commit 9743c9c

Please sign in to comment.