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

Clarify whether CMake FetchContent should work with the library #755

Open
strncmp opened this issue Sep 22, 2024 · 0 comments
Open

Clarify whether CMake FetchContent should work with the library #755

strncmp opened this issue Sep 22, 2024 · 0 comments

Comments

@strncmp
Copy link

strncmp commented Sep 22, 2024

While experimenting, I downloaded the library in my project using the FetchContent functionality provided by CMake. The setup works just fine, but the fact that the documentation doesn't mention whether that should work does not inspire confidence on whether it will continue to work in the future. FetchContent is a convenient way to consume libraries in one's project, and having Unity work with that is beneficial to CMake users. With that in mind, could you clarify whether Unity is actually supposed to work with FetchContent and add it to the documentation?

For reference, here's the code I used to consume the library:

include(FetchContent)
FetchContent_Declare(
        unity
        GIT_REPOSITORY  https://github.com/ThrowTheSwitch/Unity
        GIT_TAG         v2.6.0
)
FetchContent_MakeAvailable(unity)

add_executable(mytest mytest.c)
target_link_libraries(mytest PUBLIC unity::framework)
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

No branches or pull requests

1 participant