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"