Skip to content

Commit

Permalink
Ensure consistent spdlog dependency target no matter the source (#1101)
Browse files Browse the repository at this point in the history
This removes the difference in targets generated for rmm depending on if spdlog is found on the machine, compared to being built as part of rmm.

Now in all cases rmm targets depend on `spdlog::spdlog_header_only` and never `rmm::spdlog_header_only`.

Authors:
  - Robert Maynard (https://github.com/robertmaynard)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Mark Harris (https://github.com/harrism)

URL: #1101
  • Loading branch information
robertmaynard authored Sep 28, 2022
1 parent 42fd22b commit a60fb27
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cmake/thirdparty/get_spdlog.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ function(find_and_configure_spdlog)

include(${rapids-cmake-dir}/cpm/spdlog.cmake)
rapids_cpm_spdlog(INSTALL_EXPORT_SET rmm-exports)
rapids_export_package(BUILD spdlog rmm-exports)

if(spdlog_ADDED)
install(TARGETS spdlog_header_only EXPORT rmm-exports)
else()
rapids_export_package(BUILD spdlog rmm-exports)
rapids_export(
BUILD spdlog
EXPORT_SET spdlog
GLOBAL_TARGETS spdlog spdlog_header_only
NAMESPACE spdlog::)
include("${rapids-cmake-dir}/export/find_package_root.cmake")
rapids_export_find_package_root(BUILD spdlog [=[${CMAKE_CURRENT_LIST_DIR}]=] rmm-exports)
endif()
endfunction()

Expand Down

0 comments on commit a60fb27

Please sign in to comment.