ci: Test C++ compatibility mode

This commit is contained in:
Roger Leigh
2025-12-18 22:33:09 +00:00
parent e8459c5ad1
commit 5222885b6b
2 changed files with 19 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ default:
stages:
- pre-build
- build
- test
- static-analysis
- pages
@@ -82,6 +83,13 @@ linux-cmake-make-old:
script:
- sh build/gitlab-ci cmake "Unix Makefiles" Release
gcc-cpp-compat:
stage: test
rules:
- if: '$CI_PROJECT_PATH == "libtiff/libtiff"'
script:
- sh build/gitlab-ci cmake "Ninja" Debug cxxcompat
freebsd15-release:
stage: build
rules:
@@ -98,6 +106,14 @@ freebsd15-debug:
script:
- sh build/gitlab-ci cmake Ninja Debug
clang-cpp-compat:
stage: test
rules:
- if: '$CI_PROJECT_PATH == "libtiff/libtiff"'
tags: [freebsd15]
script:
- sh build/gitlab-ci cmake Ninja Debug cxxcompat
macos26-release:
stage: build
rules:

View File

@@ -49,11 +49,13 @@ cmake_build()
para3=`echo "$3" | sed 's/./\L&/g'`
if [ "$para3" = "static" ]; then
opts2="-DBUILD_SHARED_LIBS:BOOL=OFF"
elif [ "$para3" = "cxxcompat" ]; then
opts2="-Dcxx-compat-mode:BOOL=ON"
else
opts2=""
fi
echo "Running cmake -G "$1" -DCMAKE_UNITY_BUILD=ON -DCMAKE_BUILD_TYPE="$2" -DCMAKE_INSTALL_PREFIX=../cmake-install ${opts} ${opts2} .."
cmake -G "$1" -DCMAKE_UNITY_BUILD=ON -DCMAKE_BUILD_TYPE="$2" -DCMAKE_INSTALL_PREFIX=../cmake-install -DCMAKE_C_FLAGS="-Wall -Wextra -Werror" ${opts} ${opts2} ..
cmake -G "$1" -DCMAKE_UNITY_BUILD=ON -DCMAKE_BUILD_TYPE="$2" -DCMAKE_INSTALL_PREFIX=../cmake-install -DCMAKE_C_FLAGS="-Wall -Wextra -Werror" -Dcxx-compat-warnings=ON ${opts} ${opts2} ..
$COVERITY_BUILD cmake --build .
cmake --build . --target install
ctest -V