From 608be8d584710d793ab8f0a8ece0a880f24417b0 Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Thu, 29 Jun 2023 17:41:40 +0200 Subject: [PATCH] Enable GZ_ENABLE_RELOCATABLE_INSTALL in CI for gz-cmake3 Signed-off-by: Jose Luis Rivero --- jenkins-scripts/docker/gz_cmake-compilation.bash | 5 +++++ jenkins-scripts/ign_cmake-default-devel-windows-amd64.bat | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/jenkins-scripts/docker/gz_cmake-compilation.bash b/jenkins-scripts/docker/gz_cmake-compilation.bash index 5691b6e34..e9577750d 100644 --- a/jenkins-scripts/docker/gz_cmake-compilation.bash +++ b/jenkins-scripts/docker/gz_cmake-compilation.bash @@ -31,6 +31,11 @@ if ! [[ ${GZ_CMAKE_MAJOR_VERSION} =~ ^-?[0-9]+$ ]]; then exit -1 fi + +if [ "${GZ_CMAKE_MAJOR_VERSION}" -ge 3 ]; then + BUILDING_EXTRA_CMAKE_PARAMS+=" -DGZ_ENABLE_RELOCATABLE_INSTALL=True" +fi + export GZDEV_PROJECT_NAME="gz-cmake${GZ_CMAKE_MAJOR_VERSION}" . ${SCRIPT_DIR}/lib/generic-building-base.bash diff --git a/jenkins-scripts/ign_cmake-default-devel-windows-amd64.bat b/jenkins-scripts/ign_cmake-default-devel-windows-amd64.bat index 99e0e8373..798bf1550 100644 --- a/jenkins-scripts/ign_cmake-default-devel-windows-amd64.bat +++ b/jenkins-scripts/ign_cmake-default-devel-windows-amd64.bat @@ -9,4 +9,10 @@ set COLCON_PACKAGE=gz-cmake set COLCON_AUTO_MAJOR_VERSION=true set COLCON_PACKAGE_EXTRA_CMAKE_ARGS="-DBUILDSYSTEM_TESTING:BOOL=True" +setlocal ENABLEDELAYEDEXPANSION +for /f %%i in ('python "%SCRIPT_DIR%\tools\detect_cmake_major_version.py" "%WORKSPACE%\%VCS_DIRECTORY%\CMakeLists.txt"') do set PKG_MAJOR_VERSION=%%i +if !PKG_MAJOR_VERSION! gtr 3 ( + set COLCON_PACKAGE_EXTRA_CMAKE_ARGS="%COLCON_PACKAGE_EXTRA_CMAKE_ARGS% -DGZ_ENABLE_RELOCATABLE_INSTALL=True" +) + call "%SCRIPT_DIR%\lib\colcon-default-devel-windows.bat"