1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Tue, 10 May 2022 21:01:04 +0200
Subject: Do not create environment marker files if package environment
generation is disabled
Forwarded: not-needed
---
.../cmake/environment_hooks/ament_environment_hooks.cmake | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ament_cmake_core/cmake/environment_hooks/ament_environment_hooks.cmake b/ament_cmake_core/cmake/environment_hooks/ament_environment_hooks.cmake
index bd3d385..40f234e 100644
--- a/ament_cmake_core/cmake/environment_hooks/ament_environment_hooks.cmake
+++ b/ament_cmake_core/cmake/environment_hooks/ament_environment_hooks.cmake
@@ -31,6 +31,10 @@ function(ament_environment_hooks)
"ament_package())")
endif()
+ if(NOT AMENT_CMAKE_ENVIRONMENT_PACKAGE_GENERATION)
+ return()
+ endif()
+
foreach(hook ${ARGN})
assert_file_exists("${hook}"
"ament_environment_hooks() the passed hook file '${hook}' does not exist")
|