Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/projects/SelfTest/UsageTests/ToStringVector.tests.cpp
diff options
context:
space:
mode:
authorDaniel J. Rollins2018-01-29 22:56:43 +0000
committerMartin Hořeňovský2018-02-08 12:18:42 +0100
commit39bfc6e82b32b462e85884a97ce0e979e3f93a78 (patch)
tree0cb406defa939c48d68f545fdf90b226346f81c1 /projects/SelfTest/UsageTests/ToStringVector.tests.cpp
parentba6d33fb8c74cf1a453368c07f59145a0b0d429c (diff)
downloadcatch3-39bfc6e82b32b462e85884a97ce0e979e3f93a78.tar.gz
Export Catch as a CMake package and 'linkable' target
Create a namespaced Catch2::Catch target that is 'linkable' through `target_link_libraries()` and export it so it is findable through `find_package()`. `find_package()` will find versions with the same major number and with minor number >= requested. This makes catch a lot easier to use in CMake-based projects. Whether it is found using `find_package` or included in the client project as a subdirectory, the client can include the catch headers per-target with `target_include_directories(target PRIVATE Catch2::Catch). Example usage: cmake_minimum_required(VERSION 3.1) # include Catch2 as subdirectory or installed package # add_subdirectory(Catch2) find_package(Catch2 VERSION 2.1.0 REQUIRED) add_executable(tests tests/catch_main.cpp) target_link_libraries(tests PRIVATE Catch2::Catch)
Diffstat (limited to 'projects/SelfTest/UsageTests/ToStringVector.tests.cpp')
0 files changed, 0 insertions, 0 deletions