Skip to content

Commit

Permalink
Set CXXFLAGS as well as CFLAGS in CI builds & enable C++11
Browse files Browse the repository at this point in the history
Enable C++11 mode on macOS 12 builds, which is needed to compile exiv
0.28.1 headers.
  • Loading branch information
dfandrich committed Nov 21, 2023
1 parent 26c8e6b commit c7fa47b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ install:

build_script:
- cmd: if [%CONFIG%]==[cygwin64] (
C:\%CONFIG%\bin\bash -e -l -c "cd $APPVEYOR_BUILD_FOLDER && make gpscorrelate gpscorrelate-gui CFLAGS='-Wall -Wextra -O3 -DENABLE_NLS' LDFLAGS='-lintl'" )
C:\%CONFIG%\bin\bash -e -l -c "cd $APPVEYOR_BUILD_FOLDER && make gpscorrelate gpscorrelate-gui CXXFLAGS='-Wall -Wextra -O3 -DENABLE_NLS' CFLAGS='-Wall -Wextra -O3 -DENABLE_NLS' LDFLAGS='-lintl'" )
- cmd: if [%CONFIG%]==[msys2] (
make EXEEXT=.exe gpscorrelate.exe gpscorrelate-gui.exe CC=gcc CXX=g++ CFLAGS="-Wall -Wextra -O3 -DENABLE_NLS" LDFLAGS="-lintl" )
make EXEEXT=.exe gpscorrelate.exe gpscorrelate-gui.exe CC=gcc CXX=g++ CFLAGS="-Wall -Wextra -O3 -DENABLE_NLS" CXXFLAGS="-Wall -Wextra -O3 -DENABLE_NLS" LDFLAGS="-lintl" )

test_script:
# Cygwin allows overwriting read-only files for some strange reason, which
Expand Down
6 changes: 3 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ freebsd_task:
- pkg install -y pkgconf docbook-xsl exiv2 libxml2 gtk"$GTK" libxslt gettext-tools desktop-file-utils

compile_script:
- make CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" GTK="$GTK"
- make CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" GTK="$GTK"

test_script:
- ./gpscorrelate -V
Expand Down Expand Up @@ -70,7 +70,7 @@ linux_arm_task:
- adduser build

compile_script:
- make CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" GTK="$GTK"
- make CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" CFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" GTK="$GTK"

test_script:
- ./gpscorrelate -V
Expand Down Expand Up @@ -113,7 +113,7 @@ linux_musl_task:
- adduser -D build

compile_script:
- make CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" GTK="$GTK"
- make CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" GTK="$GTK"

test_script:
- ./gpscorrelate -V
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- name: 'install deps'
run: sudo apt-get update -y; sudo apt-get install -y --no-install-suggests --no-install-recommends ${{ matrix.build.install }}
- name: 'build'
run: make CFLAGS="${{ matrix.build.cflags }}" LDFLAGS="${{ matrix.build.ldflags }}" CC="${{ matrix.build.cc }}" CXX="${{ matrix.build.cxx }}" GTK="${{ matrix.build.gtk }}" ${{ matrix.build.make_opts }} ${{ matrix.build.target }}
run: make CFLAGS="${{ matrix.build.cflags }}" CXXFLAGS="${{ matrix.build.cflags }}" LDFLAGS="${{ matrix.build.ldflags }}" CC="${{ matrix.build.cc }}" CXX="${{ matrix.build.cxx }}" GTK="${{ matrix.build.gtk }}" ${{ matrix.build.make_opts }} ${{ matrix.build.target }}
- name: 'smoke test'
# ASAN_OPTIONS is to work around https://bugzilla.redhat.com/show_bug.cgi?id=1950244
run: env ASAN_OPTIONS="${{ matrix.build.asan_options }}" ./gpscorrelate -V
Expand Down Expand Up @@ -203,7 +203,7 @@ jobs:
- name: 'install deps'
run: sudo apt-get update -y; sudo apt-get install -y --no-install-suggests --no-install-recommends ${{ matrix.build.install }}
- name: 'build'
run: make CFLAGS="${{ matrix.build.cflags }}" LDFLAGS="${{ matrix.build.ldflags }}" CC="${{ matrix.build.cc }}" CXX="${{ matrix.build.cxx }}" GTK="${{ matrix.build.gtk }}" ${{ matrix.build.make_opts }} ${{ matrix.build.target }}
run: make CFLAGS="${{ matrix.build.cflags }}" CXXFLAGS="${{ matrix.build.cflags }}"LDFLAGS="${{ matrix.build.ldflags }}" CC="${{ matrix.build.cc }}" CXX="${{ matrix.build.cxx }}" GTK="${{ matrix.build.gtk }}" ${{ matrix.build.make_opts }} ${{ matrix.build.target }}
- name: 'smoke test'
run: ./gpscorrelate -V
- name: 'test'
Expand Down Expand Up @@ -236,7 +236,7 @@ jobs:
- name: 'install deps'
run: sudo apt-get update -y; sudo apt-get install -y --no-install-suggests --no-install-recommends ${{ matrix.build.install }}
- name: 'build'
run: make CFLAGS="${{ matrix.build.cflags }}" LDFLAGS="${{ matrix.build.ldflags }}" CC="${{ matrix.build.cc }}" CXX="${{ matrix.build.cxx }}" GTK="${{ matrix.build.gtk }}" ${{ matrix.build.make_opts }} ${{ matrix.build.target }}
run: make CFLAGS="${{ matrix.build.cflags }}" CXXFLAGS="${{ matrix.build.cflags }}" LDFLAGS="${{ matrix.build.ldflags }}" CC="${{ matrix.build.cc }}" CXX="${{ matrix.build.cxx }}" GTK="${{ matrix.build.gtk }}" ${{ matrix.build.make_opts }} ${{ matrix.build.target }}
- name: 'smoke test'
run: ./gpscorrelate -V
- name: 'test'
Expand All @@ -260,14 +260,16 @@ jobs:
gtk: 2
install: desktop-file-utils docbook-xsl exiv2 gtk+
cflags: -Wall -Wextra -Werror -Wno-error=deprecated-declarations -O3 -DENABLE_NLS=1
cxxflags: -std=c++11 -Wall -Wextra -Werror -Wno-error=deprecated-declarations -O3 -DENABLE_NLS=1
ldflags: -O3 -lintl
cxx: g++
target: all
install_target: install install-po install-desktop-file
- cc: gcc
gtk: 3
install: desktop-file-utils docbook-xsl exiv2 gtk+3
install: -std=c++11 desktop-file-utils docbook-xsl exiv2 gtk+3
cflags: -Wall -Wextra -Werror -Wno-error=deprecated-declarations -O3 -DENABLE_NLS=1
cxxflags: -std=c++11 -Wall -Wextra -Werror -Wno-error=deprecated-declarations -O3 -DENABLE_NLS=1
ldflags: -O3 -lintl
cxx: g++
target: all
Expand All @@ -276,6 +278,7 @@ jobs:
gtk: 2
install: desktop-file-utils docbook-xsl exiv2 gtk+
cflags: -Wall -Wextra -Werror -Wno-error=deprecated-declarations -O3 -DENABLE_NLS=1
cxxflags: -std=c++11 -Wall -Wextra -Werror -Wno-error=deprecated-declarations -O3 -DENABLE_NLS=1
ldflags: -O3 -lintl
cxx: clang++
target: all
Expand All @@ -284,6 +287,7 @@ jobs:
gtk: 3
install: desktop-file-utils docbook-xsl exiv2 gtk+3
cflags: -Wall -Wextra -Werror -Wno-error=deprecated-declarations -O3 -DENABLE_NLS=1
cxxflags: -std=c++11 -Wall -Wextra -Werror -Wno-error=deprecated-declarations -O3 -DENABLE_NLS=1
ldflags: -O3 -lintl
cxx: clang++
target: all
Expand All @@ -294,7 +298,7 @@ jobs:
- name: install deps
run: brew install ${{ matrix.build.install }}
- name: build
run: make CFLAGS="${{ matrix.build.cflags }}" LDFLAGS="${{ matrix.build.ldflags }}" CC="${{ matrix.build.cc }}" CXX="${{ matrix.build.cxx }}" GTK="${{ matrix.build.gtk }}" ${{ matrix.build.make_opts }} XML_CATALOG_FILES="$(brew --prefix)/etc/xml/catalog" XSLTFLAGS=--nonet ${{ matrix.build.target }}
run: make CFLAGS="${{ matrix.build.cflags }}" CXXFLAGS="${{ matrix.build.cxxflags }}" LDFLAGS="${{ matrix.build.ldflags }}" CC="${{ matrix.build.cc }}" CXX="${{ matrix.build.cxx }}" GTK="${{ matrix.build.gtk }}" ${{ matrix.build.make_opts }} XML_CATALOG_FILES="$(brew --prefix)/etc/xml/catalog" XSLTFLAGS=--nonet ${{ matrix.build.target }}
- name: smoke test
run: ./gpscorrelate -V
- name: test
Expand Down Expand Up @@ -355,7 +359,7 @@ jobs:
- name: install deps
run: brew install ${{ matrix.build.install }}
- name: build
run: make CFLAGS="${{ matrix.build.cflags }}" LDFLAGS="${{ matrix.build.ldflags }}" CC="${{ matrix.build.cc }}" CXX="${{ matrix.build.cxx }}" GTK="${{ matrix.build.gtk }}" ${{ matrix.build.make_opts }} XML_CATALOG_FILES="$(brew --prefix)/etc/xml/catalog" XSLTFLAGS=--nonet ${{ matrix.build.target }}
run: make CFLAGS="${{ matrix.build.cflags }}" CXXFLAGS="${{ matrix.build.cflags }}" LDFLAGS="${{ matrix.build.ldflags }}" CC="${{ matrix.build.cc }}" CXX="${{ matrix.build.cxx }}" GTK="${{ matrix.build.gtk }}" ${{ matrix.build.make_opts }} XML_CATALOG_FILES="$(brew --prefix)/etc/xml/catalog" XSLTFLAGS=--nonet ${{ matrix.build.target }}
- name: smoke test
run: ./gpscorrelate -V
- name: test
Expand Down Expand Up @@ -391,7 +395,7 @@ jobs:
run: |
dnf install -y --setopt=install_weak_deps=False ${{ matrix.build.install }}
- name: build
run: make CFLAGS="${{ matrix.build.cflags }}" LDFLAGS="${{ matrix.build.ldflags }}" CC="${{ matrix.build.cc }}" CXX="${{ matrix.build.cxx }}" GTK="${{ matrix.build.gtk }}" ${{ matrix.build.make_opts }} ${{ matrix.build.target }}
run: make CFLAGS="${{ matrix.build.cflags }}" CXXFLAGS="${{ matrix.build.cflags }}" LDFLAGS="${{ matrix.build.ldflags }}" CC="${{ matrix.build.cc }}" CXX="${{ matrix.build.cxx }}" GTK="${{ matrix.build.gtk }}" ${{ matrix.build.make_opts }} ${{ matrix.build.target }}
- name: smoke test
run: ./gpscorrelate -V
- name: test
Expand Down Expand Up @@ -428,7 +432,7 @@ jobs:
run: |
dnf install -y --setopt=install_weak_deps=False ${{ matrix.build.install }}
- name: build
run: make CFLAGS="${{ matrix.build.cflags }}" LDFLAGS="${{ matrix.build.ldflags }}" CC="${{ matrix.build.cc }}" CXX="${{ matrix.build.cxx }}" GTK="${{ matrix.build.gtk }}" ${{ matrix.build.make_opts }} ${{ matrix.build.target }}
run: make CFLAGS="${{ matrix.build.cflags }}" CXXFLAGS="${{ matrix.build.cflags }}" LDFLAGS="${{ matrix.build.ldflags }}" CC="${{ matrix.build.cc }}" CXX="${{ matrix.build.cxx }}" GTK="${{ matrix.build.gtk }}" ${{ matrix.build.make_opts }} ${{ matrix.build.target }}
- name: smoke test
run: ./gpscorrelate -V
- name: test
Expand Down

0 comments on commit c7fa47b

Please sign in to comment.