rapids-cmake icon indicating copy to clipboard operation
rapids-cmake copied to clipboard

[FEA] rapids_cpm_spdlog generate correct build config support

Open robertmaynard opened this issue 2 years ago • 1 comments

Currently projects need to manually generate a build directory config module ( e.g. )

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

  if(spdlog_ADDED)
    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()

Describe the solution you'd like

We should do this for projects in rapids_cpm_spdlog

robertmaynard avatar Mar 10 '23 14:03 robertmaynard

Adding some links.

I think that instead of doing this for projects in rapids_cpm_spdlog(), we can soon just remove that manual exporting from projects' get_spdlog.cmake.

Assuming https://github.com/rapidsai/build-planning/issues/56 is completed (see #592), across RAPIDS we'll be using spdlog>=1.13.0 , which contains @robertmaynard 's fix to its build exports to prevent the need for exactly this type of export management by projects that depend on spdlog: https://github.com/gabime/spdlog/pull/2846.

jameslamb avatar Apr 25 '24 15:04 jameslamb

I think this would could be closed if the following are merged:

  • [x] https://github.com/rapidsai/rapids-cmake/pull/689
  • [x] https://github.com/rapidsai/rmm/pull/1678
  • [x] https://github.com/rapidsai/cudf/pull/16806

jameslamb avatar Sep 19 '24 15:09 jameslamb

I think this can be closed!

The now-extraneous rapids_export() calls were removed in the PRs linked in https://github.com/rapidsai/rapids-cmake/issues/387#issuecomment-2361281304.

There are not any remaining across RAPIDS: https://github.com/search?q=org%3Arapidsai+%22NAMESPACE+spdlog%3A%3A%22+AND+NOT+is%3Aarchived&type=code

jameslamb avatar Sep 24 '24 16:09 jameslamb