Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Conversation

@jasonbeach
Copy link

I made two simple changes to make including clara in some cmake projects easier:

  1. defined an interface library that other targets could reference. This doesn't go all out and export targets,etc. as I primarily develop on linux and am not sure how to do that in a windows friendly way. But at least it reduces basic cmake (version > 3.11) inclusion to something like:
FetchContent_Declare(
  clara_fc
  GIT_REPOSITORY https://github.com/catchorg/Clara.git
  GIT_TAG v1.1.5
  GIT_SHALLOW TRUE
)

FetchContent_MakeAvailable(clara_fc )

add_executable(main main.cpp)

target_link_libraries(main clara)
  1. added an option to skip building the tests if clara is not the top level project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant