0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-26 06:41:03 +08:00

default to not building tests if cmake version can't handle skipped tests (#4376)

* default to not building tests if cmake version can't handle skipped tests (see https://github.com/zeromq/libzmq/issues/4375)
This commit is contained in:
Bill Torpey 2022-05-03 17:18:44 -04:00 committed by GitHub
parent 572eb008f1
commit edfbb1ced6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -1625,7 +1625,11 @@ endif()
# -----------------------------------------------------------------------------
# tests
option(BUILD_TESTS "Whether or not to build the tests" ON)
if(${CMAKE_VERSION} VERSION_LESS 3.12.3)
option(BUILD_TESTS "Whether or not to build the tests" OFF)
else()
option(BUILD_TESTS "Whether or not to build the tests" ON)
endif()
set(ZMQ_BUILD_TESTS
${BUILD_TESTS}

View File

@ -31,6 +31,7 @@ CMAKE_OPTS+=("-DCMAKE_PREFIX_PATH:PATH=${BUILD_PREFIX}")
CMAKE_OPTS+=("-DCMAKE_LIBRARY_PATH:PATH=${BUILD_PREFIX}/lib")
CMAKE_OPTS+=("-DCMAKE_INCLUDE_PATH:PATH=${BUILD_PREFIX}/include")
CMAKE_OPTS+=("-DENABLE_CAPSH=ON")
CMAKE_OPTS+=("-DBUILD_TESTS=ON")
if [ "$CLANG_FORMAT" != "" ] ; then
CMAKE_OPTS+=("-DCLANG_FORMAT=${CLANG_FORMAT}")