File: 0004-Do-not-create-environment-marker-files-if-package-en.patch

package info (click to toggle)
ros2-ament-cmake 2.7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,624 kB
  • sloc: python: 697; xml: 503; cpp: 144; ansic: 84; sh: 8; makefile: 5
file content (25 lines) | stat: -rw-r--r-- 988 bytes parent folder | download | duplicates (2)
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")