-
Notifications
You must be signed in to change notification settings - Fork 908
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework libcudf CMakeLists.txt to export targets for CPM (#7107)
These changes rework libcudf's CMakeLists.txt files to export targets for inclusion by other CMake projects. I took inspiration from [RMM's CMakeLists.txt](https://github.com/rapidsai/rmm/blob/branch-0.18/CMakeLists.txt). However I'm not a CMake expert, and likely missed/messed up a few things. I also [fixed](0a8e80d) those annoying `-Wstrict-prototypes` warnings we see compiling Cython files. These changes are adequate to build libcudf as a dependency in another CMake project with [CPM](https://github.com/TheLartians/CPM.cmake), for example: ```cmake function(find_and_configure_cudf VERSION) include(get_cpm) CPMAddPackage(NAME cudf VERSION ${VERSION} GIT_REPOSITORY https://github.com/trxcllnt/cudf.git # Can also use a local path to your repo clone for testing # GIT_REPOSITORY /home/ptaylor/dev/rapids/cudf GIT_TAG fix/cmake-exports GIT_SHALLOW TRUE SOURCE_SUBDIR cpp OPTIONS "BUILD_TESTS OFF" "BUILD_BENCHMARKS OFF" "ARROW_STATIC_LIB ON" "JITIFY_USE_CACHE ON" "CUDA_STATIC_RUNTIME ON" "DISABLE_DEPRECATION_WARNING ON" # control where generated JIT headers get placed # so we don't cache-bust ccache every clean build "CUDF_GENERATED_INCLUDE_DIR ${CPM_SOURCE_CACHE}/cudf-build" ) endfunction() find_and_configure_cudf(${CUDF_VERSION}) add_target(${PROJECT_NAME} SHARED "${src_files}") target_link_libraries(${PROJECT_NAME} rmm::rmm cudf::cudf) ``` Authors: - Paul Taylor (@trxcllnt) - Robert Maynard (@robertmaynard) Approvers: - Jake Hemstad (@jrhemstad) - Keith Kraus (@kkraus14) URL: #7107
- Loading branch information
Showing
31 changed files
with
1,589 additions
and
1,623 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.