From fe6b3a38ad1391c13baca24912867753b2210e30 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Thu, 6 Jan 2022 15:39:58 +0100 Subject: [PATCH] Silence policy CMP0087 warning Signed-off-by: Robert Haschke --- ament_cmake_python/cmake/ament_python_install_package.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ament_cmake_python/cmake/ament_python_install_package.cmake b/ament_cmake_python/cmake/ament_python_install_package.cmake index 7bd5e2eb..6eeb46be 100644 --- a/ament_cmake_python/cmake/ament_python_install_package.cmake +++ b/ament_cmake_python/cmake/ament_python_install_package.cmake @@ -160,6 +160,11 @@ setup( DESTINATION "${ARG_DESTINATION}/${egg_install_name}.egg-info" ) + if(POLICY CMP0087) + # Allow generator expressions in install(CODE...) + cmake_policy(SET CMP0087 NEW) + endif() + # generate/install entry-point console scripts get_filename_component(ABS_SCRIPTS_DESTINATION "${ARG_SCRIPTS_DESTINATION}" ABSOLUTE BASE_DIR "${CMAKE_INSTALL_PREFIX}") install(CODE "execute_process(COMMAND ${python_interpreter} setup.py install_scripts --install-dir \"${ABS_SCRIPTS_DESTINATION}\"