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

Conversation

hainest
Copy link
Contributor

@hainest hainest commented Dec 9, 2024

Your checklist for this pull request

  • I've documented or updated the documentation of every API function and struct this PR changes.
  • I've added tests that prove my fix is effective or that my feature works (if possible)

N/A

Detailed description
This feature was added in CMake 3.24.0, so this allows older CMakes to still build the tests.

Test plan
N/A

Closing issues
N/A

@Rot127
Copy link
Collaborator

Rot127 commented Dec 9, 2024

 Enabling CAPSTONE_XTENSA_SUPPORT
CMake Error at /usr/local/share/cmake-3.31/Modules/ExternalProject/shared_internal_commands.cmake:1091 (message):
  URL_HASH is set to

    SHA256=810570eb0b8d64804331f82b29ff47c790ce9cd6b163e98d47a4807047ecad82;DOWNLOAD_EXTRACT_TIMESTAMP true

  but must be ALGO=value where ALGO is

    MD5|SHA1|SHA224|SHA256|SHA384|SHA512|SHA3_224|SHA3_256|SHA3_384|SHA3_512

  and value is a hex string.
Call Stack (most recent call first):
  /usr/local/share/cmake-3.31/Modules/ExternalProject.cmake:3041 (_ep_add_download_command)
  suite/cstest/CMakeLists.txt:13 (ExternalProject_Add)


-- Configuring incomplete, errors occurred!

@hainest
Copy link
Contributor Author

hainest commented Dec 9, 2024

Interesting. That's the exact error this fixes. I'm not able to reproduce it.

docker run --rm -it ubuntu:22.04
apt install -y cmake git g++ libyaml-dev

cmake --version
  cmake version 3.22.1

git clone --depth=1 https://github.com/capstone-engine/capstone.git
cd capstone
git fetch origin pull/2581/head:PR2581
git checkout PR2581
mkdir build
cd build
cmake .. -DCAPSTONE_BUILD_SHARED_LIBS=ON -DCAPSTONE_BUILD_CSTEST=ON

Copy link
Collaborator

@Rot127 Rot127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! Really appreciate it.

@XVilka
Copy link
Contributor

XVilka commented Dec 14, 2024

@kabeor

This feature was added in CMake 3.24.0, so this allows older CMakes to
still build the tests.
@hainest hainest force-pushed the thaines/cmake_cstest_download_extract_timestamp branch from b63a4b0 to 809f493 Compare December 16, 2024 17:24
Copy link
Member

@kabeor kabeor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@kabeor kabeor merged commit efbbc3b into capstone-engine:next Dec 16, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants