From 56c6d8b41d139134db69ea8e94ef7628151d6120 Mon Sep 17 00:00:00 2001 From: Mike Wilson Date: Thu, 14 Nov 2024 05:34:40 +0000 Subject: [PATCH 1/7] turn exclude_from_all off if statically linked Signed-off-by: Mike Wilson --- cpp/cmake/thirdparty/get_flatbuffers.cmake | 8 +++++++- cpp/cmake/thirdparty/get_nanoarrow.cmake | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cpp/cmake/thirdparty/get_flatbuffers.cmake b/cpp/cmake/thirdparty/get_flatbuffers.cmake index 6a889566300..bddfca0f43d 100644 --- a/cpp/cmake/thirdparty/get_flatbuffers.cmake +++ b/cpp/cmake/thirdparty/get_flatbuffers.cmake @@ -15,6 +15,12 @@ # Use CPM to find or clone flatbuffers function(find_and_configure_flatbuffers VERSION) + if (NOT BUILD_SHARED_LIBS) + set(_exclude_from_all "EXCLUDE_FROM_ALL OFF") + else() + set(_exclude_from_all "EXCLUDE_FROM_ALL ON") + endif() + rapids_cpm_find( flatbuffers ${VERSION} GLOBAL_TARGETS flatbuffers @@ -22,7 +28,7 @@ function(find_and_configure_flatbuffers VERSION) GIT_REPOSITORY https://github.com/google/flatbuffers.git GIT_TAG v${VERSION} GIT_SHALLOW TRUE - EXCLUDE_FROM_ALL TRUE + ${_exclude_from_all} ) rapids_export_find_package_root( diff --git a/cpp/cmake/thirdparty/get_nanoarrow.cmake b/cpp/cmake/thirdparty/get_nanoarrow.cmake index 4fc742dea2e..1734617f5ae 100644 --- a/cpp/cmake/thirdparty/get_nanoarrow.cmake +++ b/cpp/cmake/thirdparty/get_nanoarrow.cmake @@ -19,6 +19,12 @@ function(find_and_configure_nanoarrow) set(cudf_patch_dir "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/patches") rapids_cpm_package_override("${cudf_patch_dir}/nanoarrow_override.json") + if (NOT BUILD_SHARED_LIBS) + set(_exclude_from_all "EXCLUDE_FROM_ALL OFF") + else() + set(_exclude_from_all "EXCLUDE_FROM_ALL ON") + endif() + # Currently we need to always build nanoarrow so we don't pickup a previous installed version set(CPM_DOWNLOAD_nanoarrow ON) rapids_cpm_find( @@ -26,7 +32,7 @@ function(find_and_configure_nanoarrow) GLOBAL_TARGETS nanoarrow CPM_ARGS OPTIONS "BUILD_SHARED_LIBS OFF" "NANOARROW_NAMESPACE cudf" - EXCLUDE_FROM_ALL TRUE + ${_exclude_from_all} ) set_target_properties(nanoarrow PROPERTIES POSITION_INDEPENDENT_CODE ON) rapids_export_find_package_root(BUILD nanoarrow "${nanoarrow_BINARY_DIR}" EXPORT_SET cudf-exports) From 8ea2f24b3e07ada623c411d3a583b46919ccc500 Mon Sep 17 00:00:00 2001 From: Mike Wilson Date: Thu, 14 Nov 2024 17:13:49 +0000 Subject: [PATCH 2/7] Fixing whitespace Signed-off-by: Mike Wilson --- cpp/cmake/thirdparty/get_flatbuffers.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/cmake/thirdparty/get_flatbuffers.cmake b/cpp/cmake/thirdparty/get_flatbuffers.cmake index bddfca0f43d..07f0939b964 100644 --- a/cpp/cmake/thirdparty/get_flatbuffers.cmake +++ b/cpp/cmake/thirdparty/get_flatbuffers.cmake @@ -16,9 +16,9 @@ function(find_and_configure_flatbuffers VERSION) if (NOT BUILD_SHARED_LIBS) - set(_exclude_from_all "EXCLUDE_FROM_ALL OFF") + set(_exclude_from_all "EXCLUDE_FROM_ALL OFF") else() - set(_exclude_from_all "EXCLUDE_FROM_ALL ON") + set(_exclude_from_all "EXCLUDE_FROM_ALL ON") endif() rapids_cpm_find( From f14936bd91d8d42b3814946290c96b44039b8e39 Mon Sep 17 00:00:00 2001 From: Mike Wilson Date: Thu, 14 Nov 2024 12:51:18 -0500 Subject: [PATCH 3/7] Update cpp/cmake/thirdparty/get_flatbuffers.cmake Co-authored-by: Bradley Dice --- cpp/cmake/thirdparty/get_flatbuffers.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/cmake/thirdparty/get_flatbuffers.cmake b/cpp/cmake/thirdparty/get_flatbuffers.cmake index 07f0939b964..184309e2f65 100644 --- a/cpp/cmake/thirdparty/get_flatbuffers.cmake +++ b/cpp/cmake/thirdparty/get_flatbuffers.cmake @@ -16,9 +16,9 @@ function(find_and_configure_flatbuffers VERSION) if (NOT BUILD_SHARED_LIBS) - set(_exclude_from_all "EXCLUDE_FROM_ALL OFF") + set(_exclude_from_all "EXCLUDE_FROM_ALL FALSE") else() - set(_exclude_from_all "EXCLUDE_FROM_ALL ON") + set(_exclude_from_all "EXCLUDE_FROM_ALL TRUE") endif() rapids_cpm_find( From 933110a69e4cba1d9d36ec4aac2c18be043c4d16 Mon Sep 17 00:00:00 2001 From: Mike Wilson Date: Thu, 14 Nov 2024 12:51:24 -0500 Subject: [PATCH 4/7] Update cpp/cmake/thirdparty/get_nanoarrow.cmake Co-authored-by: Bradley Dice --- cpp/cmake/thirdparty/get_nanoarrow.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/cmake/thirdparty/get_nanoarrow.cmake b/cpp/cmake/thirdparty/get_nanoarrow.cmake index 1734617f5ae..5202de10f75 100644 --- a/cpp/cmake/thirdparty/get_nanoarrow.cmake +++ b/cpp/cmake/thirdparty/get_nanoarrow.cmake @@ -20,9 +20,9 @@ function(find_and_configure_nanoarrow) rapids_cpm_package_override("${cudf_patch_dir}/nanoarrow_override.json") if (NOT BUILD_SHARED_LIBS) - set(_exclude_from_all "EXCLUDE_FROM_ALL OFF") + set(_exclude_from_all "EXCLUDE_FROM_ALL FALSE") else() - set(_exclude_from_all "EXCLUDE_FROM_ALL ON") + set(_exclude_from_all "EXCLUDE_FROM_ALL TRUE") endif() # Currently we need to always build nanoarrow so we don't pickup a previous installed version From e3f7fc1f2601d267b69a0909e29db24d7e8f1f22 Mon Sep 17 00:00:00 2001 From: Mike Wilson Date: Thu, 14 Nov 2024 20:28:16 +0000 Subject: [PATCH 5/7] pre-commit format --- cpp/cmake/thirdparty/get_flatbuffers.cmake | 5 ++--- cpp/cmake/thirdparty/get_nanoarrow.cmake | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cpp/cmake/thirdparty/get_flatbuffers.cmake b/cpp/cmake/thirdparty/get_flatbuffers.cmake index 184309e2f65..4173ebcfcf3 100644 --- a/cpp/cmake/thirdparty/get_flatbuffers.cmake +++ b/cpp/cmake/thirdparty/get_flatbuffers.cmake @@ -15,7 +15,7 @@ # Use CPM to find or clone flatbuffers function(find_and_configure_flatbuffers VERSION) - if (NOT BUILD_SHARED_LIBS) + if(NOT BUILD_SHARED_LIBS) set(_exclude_from_all "EXCLUDE_FROM_ALL FALSE") else() set(_exclude_from_all "EXCLUDE_FROM_ALL TRUE") @@ -27,8 +27,7 @@ function(find_and_configure_flatbuffers VERSION) CPM_ARGS GIT_REPOSITORY https://github.com/google/flatbuffers.git GIT_TAG v${VERSION} - GIT_SHALLOW TRUE - ${_exclude_from_all} + GIT_SHALLOW TRUE ${_exclude_from_all} ) rapids_export_find_package_root( diff --git a/cpp/cmake/thirdparty/get_nanoarrow.cmake b/cpp/cmake/thirdparty/get_nanoarrow.cmake index 5202de10f75..12bf87dbfe0 100644 --- a/cpp/cmake/thirdparty/get_nanoarrow.cmake +++ b/cpp/cmake/thirdparty/get_nanoarrow.cmake @@ -19,7 +19,7 @@ function(find_and_configure_nanoarrow) set(cudf_patch_dir "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/patches") rapids_cpm_package_override("${cudf_patch_dir}/nanoarrow_override.json") - if (NOT BUILD_SHARED_LIBS) + if(NOT BUILD_SHARED_LIBS) set(_exclude_from_all "EXCLUDE_FROM_ALL FALSE") else() set(_exclude_from_all "EXCLUDE_FROM_ALL TRUE") @@ -31,8 +31,7 @@ function(find_and_configure_nanoarrow) nanoarrow 0.6.0.dev GLOBAL_TARGETS nanoarrow CPM_ARGS - OPTIONS "BUILD_SHARED_LIBS OFF" "NANOARROW_NAMESPACE cudf" - ${_exclude_from_all} + OPTIONS "BUILD_SHARED_LIBS OFF" "NANOARROW_NAMESPACE cudf" ${_exclude_from_all} ) set_target_properties(nanoarrow PROPERTIES POSITION_INDEPENDENT_CODE ON) rapids_export_find_package_root(BUILD nanoarrow "${nanoarrow_BINARY_DIR}" EXPORT_SET cudf-exports) From 4a37aa9b3568166d8ed70558714d4b23fbe618b1 Mon Sep 17 00:00:00 2001 From: Mike Wilson Date: Thu, 14 Nov 2024 16:34:02 -0500 Subject: [PATCH 6/7] Update cpp/cmake/thirdparty/get_flatbuffers.cmake Co-authored-by: Kyle Edwards --- cpp/cmake/thirdparty/get_flatbuffers.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/cmake/thirdparty/get_flatbuffers.cmake b/cpp/cmake/thirdparty/get_flatbuffers.cmake index 4173ebcfcf3..39521049c85 100644 --- a/cpp/cmake/thirdparty/get_flatbuffers.cmake +++ b/cpp/cmake/thirdparty/get_flatbuffers.cmake @@ -16,9 +16,9 @@ function(find_and_configure_flatbuffers VERSION) if(NOT BUILD_SHARED_LIBS) - set(_exclude_from_all "EXCLUDE_FROM_ALL FALSE") + set(_exclude_from_all EXCLUDE_FROM_ALL FALSE) else() - set(_exclude_from_all "EXCLUDE_FROM_ALL TRUE") + set(_exclude_from_all EXCLUDE_FROM_ALL TRUE) endif() rapids_cpm_find( From 3a1212c72440d5a3be1fcd668eed7a4dd07475c5 Mon Sep 17 00:00:00 2001 From: Mike Wilson Date: Thu, 14 Nov 2024 16:34:08 -0500 Subject: [PATCH 7/7] Update cpp/cmake/thirdparty/get_nanoarrow.cmake Co-authored-by: Kyle Edwards --- cpp/cmake/thirdparty/get_nanoarrow.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/cmake/thirdparty/get_nanoarrow.cmake b/cpp/cmake/thirdparty/get_nanoarrow.cmake index 12bf87dbfe0..c440643037b 100644 --- a/cpp/cmake/thirdparty/get_nanoarrow.cmake +++ b/cpp/cmake/thirdparty/get_nanoarrow.cmake @@ -20,9 +20,9 @@ function(find_and_configure_nanoarrow) rapids_cpm_package_override("${cudf_patch_dir}/nanoarrow_override.json") if(NOT BUILD_SHARED_LIBS) - set(_exclude_from_all "EXCLUDE_FROM_ALL FALSE") + set(_exclude_from_all EXCLUDE_FROM_ALL FALSE) else() - set(_exclude_from_all "EXCLUDE_FROM_ALL TRUE") + set(_exclude_from_all EXCLUDE_FROM_ALL TRUE) endif() # Currently we need to always build nanoarrow so we don't pickup a previous installed version