From 9743c9cd3e5aef9566acefea6e6e3724e0e5657e Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Wed, 13 Mar 2024 15:59:54 -0500 Subject: [PATCH] Add more CMake variables to pass to vendor projects (#519) * 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 --- ament_cmake_vendor_package/cmake/ament_vendor.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ament_cmake_vendor_package/cmake/ament_vendor.cmake b/ament_cmake_vendor_package/cmake/ament_vendor.cmake index 50d0323b..c9b963cd 100644 --- a/ament_cmake_vendor_package/cmake/ament_vendor.cmake +++ b/ament_cmake_vendor_package/cmake/ament_vendor.cmake @@ -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 \"\")")