mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
ci: Enable custom CXX flags, enable -Werror
- Add a new boolean to make and ninja builds (uhdAllowWarnings). It
defaults to false.
- When asserted, we set build flags for make and ninja to
-Werror -Wno-error=maybe-uninitialized
- Add a new parameter to make and ninja builds (uhdCxxFlags). It is
currently unused
This commit is contained in:
parent
38db29121a
commit
fe77c4d5c5
@ -6,6 +6,12 @@ parameters:
|
||||
- name: uhdEnableTraceLog
|
||||
type: boolean
|
||||
default: false
|
||||
- name: uhdAllowWarnings
|
||||
type: boolean
|
||||
default: false
|
||||
- name: uhdCxxFlags
|
||||
type: string
|
||||
default: ""
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
@ -15,6 +21,11 @@ steps:
|
||||
echo "Enabling UHD Tracing"
|
||||
export UHD_CI_CMAKE_OPTIONS="-DUHD_LOG_MIN_LEVEL=trace $UHD_CI_CMAKE_OPTIONS"
|
||||
fi
|
||||
if [[ "${{ parameters.uhdAllowWarnings }}" = "False" ]]; then
|
||||
echo "Warnings not allowed for this build."
|
||||
export CXXFLAGS="-Werror -Wno-error=maybe-uninitialized $CXXFLAGS"
|
||||
fi
|
||||
export CXXFLAGS="${{ parameters.uhdCxxFlags }} $CXXFLAGS"
|
||||
cmake \
|
||||
$UHD_CI_CMAKE_OPTIONS \
|
||||
${{ parameters.uhdSrcDir }}/host
|
||||
|
||||
@ -3,11 +3,22 @@ parameters:
|
||||
type: string
|
||||
- name: uhdBuildDir
|
||||
type: string
|
||||
- name: uhdAllowWarnings
|
||||
type: boolean
|
||||
default: false
|
||||
- name: uhdCxxFlags
|
||||
type: string
|
||||
default: ""
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
mkdir -p ${{ parameters.uhdBuildDir }}
|
||||
cd ${{ parameters.uhdBuildDir }}
|
||||
if [[ "${{ parameters.uhdAllowWarnings }}" = "False" ]]; then
|
||||
echo "Warnings not allowed for this build."
|
||||
export CXXFLAGS="-Werror -Wno-error=maybe-uninitialized $CXXFLAGS"
|
||||
fi
|
||||
export CXXFLAGS="${{ parameters.uhdCxxFlags }} $CXXFLAGS"
|
||||
cmake -G Ninja ${{ parameters.uhdSrcDir }}/host
|
||||
displayName: cmake ninja UHD
|
||||
- script: |
|
||||
|
||||
@ -11,8 +11,10 @@ trigger:
|
||||
paths:
|
||||
include:
|
||||
- host
|
||||
- .ci/uhd-pipeline.yml
|
||||
- .ci/
|
||||
- images/manifest.txt
|
||||
exclude:
|
||||
- .ci/docker
|
||||
pr:
|
||||
branches:
|
||||
include:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user