From d60491a4593316f9c9380dde97ead0569bb976af Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Wed, 15 Mar 2023 14:45:27 -0400 Subject: [PATCH 1/7] rapids_cpm cccl packages cmake files are now vendored Fixes #367 This way rapids-cmake versions of these projects don't clash with the upstream versions. --- rapids-cmake/cpm/libcudacxx.cmake | 8 ++++++-- rapids-cmake/cpm/thrust.cmake | 10 +++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/rapids-cmake/cpm/libcudacxx.cmake b/rapids-cmake/cpm/libcudacxx.cmake index 98745781..525693be 100644 --- a/rapids-cmake/cpm/libcudacxx.cmake +++ b/rapids-cmake/cpm/libcudacxx.cmake @@ -103,14 +103,18 @@ function(rapids_cpm_libcudacxx) # the headers to `include/rapids/libcudacxx` include(GNUInstallDirs) set(CMAKE_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/rapids/libcudacxx") + set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/rapids/") + + include("${rapids-cmake-dir}/export/find_package_root.cmake") + rapids_export_find_package_root(INSTALL libcudacxx + [=[${CMAKE_CURRENT_LIST_DIR}/../../rapids/cmake/libcudacxx]=] + ${_RAPIDS_INSTALL_EXPORT_SET}) # libcudacxx 1.8 has a bug where it doesn't generate proper exclude rules for the # `[cub|libcudacxx]-header-search` files, which causes the build tree version to be installed # instead of the install version if(NOT EXISTS "${libcudacxx_BINARY_DIR}/cmake/libcudacxxInstallRulesForRapids.cmake") file(READ "${libcudacxx_SOURCE_DIR}/cmake/libcudacxxInstallRules.cmake" contents) - string(REPLACE "PATTERN cub-header-search EXCLUDE" "REGEX cub-header-search.* EXCLUDE" - contents "${contents}") string(REPLACE "PATTERN libcudacxx-header-search EXCLUDE" "REGEX libcudacxx-header-search.* EXCLUDE" contents "${contents}") file(WRITE "${libcudacxx_BINARY_DIR}/cmake/libcudacxxInstallRulesForRapids.cmake" ${contents}) diff --git a/rapids-cmake/cpm/thrust.cmake b/rapids-cmake/cpm/thrust.cmake index 2abffed5..aa2ef1b0 100644 --- a/rapids-cmake/cpm/thrust.cmake +++ b/rapids-cmake/cpm/thrust.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-2023, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -62,6 +62,7 @@ function(rapids_cpm_thrust NAMESPACE namespaces_name) # Make sure we install thrust into the `include/rapids` subdirectory instead of the default include(GNUInstallDirs) set(CMAKE_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/rapids") + set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/rapids") endif() include("${rapids-cmake-dir}/cpm/detail/package_details.cmake") @@ -96,6 +97,13 @@ function(rapids_cpm_thrust NAMESPACE namespaces_name) ${_RAPIDS_BUILD_EXPORT_SET}) endif() + if(Thrust_SOURCE_DIR AND _RAPIDS_INSTALL_EXPORT_SET AND to_install) + include("${rapids-cmake-dir}/export/find_package_root.cmake") + rapids_export_find_package_root(INSTALL Thrust + [=[${CMAKE_CURRENT_LIST_DIR}/../../rapids/cmake/thrust]=] + ${_RAPIDS_INSTALL_EXPORT_SET}) + endif() + if(NOT TARGET ${namespaces_name}::Thrust) thrust_create_target(${namespaces_name}::Thrust FROM_OPTIONS) set_target_properties(${namespaces_name}::Thrust PROPERTIES IMPORTED_NO_SYSTEM ON) From 7455f36812bca2a9da38e15e7a961954e980fa51 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Mon, 10 Apr 2023 14:54:14 -0400 Subject: [PATCH 2/7] More updates needed when porting libcudf --- rapids-cmake/cpm/libcudacxx.cmake | 65 ++++++++---------- .../cpm/patches/libcudacxx/install_rules.diff | 66 +++++++++++++++++++ rapids-cmake/cpm/thrust.cmake | 6 +- rapids-cmake/cpm/versions.json | 9 ++- 4 files changed, 106 insertions(+), 40 deletions(-) create mode 100644 rapids-cmake/cpm/patches/libcudacxx/install_rules.diff diff --git a/rapids-cmake/cpm/libcudacxx.cmake b/rapids-cmake/cpm/libcudacxx.cmake index 525693be..64805f86 100644 --- a/rapids-cmake/cpm/libcudacxx.cmake +++ b/rapids-cmake/cpm/libcudacxx.cmake @@ -54,6 +54,32 @@ function(rapids_cpm_libcudacxx) include("${rapids-cmake-dir}/cpm/detail/package_details.cmake") rapids_cpm_package_details(libcudacxx version repository tag shallow exclude) + set(to_install OFF) + if(INSTALL_EXPORT_SET IN_LIST ARGN AND NOT exclude) + set(to_install ON) + # By default if we allow libcudacxx to install into `CMAKE_INSTALL_INCLUDEDIR` alongside rmm (or + # other packages) we will get a install tree that looks like this: + + # install/include/rmm install/include/cub install/include/libcudacxx + + # This is a problem for CMake+NVCC due to the rules around import targets, and user/system + # includes. In this case both rmm and libcudacxx will specify an include path of + # `install/include`, while libcudacxx tries to mark it as an user include, since rmm uses + # CMake's default of system include. Compilers when provided the same include as both user and + # system always goes with system. + + # Now while rmm could also mark `install/include` as system this just pushes the issue to + # another dependency which isn't built by RAPIDS and comes by and marks `install/include` as + # system. + + # Instead the more reliable option is to make sure that we get libcudacxx to be placed in an + # unique include path that the other project will use. In the case of rapids-cmake we install + # the headers to `include/rapids/libcudacxx` + include(GNUInstallDirs) + set(CMAKE_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/rapids/libcudacxx") + set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/rapids/") + endif() + include("${rapids-cmake-dir}/cpm/detail/generate_patch_command.cmake") rapids_cpm_generate_patch_command(libcudacxx ${version} patch_command) @@ -65,7 +91,8 @@ function(rapids_cpm_libcudacxx) GIT_TAG ${tag} GIT_SHALLOW ${shallow} PATCH_COMMAND ${patch_command} - EXCLUDE_FROM_ALL ${exclude}) + EXCLUDE_FROM_ALL ${exclude} + OPTIONS "libcudacxx_ENABLE_INSTALL_RULES ${to_install}") include("${rapids-cmake-dir}/cpm/detail/display_patch_status.cmake") rapids_cpm_display_patch_status(libcudacxx) @@ -82,45 +109,11 @@ function(rapids_cpm_libcudacxx) ${_RAPIDS_BUILD_EXPORT_SET}) endif() - if(libcudacxx_SOURCE_DIR AND _RAPIDS_INSTALL_EXPORT_SET AND NOT exclude) - # By default if we allow libcudacxx to install into `CMAKE_INSTALL_INCLUDEDIR` alongside rmm (or - # other packages) we will get a install tree that looks like this: - - # install/include/rmm install/include/cub install/include/libcudacxx - - # This is a problem for CMake+NVCC due to the rules around import targets, and user/system - # includes. In this case both rmm and libcudacxx will specify an include path of - # `install/include`, while libcudacxx tries to mark it as an user include, since rmm uses - # CMake's default of system include. Compilers when provided the same include as both user and - # system always goes with system. - - # Now while rmm could also mark `install/include` as system this just pushes the issue to - # another dependency which isn't built by RAPIDS and comes by and marks `install/include` as - # system. - - # Instead the more reliable option is to make sure that we get libcudacxx to be placed in an - # unique include path that the other project will use. In the case of rapids-cmake we install - # the headers to `include/rapids/libcudacxx` - include(GNUInstallDirs) - set(CMAKE_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/rapids/libcudacxx") - set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/rapids/") - + if(to_install) include("${rapids-cmake-dir}/export/find_package_root.cmake") rapids_export_find_package_root(INSTALL libcudacxx [=[${CMAKE_CURRENT_LIST_DIR}/../../rapids/cmake/libcudacxx]=] ${_RAPIDS_INSTALL_EXPORT_SET}) - - # libcudacxx 1.8 has a bug where it doesn't generate proper exclude rules for the - # `[cub|libcudacxx]-header-search` files, which causes the build tree version to be installed - # instead of the install version - if(NOT EXISTS "${libcudacxx_BINARY_DIR}/cmake/libcudacxxInstallRulesForRapids.cmake") - file(READ "${libcudacxx_SOURCE_DIR}/cmake/libcudacxxInstallRules.cmake" contents) - string(REPLACE "PATTERN libcudacxx-header-search EXCLUDE" - "REGEX libcudacxx-header-search.* EXCLUDE" contents "${contents}") - file(WRITE "${libcudacxx_BINARY_DIR}/cmake/libcudacxxInstallRulesForRapids.cmake" ${contents}) - endif() - set(libcudacxx_ENABLE_INSTALL_RULES ON) - include("${libcudacxx_BINARY_DIR}/cmake/libcudacxxInstallRulesForRapids.cmake") endif() # Propagate up variables that CPMFindPackage provide diff --git a/rapids-cmake/cpm/patches/libcudacxx/install_rules.diff b/rapids-cmake/cpm/patches/libcudacxx/install_rules.diff new file mode 100644 index 00000000..b2c7f2a3 --- /dev/null +++ b/rapids-cmake/cpm/patches/libcudacxx/install_rules.diff @@ -0,0 +1,66 @@ +diff --git a/cmake/libcudacxxInstallRules.cmake b/cmake/libcudacxxInstallRules.cmake +index 446ccb50..ff622bb7 100644 +--- a/cmake/libcudacxxInstallRules.cmake ++++ b/cmake/libcudacxxInstallRules.cmake +@@ -1,5 +1,5 @@ + option(libcudacxx_ENABLE_INSTALL_RULES +- "Enable installation of libcudacxx" ${libcudacxx_TOPLEVEL_PROJECT} ++ "Enable installation of libcudacxx" ${LIBCUDACXX_TOPLEVEL_PROJECT} + ) + + if (NOT libcudacxx_ENABLE_INSTALL_RULES) +@@ -12,24 +12,27 @@ include(GNUInstallDirs) + # Libcudacxx headers + install(DIRECTORY "${libcudacxx_SOURCE_DIR}/include/cuda" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ PATTERN CMakeLists.txt EXCLUDE + ) + install(DIRECTORY "${libcudacxx_SOURCE_DIR}/include/nv" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ PATTERN CMakeLists.txt EXCLUDE + ) + + # Libcudacxx cmake package + install(DIRECTORY "${libcudacxx_SOURCE_DIR}/lib/cmake/libcudacxx" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake" +- PATTERN libcudacxx-header-search EXCLUDE ++ PATTERN *.cmake.in EXCLUDE + ) + + # Need to configure a file to store CMAKE_INSTALL_INCLUDEDIR + # since it can be defined by the user. This is common to work around collisions + # with the CTK installed headers. ++set(install_location "${CMAKE_INSTALL_LIBDIR}/cmake/libcudacxx") + configure_file("${libcudacxx_SOURCE_DIR}/lib/cmake/libcudacxx/libcudacxx-header-search.cmake.in" + "${libcudacxx_BINARY_DIR}/lib/cmake/libcudacxx/libcudacxx-header-search.cmake" + @ONLY + ) + install(FILES "${libcudacxx_BINARY_DIR}/lib/cmake/libcudacxx/libcudacxx-header-search.cmake" +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libcudacxx" ++ DESTINATION "${install_location}" + ) + +diff --git a/lib/cmake/libcudacxx/libcudacxx-header-search.cmake.in b/lib/cmake/libcudacxx/libcudacxx-header-search.cmake.in +index 9e7e187c..cb3b946f 100644 +--- a/lib/cmake/libcudacxx/libcudacxx-header-search.cmake.in ++++ b/lib/cmake/libcudacxx/libcudacxx-header-search.cmake.in +@@ -1,8 +1,18 @@ + # Parse version information from version header: + unset(_libcudacxx_VERSION_INCLUDE_DIR CACHE) # Clear old result to force search ++ ++# Find CMAKE_INSTALL_INCLUDEDIR=@CMAKE_INSTALL_INCLUDEDIR@ directory" ++set(from_install_prefix "@install_location@") ++ ++# Transform to a list of directories, replace each directory with "../" ++# and convert back to a string ++string(REGEX REPLACE "/" ";" from_install_prefix "${from_install_prefix}") ++list(TRANSFORM from_install_prefix REPLACE ".+" "../") ++list(JOIN from_install_prefix "" from_install_prefix) ++ + find_path(_libcudacxx_VERSION_INCLUDE_DIR cuda/std/detail/__config + NO_DEFAULT_PATH # Only search explicit paths below: + PATHS +- "${CMAKE_CURRENT_LIST_DIR}/../../../@CMAKE_INSTALL_INCLUDEDIR@" # Install tree ++ "${CMAKE_CURRENT_LIST_DIR}/${from_install_prefix}/@CMAKE_INSTALL_INCLUDEDIR@" # Install tree + ) + set_property(CACHE _libcudacxx_VERSION_INCLUDE_DIR PROPERTY TYPE INTERNAL) diff --git a/rapids-cmake/cpm/thrust.cmake b/rapids-cmake/cpm/thrust.cmake index aa2ef1b0..0743b00e 100644 --- a/rapids-cmake/cpm/thrust.cmake +++ b/rapids-cmake/cpm/thrust.cmake @@ -56,6 +56,9 @@ Result Variables function(rapids_cpm_thrust NAMESPACE namespaces_name) list(APPEND CMAKE_MESSAGE_CONTEXT "rapids.cpm.thrust") + include("${rapids-cmake-dir}/cpm/detail/package_details.cmake") + rapids_cpm_package_details(Thrust version repository tag shallow exclude) + set(to_install OFF) if(INSTALL_EXPORT_SET IN_LIST ARGN) set(to_install ON) @@ -65,9 +68,6 @@ function(rapids_cpm_thrust NAMESPACE namespaces_name) set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/rapids") endif() - include("${rapids-cmake-dir}/cpm/detail/package_details.cmake") - rapids_cpm_package_details(Thrust version repository tag shallow exclude) - include("${rapids-cmake-dir}/cpm/detail/generate_patch_command.cmake") rapids_cpm_generate_patch_command(Thrust ${version} patch_command) diff --git a/rapids-cmake/cpm/versions.json b/rapids-cmake/cpm/versions.json index 15fbcc36..8ffbdd7d 100644 --- a/rapids-cmake/cpm/versions.json +++ b/rapids-cmake/cpm/versions.json @@ -25,7 +25,14 @@ "libcudacxx" : { "version" : "1.9.1", "git_url" : "https://github.com/NVIDIA/libcudacxx.git", - "git_tag" : "branch/${version}" + "git_tag" : "branch/${version}", + "patches" : [ + { + "file" : "libcudacxx/install_rules.diff", + "issue" : "libcudacxx 1.X installs incorrect files [https://github.com/NVIDIA/libcudacxx/pull/428]", + "fixed_in" : "2.2" + } + ] }, "nvbench" : { "version" : "0.0", From 4a70934ad18580613e3f63b9fdf730e8a27d5c5b Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Tue, 11 Apr 2023 10:29:13 -0400 Subject: [PATCH 3/7] Add test to verify libcudacxx patches work --- testing/cpm/CMakeLists.txt | 1 + .../CMakeLists.txt | 62 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 testing/cpm/cpm_libcudacxx-verify-install-custom-libdir/CMakeLists.txt diff --git a/testing/cpm/CMakeLists.txt b/testing/cpm/CMakeLists.txt index 4671ddf2..bbc6f192 100644 --- a/testing/cpm/CMakeLists.txt +++ b/testing/cpm/CMakeLists.txt @@ -59,6 +59,7 @@ add_cmake_config_test( cpm_gtest-simple.cmake ) add_cmake_config_test( cpm_libcudacxx-after_cpmfind.cmake ) add_cmake_config_test( cpm_libcudacxx-export.cmake ) add_cmake_config_test( cpm_libcudacxx-simple.cmake ) +add_cmake_build_test( cpm_libcudacxx-verify-install-custom-libdir ) add_cmake_config_test( cpm_nvbench-export.cmake ) add_cmake_config_test( cpm_nvbench-simple.cmake ) diff --git a/testing/cpm/cpm_libcudacxx-verify-install-custom-libdir/CMakeLists.txt b/testing/cpm/cpm_libcudacxx-verify-install-custom-libdir/CMakeLists.txt new file mode 100644 index 00000000..491bb968 --- /dev/null +++ b/testing/cpm/cpm_libcudacxx-verify-install-custom-libdir/CMakeLists.txt @@ -0,0 +1,62 @@ +#============================================================================= +# Copyright (c) 2023, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#============================================================================= +cmake_minimum_required(VERSION 3.20) + +include(${rapids-cmake-dir}/cpm/libcudacxx.cmake) + +include(${rapids-cmake-dir}/cpm/init.cmake) +include(${rapids-cmake-dir}/export/export.cmake) + +project(fake LANGUAGES CXX VERSION 3.1.4) + +rapids_cpm_init() + +set(CMAKE_INSTALL_LIBDIR "lib/aarch64") +rapids_cpm_libcudacxx(INSTALL_EXPORT_SET fake_set) + +add_library(fakeLib INTERFACE) +install(TARGETS fakeLib EXPORT fake_set) +target_link_libraries(fakeLib INTERFACE libcudacxx::libcudacxx) + +rapids_export(INSTALL fake + EXPORT_SET fake_set + NAMESPACE test:: + ) + +# Install our project so we can verify `libcudacxx` can be found +# from a custom install location +add_custom_target(install_project ALL + COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --prefix install/fake/ + ) + +# Add a custom command that verifies that the expect files have +# been installed for each component +file(WRITE "${CMAKE_BINARY_DIR}/install/CMakeLists.txt" [=[ +cmake_minimum_required(VERSION 3.20) +project(verify_install_targets LANGUAGES CXX) + +set(computed_path "${CMAKE_CURRENT_SOURCE_DIR}/fake/lib/aarch64/cmake/fake/") +find_package(fake REQUIRED NO_DEFAULT_PATH HINTS ${computed_path}) +if(NOT TARGET libcudacxx::libcudacxx) + message(FATAL_ERROR "Failed to import libcudacxx dependency") +endif() +]=]) + +add_custom_target(verify_install_libcudacxx_works ALL + COMMAND ${CMAKE_COMMAND} -E rm -rf "${CMAKE_BINARY_DIR}/install/build" + COMMAND ${CMAKE_COMMAND} -S="${CMAKE_BINARY_DIR}/install" -B="${CMAKE_BINARY_DIR}/install/build" +) +add_dependencies(verify_install_libcudacxx_works install_project) From 102fa076d38f9fb212d1a4f4277558672a0367c6 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Thu, 20 Apr 2023 13:45:18 -0400 Subject: [PATCH 4/7] Thrust properly checks the exclude flag to determine if it should be installed --- rapids-cmake/cpm/thrust.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rapids-cmake/cpm/thrust.cmake b/rapids-cmake/cpm/thrust.cmake index 0743b00e..ebd0f46e 100644 --- a/rapids-cmake/cpm/thrust.cmake +++ b/rapids-cmake/cpm/thrust.cmake @@ -60,7 +60,7 @@ function(rapids_cpm_thrust NAMESPACE namespaces_name) rapids_cpm_package_details(Thrust version repository tag shallow exclude) set(to_install OFF) - if(INSTALL_EXPORT_SET IN_LIST ARGN) + if(INSTALL_EXPORT_SET IN_LIST ARGN AND NOT exclude) set(to_install ON) # Make sure we install thrust into the `include/rapids` subdirectory instead of the default include(GNUInstallDirs) From be557281f2c285cee7167f0376e07fd351803426 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Thu, 20 Apr 2023 13:57:20 -0400 Subject: [PATCH 5/7] Only install libcudacxx location hint when building libcudacxx from source --- rapids-cmake/cpm/libcudacxx.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rapids-cmake/cpm/libcudacxx.cmake b/rapids-cmake/cpm/libcudacxx.cmake index 64805f86..2041e855 100644 --- a/rapids-cmake/cpm/libcudacxx.cmake +++ b/rapids-cmake/cpm/libcudacxx.cmake @@ -109,7 +109,7 @@ function(rapids_cpm_libcudacxx) ${_RAPIDS_BUILD_EXPORT_SET}) endif() - if(to_install) + if(libcudacxx_SOURCE_DIR AND to_install) include("${rapids-cmake-dir}/export/find_package_root.cmake") rapids_export_find_package_root(INSTALL libcudacxx [=[${CMAKE_CURRENT_LIST_DIR}/../../rapids/cmake/libcudacxx]=] From dad6a6cfe58234ec767f9256275b9f1d53b2abb2 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Thu, 20 Apr 2023 15:10:35 -0400 Subject: [PATCH 6/7] cleanup comment in libcudacxx --- rapids-cmake/cpm/libcudacxx.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rapids-cmake/cpm/libcudacxx.cmake b/rapids-cmake/cpm/libcudacxx.cmake index 2041e855..75ef404e 100644 --- a/rapids-cmake/cpm/libcudacxx.cmake +++ b/rapids-cmake/cpm/libcudacxx.cmake @@ -60,16 +60,16 @@ function(rapids_cpm_libcudacxx) # By default if we allow libcudacxx to install into `CMAKE_INSTALL_INCLUDEDIR` alongside rmm (or # other packages) we will get a install tree that looks like this: - # install/include/rmm install/include/cub install/include/libcudacxx + # include/rmm include/cub include/libcudacxx # This is a problem for CMake+NVCC due to the rules around import targets, and user/system # includes. In this case both rmm and libcudacxx will specify an include path of - # `install/include`, while libcudacxx tries to mark it as an user include, since rmm uses + # `include`, while libcudacxx tries to mark it as an user include, since rmm uses # CMake's default of system include. Compilers when provided the same include as both user and # system always goes with system. - # Now while rmm could also mark `install/include` as system this just pushes the issue to - # another dependency which isn't built by RAPIDS and comes by and marks `install/include` as + # Now while rmm could also mark `include` as system this just pushes the issue to + # another dependency which isn't built by RAPIDS and comes by and marks `include` as # system. # Instead the more reliable option is to make sure that we get libcudacxx to be placed in an From 75e5f6cc83b4505fa4ee3081f151af62a42cc724 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Sun, 23 Apr 2023 15:22:07 -0500 Subject: [PATCH 7/7] Fix style. --- rapids-cmake/cpm/libcudacxx.cmake | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/rapids-cmake/cpm/libcudacxx.cmake b/rapids-cmake/cpm/libcudacxx.cmake index 75ef404e..6279adf8 100644 --- a/rapids-cmake/cpm/libcudacxx.cmake +++ b/rapids-cmake/cpm/libcudacxx.cmake @@ -63,15 +63,14 @@ function(rapids_cpm_libcudacxx) # include/rmm include/cub include/libcudacxx # This is a problem for CMake+NVCC due to the rules around import targets, and user/system - # includes. In this case both rmm and libcudacxx will specify an include path of - # `include`, while libcudacxx tries to mark it as an user include, since rmm uses - # CMake's default of system include. Compilers when provided the same include as both user and - # system always goes with system. - - # Now while rmm could also mark `include` as system this just pushes the issue to - # another dependency which isn't built by RAPIDS and comes by and marks `include` as + # includes. In this case both rmm and libcudacxx will specify an include path of `include`, + # while libcudacxx tries to mark it as an user include, since rmm uses CMake's default of system + # include. Compilers when provided the same include as both user and system always goes with # system. + # Now while rmm could also mark `include` as system this just pushes the issue to another + # dependency which isn't built by RAPIDS and comes by and marks `include` as system. + # Instead the more reliable option is to make sure that we get libcudacxx to be placed in an # unique include path that the other project will use. In the case of rapids-cmake we install # the headers to `include/rapids/libcudacxx`