Skip to content

Commit

Permalink
Enable 24.04 CI, require cmake 3.22.1 (#504)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
scpeters authored May 28, 2024
1 parent 508d28b commit bae0ba5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
17 changes: 1 addition & 16 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()

Expand Down

0 comments on commit bae0ba5

Please sign in to comment.