From daff5fead3fbe22c6fc58310ca3f49caf117f185 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Tue, 14 Jan 2020 14:21:24 -0600 Subject: 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. --- CONTRIBUTORS | 1 + 1 file changed, 1 insertion(+) (limited to 'CONTRIBUTORS') diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 04e8aa6..88f7eee 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -50,6 +50,7 @@ Jern-Kuan Leong JianXiong Zhou Joao Paulo Magalhaes John Millikin +Jordan Williams Jussi Knuuttila Kai Wolf Kaito Udagawa -- cgit v1.2.3