From bae0ba5d100d857c9286ed7c289de630d1c72992 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 28 May 2024 09:38:47 -0700 Subject: [PATCH] Enable 24.04 CI, require cmake 3.22.1 (#504) * Require cmake version 3.22.1, remove old cmake code Part of gazebosim/gz-cmake#350. * No more special handling of PYTHON_DEBUG_LIBRARIES * Remove distutils logic for cmake < 3.12 Signed-off-by: Steve Peters --- .github/workflows/ci.yml | 9 +++++++++ CMakeLists.txt | 2 +- example/CMakeLists.txt | 2 +- python/CMakeLists.txt | 17 +---------------- 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fcfa415e..556ecff59 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,3 +23,12 @@ jobs: cppcheck-enabled: true cpplint-enabled: true doxygen-enabled: true + noble-ci: + runs-on: ubuntu-latest + name: Ubuntu Noble CI + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Compile and test + id: ci + uses: gazebo-tooling/action-gz-ci@noble diff --git a/CMakeLists.txt b/CMakeLists.txt index e40ab4819..8c69aa0ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) #============================================================================ # Initialize the project diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 304c32688..892e9e0a6 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-transport-examples) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index ea5f46b7d..eb348471f 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,21 +1,6 @@ -if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug") - # pybind11 logic for setting up a debug build when both a debug and release - # python interpreter are present in the system seems to be pretty much broken. - # This works around the issue. - set(PYTHON_LIBRARIES "${PYTHON_DEBUG_LIBRARIES}") -endif() - if(USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION) - if(${CMAKE_VERSION} VERSION_LESS "3.12.0") - execute_process( - COMMAND "${PYTHON_EXECUTABLE}" -c "if True: - from distutils import sysconfig as sc - print(sc.get_python_lib(plat_specific=True))" - OUTPUT_VARIABLE Python3_SITEARCH - OUTPUT_STRIP_TRAILING_WHITESPACE) - else() + if(NOT Python3_SITEARCH) # Get install variable from Python3 module - # Python3_SITEARCH is available from 3.12 on, workaround if needed: find_package(Python3 COMPONENTS Interpreter) endif()