Skip to content

Commit

Permalink
Adds missing clang flag for dealing with pybind11 header file.
Browse files Browse the repository at this point in the history
Signed-off-by: Franco Cipollone <[email protected]>
  • Loading branch information
francocipollone committed Oct 3, 2023
1 parent bdad5e0 commit 706d38e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: gcc

on:
push:
branches:
- main
pull_request:
branches:
- main
Expand All @@ -11,6 +13,11 @@ env:
PACKAGE_NAME: maliput_dragway
ROS_DISTRO: foxy

# Cancel previously running PR jobs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
compile_and_test:
name: Compile and test
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ env:
ROS_WS: maliput_ws
UBSAN_OPTIONS: halt_on_error=1

# Cancel previously running PR jobs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
compile_and_test:
if: contains(github.event.pull_request.labels.*.name, 'do-clang-test')
if: ${{ contains(github.event.pull_request.labels.*.name, 'do-clang-test') || github.event_name == 'workflow_dispatch'}}
name: Compile and test with sanitizer
runs-on: ubuntu-latest
container:
Expand Down Expand Up @@ -57,7 +62,7 @@ jobs:
shell: bash
working-directory: ${{ env.ROS_WS }}
run: |
rosdep update;
rosdep update --include-eol-distros;
rosdep install -i -y --rosdistro ${ROS_DISTRO} --from-paths src
- name: colcon build
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scan_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:

jobs:
static_analysis:
if: contains(github.event.pull_request.labels.*.name, 'do-static-analyzer-test')
if: ${{ contains(github.event.pull_request.labels.*.name, 'do-static-analyzer-test') || github.event_name == 'workflow_dispatch'}}
name: Static analysis
runs-on: ubuntu-latest
container:
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
shell: bash
working-directory: ${{ env.ROS_WS }}
run: |
rosdep update;
rosdep update --include-eol-distros;
rosdep install -i -y --rosdistro ${ROS_DISTRO} --from-paths src
- name: colcon build up-to
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion cmake/DefaultCFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if ("${CMAKE_CXX_COMPILER_ID} " MATCHES "GNU ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -fdiagnostics-color=always -ffunction-sections -fopenmp -fPIC -fstack-protector -fno-omit-frame-pointer -no-canonical-prefixes -O2 -std=c++17 -Wall -Wno-builtin-macro-redefined -Wno-missing-field-initializers -Wregister -Wstrict-overflow -Wno-unused-const-variable")
endif ()
elseif ("${CMAKE_CXX_COMPILER_ID} " MATCHES "Clang ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -fdiagnostics-color=always -ffunction-sections -fPIC -fstack-protector -fno-omit-frame-pointer -no-canonical-prefixes -O2 -std=c++17 -Wall -Wno-builtin-macro-redefined -Wno-deprecated-dynamic-exception-spec -Wno-enum-compare-switch -Wno-gnu-designator -Wno-missing-field-initializers -Wno-register -Wno-strict-overflow -Wno-unknown-warning-option -Wno-unneeded-internal-declaration -Wno-unused-const-variable -Wno-missing-braces")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsized-deallocation -fdata-sections -fdiagnostics-color=always -ffunction-sections -fPIC -fstack-protector -fno-omit-frame-pointer -no-canonical-prefixes -O2 -std=c++17 -Wall -Wno-builtin-macro-redefined -Wno-deprecated-dynamic-exception-spec -Wno-enum-compare-switch -Wno-gnu-designator -Wno-missing-field-initializers -Wno-register -Wno-strict-overflow -Wno-unknown-warning-option -Wno-unneeded-internal-declaration -Wno-unused-const-variable -Wno-missing-braces")
else ()
message(FATAL_ERROR "Your C++ compiler does not support C++17.")
endif ()

0 comments on commit 706d38e

Please sign in to comment.