{"action":"created","issue":{"url":"https://api.github.com/repos/catchorg/Catch2/issues/1170","repository_url":"https://api.github.com/repos/catchorg/Catch2","labels_url":"https://api.github.com/repos/catchorg/Catch2/issues/1170/labels{/name}","comments_url":"https://api.github.com/repos/catchorg/Catch2/issues/1170/comments","events_url":"https://api.github.com/repos/catchorg/Catch2/issues/1170/events","html_url":"https://github.com/catchorg/Catch2/pull/1170","id":292598469,"number":1170,"title":"Export catch as cmake package and as a 'linkable' target","user":{"login":"djrollins","id":7419862,"avatar_url":"https://avatars0.githubusercontent.com/u/7419862?v=4","gravatar_id":"","url":"https://api.github.com/users/djrollins","html_url":"https://github.com/djrollins","followers_url":"https://api.github.com/users/djrollins/followers","following_url":"https://api.github.com/users/djrollins/following{/other_user}","gists_url":"https://api.github.com/users/djrollins/gists{/gist_id}","starred_url":"https://api.github.com/users/djrollins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djrollins/subscriptions","organizations_url":"https://api.github.com/users/djrollins/orgs","repos_url":"https://api.github.com/users/djrollins/repos","events_url":"https://api.github.com/users/djrollins/events{/privacy}","received_events_url":"https://api.github.com/users/djrollins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2018-01-29T23:25:28Z","updated_at":"2018-02-05T15:31:58Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/catchorg/Catch2/pulls/1170","html_url":"https://github.com/catchorg/Catch2/pull/1170","diff_url":"https://github.com/catchorg/Catch2/pull/1170.diff","patch_url":"https://github.com/catchorg/Catch2/pull/1170.patch"},"body":"<!--\r\nPlease do not submit pull requests changing the `version.hpp`\r\nor the single-include `catch.hpp` file, these are changed\r\nonly when a new release is made.\r\n\r\nBefore submitting a PR you should probably read the contributor documentation\r\nat docs/contributing.md. It will tell you how to properly test your changes.\r\n-->\r\n\r\n\r\n## Description\r\n<!--\r\nDescribe the what and the why of your pull request. Remember that these two\r\nare usually a bit different. As an example, if you have made various changes\r\nto decrease the number of new strings allocated, thats what. The why probably\r\nwas that you have a large set of tests and found that this speeds them up.\r\n-->\r\nCreate a namespaced catch::catch target that is 'linkable' through\r\n`target_link_libraries()` and export it so it is findable through\r\n`find_package()`.\r\n\r\nThis makes catch a lot easier to use in CMake-based projects. Whether it\r\nis found using `find_package` or included in the client project as a\r\nsubdirectory, the client can include the catch headers per-target with\r\n`target_include_directories(target PRIVATE catch::catch).\r\n\r\nAlso exported is a catch-config-version.cmake file that handles\r\nversions if specified through `find_package(catch 2.1.1 REQUIRED)`.\r\nIt will find versions with the exact same major number and with a minor\r\nnumber >= specified minor number.\r\n\r\nLIMITATIONS: As catch.hpp is stored inside the single_include directory,\r\nbut installed to include/catch, the `#include` directive changes based\r\non whether catch is a subdirectory or installed package.\r\n\r\n    subdirectory: `#include <catch.hpp>` or `#include \"catch.hpp\"`\r\n    packaged:     `#include <catch/catch.hpp>`\r\n\r\nThis could be resolved if catch.hpp was moved into single_include/catch,\r\nbut I'll leave that decision to someone else.\r\n\r\n## GitHub Issues\r\n<!-- \r\nIf this PR was motivated by some existing issues, reference them here.\r\n\r\nIf it is a simple bug-fix, please also add a line like 'Closes #123'\r\nto your commit message, so that it is automatically closed.\r\nIf it is not, don't, as it might take several iterations for a feature\r\nto be done properly. If in doubt, leave it open and reference it in the\r\nPR itself, so that maintainers can decide.\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/catchorg/Catch2/issues/comments/363119717","html_url":"https://github.com/catchorg/Catch2/pull/1170#issuecomment-363119717","issue_url":"https://api.github.com/repos/catchorg/Catch2/issues/1170","id":363119717,"user":{"login":"horenmar","id":9026413,"avatar_url":"https://avatars1.githubusercontent.com/u/9026413?v=4","gravatar_id":"","url":"https://api.github.com/users/horenmar","html_url":"https://github.com/horenmar","followers_url":"https://api.github.com/users/horenmar/followers","following_url":"https://api.github.com/users/horenmar/following{/other_user}","gists_url":"https://api.github.com/users/horenmar/gists{/gist_id}","starred_url":"https://api.github.com/users/horenmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/horenmar/subscriptions","organizations_url":"https://api.github.com/users/horenmar/orgs","repos_url":"https://api.github.com/users/horenmar/repos","events_url":"https://api.github.com/users/horenmar/events{/privacy}","received_events_url":"https://api.github.com/users/horenmar/received_events","type":"User","site_admin":false},"created_at":"2018-02-05T15:31:58Z","updated_at":"2018-02-05T15:31:58Z","author_association":"OWNER","body":"Squash this a bit and I'll merge it.\r\n\r\nFiguring out what the do about the include paths will have to come later.\r\n"}}
{"actor":{"display_login":"horenmar"}}