summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2022-12-31 01:01:08 +0100
committerAlbert Astals Cid <aacid@kde.org>2022-12-31 01:13:16 +0100
commit7f0276bbc5f7f7b4fefa956d8893ee23c13226e2 (patch)
treed6f5473b7c852d5ee753fb4d3abcfb6cb8e50279
parent43e2da4ade60f7e6c62b4d70f15d603327ca7b2b (diff)
CI: Cheat a bit in the build_clang14_libcpp build
-rw-r--r--.gitlab-ci.yml3
-rw-r--r--qt6/tests/CMakeLists.txt4
2 files changed, 5 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6bb126d2..93bf98c7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -53,7 +53,8 @@ build_clang14_libcpp:
- apt-get install --yes --no-install-recommends libclang-14-dev llvm-14-dev libc++-14-dev libc++abi-14-dev clang-tidy-14 clang-14 libunwind-14-dev gperf jq
- srcdir=`pwd` && mkdir -p /tmp/poppler_build && cd /tmp/poppler_build
- clang++-14 -fPIC -shared -o goostring-format-checker.so $srcdir/test/goostring-format-checker/goostring-format-checker.cc -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I /usr/lib/llvm-14/include/
- - CC=clang-14 CXX=clang++-14 cmake -G Ninja -DCMAKE_CXX_FLAGS="-stdlib=libc++ -Xclang -load -Xclang $PWD/goostring-format-checker.so -Xclang -add-plugin -Xclang goostring-format-checker -Werror -Wno-deprecated-declarations" -DTESTDATADIR=$srcdir/test-data -DCMAKE_EXPORT_COMPILE_COMMANDS=ON $srcdir
+ - echo "We disable Qt6 tests since Qt6 exposes std::string in its ABI which makes it not build in this CI since we're using libc++ but Qt6 in debian is build with libstdc++"
+ - CC=clang-14 CXX=clang++-14 cmake -G Ninja -DCMAKE_CXX_FLAGS="-stdlib=libc++ -Xclang -load -Xclang $PWD/goostring-format-checker.so -Xclang -add-plugin -Xclang goostring-format-checker -Werror -Wno-deprecated-declarations" -DTESTDATADIR=$srcdir/test-data -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_QT6_TESTS=OFF $srcdir
- ninja
- ctest --output-on-failure
- echo "This is a complex way of not running clang-tidy over autogenerated files, unfortunately -DCMAKE_CXX_CLANG_TIDY doesn't support that https://gitlab.kitware.com/cmake/cmake/-/issues/19772"
diff --git a/qt6/tests/CMakeLists.txt b/qt6/tests/CMakeLists.txt
index d5f7184f..90ec00cc 100644
--- a/qt6/tests/CMakeLists.txt
+++ b/qt6/tests/CMakeLists.txt
@@ -22,7 +22,9 @@ macro(QT6_ADD_QTEST exe source)
${source}
)
poppler_add_test(${exe} BUILD_QT6_TESTS ${${test_name}_SOURCES})
- add_test(${exe} ${EXECUTABLE_OUTPUT_PATH}/${exe})
+ if(BUILD_QT6_TESTS)
+ add_test(${exe} ${EXECUTABLE_OUTPUT_PATH}/${exe})
+ endif()
target_link_libraries(${exe} poppler-qt6 Qt6::Widgets Qt6::Test Qt6::Gui)
endmacro()