Skip to content

Conversation

@plevold
Copy link

@plevold plevold commented May 4, 2022

First of all, thanks for making this library!

I'm using CMake Package Manager (CPM.cmake) to add libraries like this one to CMake projects. CPM.cmake makes adding external libraries easy when the library has a CMake build system that works
well when added as a subdirectory.

This pull request makes a minor change to the CMake build system so that tests and installation logic are not included when the project is not the root project (i.e. added using add_subdirectory). The advantage of doing this is that projects using this library will not accidentally build and run tests or install files defined by this project.

I'm open to feedback if this doesn't work well with existing CMake workflows.

Don't include tests and installation logic when for example CMake
Package Manager (CPM.cmake) is used to add the project as a
subdirectory.
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.

1 participant