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

added cmake target #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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