Skip to content

Commit

Permalink
Merge pull request #315 from christian-rauch/lang_cxx_optional
Browse files Browse the repository at this point in the history
make C++ language requirements optional
  • Loading branch information
christian-rauch authored Feb 2, 2024
2 parents 6a7b315 + ef12c1c commit 69c21f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/colcon-workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ on: [push, pull_request]
jobs:
# build on Ubuntu docker images
build_linux:
name: "Ubuntu (${{ matrix.ros_distribution }}, shared: ${{ matrix.cmake_shared_libs }})"
name: "Ubuntu (${{ matrix.ros_distribution }})"

runs-on: ubuntu-latest

strategy:
matrix:
ros_distribution: [noetic, humble]
cmake_shared_libs: ['ON', 'OFF']
include:
- docker_image: ubuntu:20.04
ros_distribution: noetic
Expand Down Expand Up @@ -42,27 +41,24 @@ jobs:
with:
package-name: apriltag
target-ros1-distro: ${{ matrix.ros_distribution }}
extra-cmake-args: "-DBUILD_SHARED_LIBS=${{ matrix.cmake_shared_libs }}"

- name: ROS 2 CI Action
if: ${{ matrix.ros_version == 2 }}
uses: ros-tooling/action-ros-ci@v0.3
with:
package-name: apriltag
target-ros2-distro: ${{ matrix.ros_distribution }}
extra-cmake-args: "-DBUILD_SHARED_LIBS=${{ matrix.cmake_shared_libs }}"


# build on Windows native
build_windows:
name: "Windows (${{ matrix.ros_distribution }}, shared: ${{ matrix.cmake_shared_libs }})"
name: "Windows (${{ matrix.ros_distribution }})"

runs-on: windows-2019

strategy:
matrix:
ros_distribution: [noetic, humble]
cmake_shared_libs: ['ON', 'OFF']
include:
- ros_distribution: noetic
ros_version: 1
Expand All @@ -84,26 +80,23 @@ jobs:
with:
package-name: apriltag
target-ros1-distro: ${{ matrix.ros_distribution }}
extra-cmake-args: "-DBUILD_SHARED_LIBS=${{ matrix.cmake_shared_libs }}"

- name: ROS 2 CI Action
if: ${{ matrix.ros_version == 2 }}
uses: ros-tooling/action-ros-ci@v0.3
with:
package-name: apriltag
target-ros2-distro: ${{ matrix.ros_distribution }}
extra-cmake-args: "-DBUILD_SHARED_LIBS=${{ matrix.cmake_shared_libs }}"

# build on macOS native
build_macos:
name: "macOS (${{ matrix.ros_distribution }}, shared: ${{ matrix.cmake_shared_libs }})"
name: "macOS (${{ matrix.ros_distribution }})"

runs-on: macos-latest

strategy:
matrix:
ros_distribution: [humble]
cmake_shared_libs: ['ON', 'OFF']

steps:
- uses: actions/checkout@v4
Expand All @@ -122,4 +115,3 @@ jobs:
with:
package-name: apriltag
target-ros2-distro: ${{ matrix.ros_distribution }}
extra-cmake-args: "-DBUILD_SHARED_LIBS=${{ matrix.cmake_shared_libs }}"
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(apriltag VERSION 3.3.0 LANGUAGES C CXX)
project(apriltag VERSION 3.3.0 LANGUAGES C)

if(POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
Expand Down Expand Up @@ -192,6 +192,7 @@ if (BUILD_EXAMPLES)
set(_OpenCV_REQUIRED_COMPONENTS core imgproc videoio highgui)
find_package(OpenCV COMPONENTS ${_OpenCV_REQUIRED_COMPONENTS} QUIET CONFIG)
if(OpenCV_FOUND)
enable_language(CXX)
# NB: contrib required for TickMeter in OpenCV 2.4. This is only required for 16.04 backwards compatibility and can be removed in the future.
# If we add it to the find_package initially, the demo won't build for newer OpenCV versions
if(OpenCV_VERSION VERSION_LESS "3.0.0")
Expand Down
File renamed without changes.

0 comments on commit 69c21f0

Please sign in to comment.