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

Clean up the cstest documentation and build instructions. #2580

Merged
merged 1 commit into from
Dec 15, 2024

Conversation

Rot127
Copy link
Collaborator

@Rot127 Rot127 commented Dec 8, 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)

Detailed description

There happened some confusion because the docs were not up to date.

Test plan

...

Closing issues

...

@hainest
Copy link
Contributor

hainest commented Dec 9, 2024

DOWNLOAD_EXTRACT_TIMESTAMP wasn't added until 3.24. Would it be possible for Capstone to use this conditionally? Something like

if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
  set(DOWNLOAD_EXTRACT_TIMESTAMP "DOWNLOAD_EXTRACT_TIMESTAMP true")
endif()

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}
    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}"
    INSTALL_COMMAND ""
)

and the same for libcyaml_ext.

@Rot127
Copy link
Collaborator Author

Rot127 commented Dec 9, 2024

In general yes. IIRC there was also another reason why cmake >=3.24 was needed. But I forgot why and if at all.
Would you mind to open a PR please?

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

Successfully merging this pull request may close these issues.

3 participants