From 41bb7b7a1058ba038a08b978bbc60acdccff8afe Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 4 Sep 2022 12:40:48 +0200 Subject: [PATCH] don't build tests in cross-compilation --- recipe/build-lib.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipe/build-lib.sh b/recipe/build-lib.sh index 5fed822..f02e907 100644 --- a/recipe/build-lib.sh +++ b/recipe/build-lib.sh @@ -33,7 +33,12 @@ else cd build-shared fi +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != 1 ]]; then + export CMAKE_ARGS="${CMAKE_ARGS} -Dprotobuf_BUILD_TESTS=OFF" +fi + cmake -G "Ninja" \ + ${CMAKE_ARGS} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$PREFIX \ -Dprotobuf_WITH_ZLIB=ON \