diff options
author | Jordan Williams <jwillikers@protonmail.com> | 2020-01-14 14:21:24 -0600 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2020-01-14 23:21:24 +0300 |
commit | daff5fead3fbe22c6fc58310ca3f49caf117f185 (patch) | |
tree | 43a5a3096078fc21a928706c3f98ceae37596dd5 /CONTRIBUTORS | |
parent | 5ce2429af7a8481581896afaa480552cc7584808 (diff) | |
download | google-benchmark-daff5fead3fbe22c6fc58310ca3f49caf117f185.tar.gz |
Alias CMake Targets. Fixes #921 (#926)
* add Jordan Williams to both CONTRIBUTORS and AUTHORS
* alias benchmark libraries
Provide aliased CMake targets for the benchmark and benchmark_main targets.
The alias targets are namespaced under benchmark::, which is the namespace when they are exported.
I chose not to use either the PROJECT_NAME or the namespace variable but to hard-code the namespace.
This is because the benchmark and benchmark_main targets are hard-coded by name themselves.
Hard-coding the namespace is also much cleaner and easier to read.
* link to aliased benchmark targets
It is safer to link against namespaced targets because of how CMake interprets the double colon.
Typo's will be caught by CMake at configuration-time instead of during compile / link time.
* document the provided alias targets
* add "Usage with CMake" section in documentation
This section covers linking against the alias/import CMake targets and including them using either find_package or add_subdirectory.
* format the "Usage with CMake" README section
Added a newline after the "Usage with CMake" section header.
Dropped the header level of the section by one to make it a direct subsection of the "Usage" section.
Wrapped lines to be no longer than 80 characters in length.
Diffstat (limited to 'CONTRIBUTORS')
-rw-r--r-- | CONTRIBUTORS | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 04e8aa6..88f7eee 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -50,6 +50,7 @@ Jern-Kuan Leong <jernkuan@gmail.com> JianXiong Zhou <zhoujianxiong2@gmail.com> Joao Paulo Magalhaes <joaoppmagalhaes@gmail.com> John Millikin <jmillikin@stripe.com> +Jordan Williams <jwillikers@protonmail.com> Jussi Knuuttila <jussi.knuuttila@gmail.com> Kai Wolf <kai.wolf@gmail.com> Kaito Udagawa <umireon@gmail.com> |