Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cstest: use DOWNLOAD_EXTRACT_TIMESTAMP conditionally #2581

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions suite/cstest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
cmake_minimum_required(VERSION 3.15)

# Enable DOWNLOAD_EXTRACT_TIMESTAMP
if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()

include(ExternalProject)
find_library(libyaml
NAMES libyaml yaml
REQUIRED)
set(CMOCKA_LIB_FILE "${CMAKE_CURRENT_BINARY_DIR}/extern/src/cmocka_ext-build/src/libcmocka.a")

ExternalProject_Add(cmocka_ext
PREFIX extern
URL "https://cmocka.org/files/1.1/cmocka-1.1.7.tar.xz"
URL_HASH SHA256=810570eb0b8d64804331f82b29ff47c790ce9cd6b163e98d47a4807047ecad82
DOWNLOAD_EXTRACT_TIMESTAMP true
CONFIGURE_COMMAND cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ../cmocka_ext/
BUILD_COMMAND cmake --build . --config Release
BUILD_BYPRODUCTS "${CMOCKA_LIB_FILE}"
Expand All @@ -27,7 +32,6 @@ ExternalProject_Add(libcyaml_ext
PREFIX extern
URL "https://github.com/tlsa/libcyaml/archive/refs/tags/v1.4.2.tar.gz"
URL_HASH SHA256=3211b2a0589ebfe02c563c96adce9246c0787be2af30353becbbd362998d16dc
DOWNLOAD_EXTRACT_TIMESTAMP true
CONFIGURE_COMMAND ""
BUILD_COMMAND make VARIANT=${LIBCYAML_VARIANT} PKG_CONFIG=pkg-config
BUILD_BYPRODUCTS "${LIBCYAML_LIB_FILE}"
Expand Down
Loading