From 679340e35d3dbc896895029126261f2cf4368aba Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 22 Apr 2024 17:19:55 -0500 Subject: [PATCH 01/14] test if fmt patch is causing cpm to download fmt during rmm builds --- .../cpm/patches/fmt/fix_10_1_1_version.diff | 13 ------------- rapids-cmake/cpm/versions.json | 9 +-------- 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 rapids-cmake/cpm/patches/fmt/fix_10_1_1_version.diff diff --git a/rapids-cmake/cpm/patches/fmt/fix_10_1_1_version.diff b/rapids-cmake/cpm/patches/fmt/fix_10_1_1_version.diff deleted file mode 100644 index 8a66afd4..00000000 --- a/rapids-cmake/cpm/patches/fmt/fix_10_1_1_version.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/fmt/core.h b/include/fmt/core.h -index 1fe13888..f9e3b7d6 100644 ---- a/include/fmt/core.h -+++ b/include/fmt/core.h -@@ -18,7 +18,7 @@ - #include - - // The fmt library version in the form major * 10000 + minor * 100 + patch. --#define FMT_VERSION 100100 -+#define FMT_VERSION 100101 - - #if defined(__clang__) && !defined(__ibmxl__) - # define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__) diff --git a/rapids-cmake/cpm/versions.json b/rapids-cmake/cpm/versions.json index 138b5ced..59ea5aa4 100644 --- a/rapids-cmake/cpm/versions.json +++ b/rapids-cmake/cpm/versions.json @@ -39,16 +39,9 @@ "git_tag": "56c53beb6fb0cafd265b7fcc3df78ae487811b22" }, "fmt": { - "version": "10.1.1", + "version": "10.2.1", "git_url": "https://github.com/fmtlib/fmt.git", "git_tag": "${version}", - "patches": [ - { - "file": "fmt/fix_10_1_1_version.diff", - "issue": "fmt 10.1.1 produces a CMake package with version 10.1.0", - "fixed_in": "10.2.0" - } - ] }, "GTest": { "version": "1.13.0", From 80b8e5778c5fa5e1cb5d139aa584f902667b1d41 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 22 Apr 2024 17:36:11 -0500 Subject: [PATCH 02/14] remove spdlog patches --- .../patches/spdlog/nvcc_constexpr_fix.diff | 41 ------------------- rapids-cmake/cpm/versions.json | 9 +--- 2 files changed, 1 insertion(+), 49 deletions(-) delete mode 100644 rapids-cmake/cpm/patches/spdlog/nvcc_constexpr_fix.diff diff --git a/rapids-cmake/cpm/patches/spdlog/nvcc_constexpr_fix.diff b/rapids-cmake/cpm/patches/spdlog/nvcc_constexpr_fix.diff deleted file mode 100644 index 5bc2915f..00000000 --- a/rapids-cmake/cpm/patches/spdlog/nvcc_constexpr_fix.diff +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/include/spdlog/common.h b/include/spdlog/common.h -index 0a262eb2..29ef2324 100644 ---- a/include/spdlog/common.h -+++ b/include/spdlog/common.h -@@ -62,17 +62,26 @@ - - // visual studio up to 2013 does not support noexcept nor constexpr - #if defined(_MSC_VER) && (_MSC_VER < 1900) --# define SPDLOG_NOEXCEPT _NOEXCEPT --# define SPDLOG_CONSTEXPR --# define SPDLOG_CONSTEXPR_FUNC inline -+ #define SPDLOG_NOEXCEPT _NOEXCEPT -+ #define SPDLOG_CONSTEXPR - #else --# define SPDLOG_NOEXCEPT noexcept --# define SPDLOG_CONSTEXPR constexpr --# if __cplusplus >= 201402L --# define SPDLOG_CONSTEXPR_FUNC constexpr --# else --# define SPDLOG_CONSTEXPR_FUNC inline --# endif -+ #define SPDLOG_NOEXCEPT noexcept -+ #define SPDLOG_CONSTEXPR constexpr -+#endif -+ -+// If building with std::format, can just use constexpr, otherwise if building with fmt -+// SPDLOG_CONSTEXPR_FUNC needs to be set the same as FMT_CONSTEXPR to avoid situations where -+// a constexpr function in spdlog could end up calling a non-constexpr function in fmt -+// depending on the compiler -+// If fmt determines it can't use constexpr, we should inline the function instead -+#ifdef SPDLOG_USE_STD_FORMAT -+ #define SPDLOG_CONSTEXPR_FUNC constexpr -+#else // Being built with fmt -+ #if FMT_USE_CONSTEXPR -+ #define SPDLOG_CONSTEXPR_FUNC FMT_CONSTEXPR -+ #else -+ #define SPDLOG_CONSTEXPR_FUNC inline -+ #endif - #endif - - #if defined(__GNUC__) || defined(__clang__) diff --git a/rapids-cmake/cpm/versions.json b/rapids-cmake/cpm/versions.json index 59ea5aa4..bd0b2196 100644 --- a/rapids-cmake/cpm/versions.json +++ b/rapids-cmake/cpm/versions.json @@ -98,14 +98,7 @@ "spdlog": { "version": "1.12.0", "git_url": "https://github.com/gabime/spdlog.git", - "git_tag": "v${version}", - "patches": [ - { - "file": "spdlog/nvcc_constexpr_fix.diff", - "issue": "Fix constexpr mismatch between spdlog and fmt [https://github.com/gabime/spdlog/issues/2856]", - "fixed_in": "1.13" - } - ] + "git_tag": "v${version}" }, "Thrust": { "version": "1.17.2", From a13d271ffeaabc2581823f8a598bf1ea7bf5f499 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 22 Apr 2024 17:59:23 -0500 Subject: [PATCH 03/14] try v10.2.0 --- rapids-cmake/cpm/versions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rapids-cmake/cpm/versions.json b/rapids-cmake/cpm/versions.json index bd0b2196..a6b3790d 100644 --- a/rapids-cmake/cpm/versions.json +++ b/rapids-cmake/cpm/versions.json @@ -39,7 +39,7 @@ "git_tag": "56c53beb6fb0cafd265b7fcc3df78ae487811b22" }, "fmt": { - "version": "10.2.1", + "version": "10.2.0", "git_url": "https://github.com/fmtlib/fmt.git", "git_tag": "${version}", }, @@ -98,7 +98,7 @@ "spdlog": { "version": "1.12.0", "git_url": "https://github.com/gabime/spdlog.git", - "git_tag": "v${version}" + "git_tag": "v${version}", }, "Thrust": { "version": "1.17.2", From 8d8272c736c9d89e18e8013dbaa55900e936a640 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 24 Apr 2024 12:08:58 -0500 Subject: [PATCH 04/14] use v10.2.1 --- rapids-cmake/cpm/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rapids-cmake/cpm/versions.json b/rapids-cmake/cpm/versions.json index a6b3790d..11c3ab89 100644 --- a/rapids-cmake/cpm/versions.json +++ b/rapids-cmake/cpm/versions.json @@ -39,7 +39,7 @@ "git_tag": "56c53beb6fb0cafd265b7fcc3df78ae487811b22" }, "fmt": { - "version": "10.2.0", + "version": "10.2.1", "git_url": "https://github.com/fmtlib/fmt.git", "git_tag": "${version}", }, From 890947e6bd502fdfe1e2aaf192a65ac10c8e9291 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 24 Apr 2024 12:34:34 -0500 Subject: [PATCH 05/14] formatting --- rapids-cmake/cpm/versions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rapids-cmake/cpm/versions.json b/rapids-cmake/cpm/versions.json index 11c3ab89..d98cc4b7 100644 --- a/rapids-cmake/cpm/versions.json +++ b/rapids-cmake/cpm/versions.json @@ -41,7 +41,7 @@ "fmt": { "version": "10.2.1", "git_url": "https://github.com/fmtlib/fmt.git", - "git_tag": "${version}", + "git_tag": "${version}" }, "GTest": { "version": "1.13.0", @@ -98,7 +98,7 @@ "spdlog": { "version": "1.12.0", "git_url": "https://github.com/gabime/spdlog.git", - "git_tag": "v${version}", + "git_tag": "v${version}" }, "Thrust": { "version": "1.17.2", From dbbb2582dd8cd4fdf11c63875b012c8fd9cb0fc8 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 24 Apr 2024 13:20:26 -0500 Subject: [PATCH 06/14] spdlog 1.13.0 --- rapids-cmake/cpm/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rapids-cmake/cpm/versions.json b/rapids-cmake/cpm/versions.json index ff6e8a23..2aedfae8 100644 --- a/rapids-cmake/cpm/versions.json +++ b/rapids-cmake/cpm/versions.json @@ -96,7 +96,7 @@ "git_tag": "branch-${version}" }, "spdlog": { - "version": "1.12.0", + "version": "1.13.0", "git_url": "https://github.com/gabime/spdlog.git", "git_tag": "v${version}" }, From cdab67dbf59e6bdb3eb764504fb8ccd13e84d8a4 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 24 Apr 2024 15:32:46 -0500 Subject: [PATCH 07/14] try rmm spdlog export fixes --- rapids-cmake/cpm/versions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rapids-cmake/cpm/versions.json b/rapids-cmake/cpm/versions.json index 2aedfae8..fa4c372f 100644 --- a/rapids-cmake/cpm/versions.json +++ b/rapids-cmake/cpm/versions.json @@ -92,8 +92,8 @@ }, "rmm": { "version": "${rapids-cmake-version}", - "git_url": "https://github.com/rapidsai/rmm.git", - "git_tag": "branch-${version}" + "git_url": "https://github.com/AyodeAwe/rmm.git", + "git_tag": "jawe/ops-2621" }, "spdlog": { "version": "1.13.0", From df694631097e6a120d6ae960c8ee580bf2b185b3 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 25 Apr 2024 07:21:55 -0700 Subject: [PATCH 08/14] reorder init cache --- rapids-cmake/cpm/versions.json | 4 ++-- testing/utils/fill_cache/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rapids-cmake/cpm/versions.json b/rapids-cmake/cpm/versions.json index fa4c372f..2aedfae8 100644 --- a/rapids-cmake/cpm/versions.json +++ b/rapids-cmake/cpm/versions.json @@ -92,8 +92,8 @@ }, "rmm": { "version": "${rapids-cmake-version}", - "git_url": "https://github.com/AyodeAwe/rmm.git", - "git_tag": "jawe/ops-2621" + "git_url": "https://github.com/rapidsai/rmm.git", + "git_tag": "branch-${version}" }, "spdlog": { "version": "1.13.0", diff --git a/testing/utils/fill_cache/CMakeLists.txt b/testing/utils/fill_cache/CMakeLists.txt index a0dcb751..07a79627 100644 --- a/testing/utils/fill_cache/CMakeLists.txt +++ b/testing/utils/fill_cache/CMakeLists.txt @@ -43,9 +43,9 @@ rapids_cpm_gbench(DOWNLOAD_ONLY ON) rapids_cpm_gtest(DOWNLOAD_ONLY ON) rapids_cpm_libcudacxx(DOWNLOAD_ONLY ON) rapids_cpm_nvbench(DOWNLOAD_ONLY ON) -rapids_cpm_rmm(DOWNLOAD_ONLY ON) rapids_cpm_spdlog(DOWNLOAD_ONLY ON) rapids_cpm_fmt(DOWNLOAD_ONLY ON) +rapids_cpm_rmm(DOWNLOAD_ONLY ON) rapids_cpm_thrust(NAMESPACE temp DOWNLOAD_ONLY ON) rapids_cpm_find(skbuild 0.14.1 GIT_REPOSITORY https://github.com/scikit-build/scikit-build.git From f573c8d84f792acf3ed735bf2b2567f296d4be2f Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 25 Apr 2024 07:23:54 -0700 Subject: [PATCH 09/14] update fmt in conda env --- dependencies.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.yaml b/dependencies.yaml index 730bed3e..4e4ea714 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -169,7 +169,7 @@ dependencies: - zlib - output_types: [conda] packages: - - fmt==9.1.0 + - fmt==10.2.1 py_version: specific: - output_types: conda From 737e0cab06a13c8834fadf4e32f48600b93d36a7 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 25 Apr 2024 07:37:38 -0700 Subject: [PATCH 10/14] testing --- testing/cpm/cpm_generate_pins-simple/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt b/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt index 6be74385..05631b48 100644 --- a/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt +++ b/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt @@ -19,7 +19,7 @@ project(rapids-test-project LANGUAGES CXX) include(${rapids-cmake-dir}/cpm/init.cmake) include(${rapids-cmake-dir}/cpm/rmm.cmake) - +set(CPM_DOWNLOAD_ALL ON) rapids_cpm_init(GENERATE_PINNED_VERSIONS) rapids_cpm_rmm() set(projects-to-verify rmm fmt spdlog CCCL) From ea327d9ae4a1c80320f12ba22d36693b00e2ea8b Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 25 Apr 2024 08:01:04 -0700 Subject: [PATCH 11/14] use a fork of rmm with all the tags --- rapids-cmake/cpm/versions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rapids-cmake/cpm/versions.json b/rapids-cmake/cpm/versions.json index 2aedfae8..ebeb51e1 100644 --- a/rapids-cmake/cpm/versions.json +++ b/rapids-cmake/cpm/versions.json @@ -92,8 +92,8 @@ }, "rmm": { "version": "${rapids-cmake-version}", - "git_url": "https://github.com/rapidsai/rmm.git", - "git_tag": "branch-${version}" + "git_url": "https://github.com/jameslamb/rmm.git", + "git_tag": "update-fmt-and-spdlog" }, "spdlog": { "version": "1.13.0", From 6b965ea70202d28818f848f625c4f732c7b4114b Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 25 Apr 2024 09:51:38 -0700 Subject: [PATCH 12/14] testing changes --- testing/cpm/cpm_generate_pins-nested/CMakeLists.txt | 9 ++++++++- .../cpm_generate_pins-nested/verify/CMakeLists.txt | 11 +++++++---- testing/cpm/cpm_generate_pins-simple/CMakeLists.txt | 11 +++++++++-- .../cpm_generate_pins-simple/verify/CMakeLists.txt | 1 + 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/testing/cpm/cpm_generate_pins-nested/CMakeLists.txt b/testing/cpm/cpm_generate_pins-nested/CMakeLists.txt index 5151d285..6320281e 100644 --- a/testing/cpm/cpm_generate_pins-nested/CMakeLists.txt +++ b/testing/cpm/cpm_generate_pins-nested/CMakeLists.txt @@ -24,8 +24,15 @@ add_subdirectory(b) include(${rapids-cmake-dir}/cpm/init.cmake) rapids_cpm_init(GENERATE_PINNED_VERSIONS) +# only check projects that were downloaded by CPM (ignore those already in the build environment) +# # don't check cuco here as it uses hashes and that breaks our verify script -set(projects-to-verify rmm fmt spdlog CCCL) +foreach(proj IN ITEMS rmm fmt spdlog CCCL) + if(${proj}_SOURCE_DIR) + list(APPEND projects-to-verify ${proj}) + endif() +endforeach() + add_custom_target(verify_generated_pins ALL COMMAND ${CMAKE_COMMAND} -S="${CMAKE_SOURCE_DIR}/verify/" -B"${CMAKE_BINARY_DIR}/verify_build" -D"rapids-cmake-dir=${rapids-cmake-dir}" diff --git a/testing/cpm/cpm_generate_pins-nested/verify/CMakeLists.txt b/testing/cpm/cpm_generate_pins-nested/verify/CMakeLists.txt index 918846b0..1a678593 100644 --- a/testing/cpm/cpm_generate_pins-nested/verify/CMakeLists.txt +++ b/testing/cpm/cpm_generate_pins-nested/verify/CMakeLists.txt @@ -32,17 +32,20 @@ foreach(proj IN LISTS projects-to-verify) rapids_cpm_package_details(${proj} ${proj}_version ${proj}_repository ${proj}_tag ${proj}_shallow ${proj}_exclude) endforeach() - -file(READ "${CMAKE_CURRENT_BINARY_DIR}/../rapids-cmake/pinned_versions.json" json_data) - # Verify that the pinned_versions is valid json by using it rapids_cpm_package_override("${CMAKE_CURRENT_BINARY_DIR}/../rapids-cmake/pinned_versions.json") foreach(proj IN LISTS projects-to-verify) + # Verify that each git_tag is now different. rapids_cpm_package_details(${proj} ${proj}_version ${proj}_repository pin_${proj}_tag pin_${proj}_shallow ${proj}_exclude) + if(pin_${proj}_tag STREQUAL ${proj}_tag) - message(FATAL_ERROR "pinned ${proj} tag (${pin_${proj}_tag}) should differ compared to baseline ${${proj}_tag}") + include("${rapids-cmake-dir}/cpm/detail/get_default_json.cmake") + include("${rapids-cmake-dir}/cpm/detail/get_override_json.cmake") + get_default_json(${proj} default_versions) + get_override_json(${proj} pinned_versions) + message(FATAL_ERROR "pinned ${proj} tag (${pin_${proj}_tag}) should differ compared to baseline ${${proj}_tag}\npinned_versions.json:\n${pinned_versions}\nversions.json:\n${default_versions}") endif() # Everything should have shallow marked as false diff --git a/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt b/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt index 05631b48..e9c02888 100644 --- a/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt +++ b/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt @@ -19,10 +19,17 @@ project(rapids-test-project LANGUAGES CXX) include(${rapids-cmake-dir}/cpm/init.cmake) include(${rapids-cmake-dir}/cpm/rmm.cmake) -set(CPM_DOWNLOAD_ALL ON) rapids_cpm_init(GENERATE_PINNED_VERSIONS) rapids_cpm_rmm() -set(projects-to-verify rmm fmt spdlog CCCL) + +# only check projects that were downloaded by CPM (ignore those already in the build environment) +foreach(proj IN ITEMS rmm fmt spdlog CCCL) + list(APPEND projects-to-verify ${proj}) + # if(${proj}_SOURCE_DIR) + # list(APPEND projects-to-verify ${proj}) + # endif() +endforeach() + add_custom_target(verify_generated_pins ALL COMMAND ${CMAKE_COMMAND} -S="${CMAKE_SOURCE_DIR}/verify/" -B"${CMAKE_BINARY_DIR}/verify_build" -D"rapids-cmake-dir=${rapids-cmake-dir}" diff --git a/testing/cpm/cpm_generate_pins-simple/verify/CMakeLists.txt b/testing/cpm/cpm_generate_pins-simple/verify/CMakeLists.txt index 736662b7..29b779fe 100644 --- a/testing/cpm/cpm_generate_pins-simple/verify/CMakeLists.txt +++ b/testing/cpm/cpm_generate_pins-simple/verify/CMakeLists.txt @@ -39,6 +39,7 @@ foreach(proj IN LISTS projects-to-verify) # Verify that each git_tag is now different. rapids_cpm_package_details(${proj} ${proj}_version ${proj}_repository pin_${proj}_tag pin_${proj}_shallow ${proj}_exclude) if(pin_${proj}_tag STREQUAL ${proj}_tag) + message(FATAL_ERROR "pinned ${proj} tag (${pin_${proj}_tag}) should differ compared to baseline ${${proj}_tag}") endif() From 7a62a15c52ac5ad001c2be4b27e966a8fa010f66 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 25 Apr 2024 11:28:56 -0700 Subject: [PATCH 13/14] add more output to test failure messages --- .../cpm/cpm_generate_pins-nested/CMakeLists.txt | 7 ++++--- .../verify/CMakeLists.txt | 16 +++++++++++----- .../cpm/cpm_generate_pins-simple/CMakeLists.txt | 1 + .../verify/CMakeLists.txt | 15 ++++++++++++--- testing/utils/fill_cache/CMakeLists.txt | 2 +- 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/testing/cpm/cpm_generate_pins-nested/CMakeLists.txt b/testing/cpm/cpm_generate_pins-nested/CMakeLists.txt index 6320281e..a8e70c19 100644 --- a/testing/cpm/cpm_generate_pins-nested/CMakeLists.txt +++ b/testing/cpm/cpm_generate_pins-nested/CMakeLists.txt @@ -28,9 +28,10 @@ rapids_cpm_init(GENERATE_PINNED_VERSIONS) # # don't check cuco here as it uses hashes and that breaks our verify script foreach(proj IN ITEMS rmm fmt spdlog CCCL) - if(${proj}_SOURCE_DIR) - list(APPEND projects-to-verify ${proj}) - endif() + list(APPEND projects-to-verify ${proj}) + # if(${proj}_SOURCE_DIR) + # list(APPEND projects-to-verify ${proj}) + # endif() endforeach() add_custom_target(verify_generated_pins ALL diff --git a/testing/cpm/cpm_generate_pins-nested/verify/CMakeLists.txt b/testing/cpm/cpm_generate_pins-nested/verify/CMakeLists.txt index 1a678593..041f969e 100644 --- a/testing/cpm/cpm_generate_pins-nested/verify/CMakeLists.txt +++ b/testing/cpm/cpm_generate_pins-nested/verify/CMakeLists.txt @@ -35,22 +35,28 @@ endforeach() # Verify that the pinned_versions is valid json by using it rapids_cpm_package_override("${CMAKE_CURRENT_BINARY_DIR}/../rapids-cmake/pinned_versions.json") +# helper macro for gathering versions.json and pinned_versions.json content to be printed in error messages +macro(_get_json_data) + include("${rapids-cmake-dir}/cpm/detail/get_default_json.cmake") + include("${rapids-cmake-dir}/cpm/detail/get_override_json.cmake") + get_default_json(${proj} default_versions) + get_override_json(${proj} pinned_versions) +endmacro() + foreach(proj IN LISTS projects-to-verify) # Verify that each git_tag is now different. rapids_cpm_package_details(${proj} ${proj}_version ${proj}_repository pin_${proj}_tag pin_${proj}_shallow ${proj}_exclude) if(pin_${proj}_tag STREQUAL ${proj}_tag) - include("${rapids-cmake-dir}/cpm/detail/get_default_json.cmake") - include("${rapids-cmake-dir}/cpm/detail/get_override_json.cmake") - get_default_json(${proj} default_versions) - get_override_json(${proj} pinned_versions) + _get_json_data() message(FATAL_ERROR "pinned ${proj} tag (${pin_${proj}_tag}) should differ compared to baseline ${${proj}_tag}\npinned_versions.json:\n${pinned_versions}\nversions.json:\n${default_versions}") endif() # Everything should have shallow marked as false # so that clones by SHA1 work if(pin_${proj}_shallow) - message(FATAL_ERROR "pin_${proj}_shallow is expected to be false, but got ${pin_${proj}_shallow}") + _get_json_data() + message(FATAL_ERROR "pin_${proj}_shallow is expected to be false, but got ${pin_${proj}_shallow}\npinned_versions.json:\n${pinned_versions}\nversions.json:\n${default_versions}") endif() endforeach() diff --git a/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt b/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt index e9c02888..289da50f 100644 --- a/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt +++ b/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt @@ -19,6 +19,7 @@ project(rapids-test-project LANGUAGES CXX) include(${rapids-cmake-dir}/cpm/init.cmake) include(${rapids-cmake-dir}/cpm/rmm.cmake) + rapids_cpm_init(GENERATE_PINNED_VERSIONS) rapids_cpm_rmm() diff --git a/testing/cpm/cpm_generate_pins-simple/verify/CMakeLists.txt b/testing/cpm/cpm_generate_pins-simple/verify/CMakeLists.txt index 29b779fe..aea5c4b7 100644 --- a/testing/cpm/cpm_generate_pins-simple/verify/CMakeLists.txt +++ b/testing/cpm/cpm_generate_pins-simple/verify/CMakeLists.txt @@ -35,17 +35,26 @@ endforeach() # Verify that the pinned_versions is valid json by using it rapids_cpm_package_override("${CMAKE_CURRENT_BINARY_DIR}/../rapids-cmake/pinned_versions.json") +# helper macro for gathering versions.json and pinned_versions.json content to be printed in error messages +macro(_get_json_data) + include("${rapids-cmake-dir}/cpm/detail/get_default_json.cmake") + include("${rapids-cmake-dir}/cpm/detail/get_override_json.cmake") + get_default_json(${proj} default_versions) + get_override_json(${proj} pinned_versions) +endmacro() + foreach(proj IN LISTS projects-to-verify) # Verify that each git_tag is now different. rapids_cpm_package_details(${proj} ${proj}_version ${proj}_repository pin_${proj}_tag pin_${proj}_shallow ${proj}_exclude) if(pin_${proj}_tag STREQUAL ${proj}_tag) - - message(FATAL_ERROR "pinned ${proj} tag (${pin_${proj}_tag}) should differ compared to baseline ${${proj}_tag}") + _get_json_data() + message(FATAL_ERROR "pinned ${proj} tag (${pin_${proj}_tag}) should differ compared to baseline ${${proj}_tag}\npinned_versions.json:\n${pinned_versions}\nversions.json:\n${default_versions}") endif() # Everything should have shallow marked as false # so that clones by SHA1 work if(pin_${proj}_shallow) - message(FATAL_ERROR "pin_${proj}_shallow is expected to be false, but got ${pin_${proj}_shallow}") + _get_json_data() + message(FATAL_ERROR "pin_${proj}_shallow is expected to be false, but got ${pin_${proj}_shallow}\npinned_versions.json:\n${pinned_versions}\nversions.json:\n${default_versions}") endif() endforeach() diff --git a/testing/utils/fill_cache/CMakeLists.txt b/testing/utils/fill_cache/CMakeLists.txt index 07a79627..a0dcb751 100644 --- a/testing/utils/fill_cache/CMakeLists.txt +++ b/testing/utils/fill_cache/CMakeLists.txt @@ -43,9 +43,9 @@ rapids_cpm_gbench(DOWNLOAD_ONLY ON) rapids_cpm_gtest(DOWNLOAD_ONLY ON) rapids_cpm_libcudacxx(DOWNLOAD_ONLY ON) rapids_cpm_nvbench(DOWNLOAD_ONLY ON) +rapids_cpm_rmm(DOWNLOAD_ONLY ON) rapids_cpm_spdlog(DOWNLOAD_ONLY ON) rapids_cpm_fmt(DOWNLOAD_ONLY ON) -rapids_cpm_rmm(DOWNLOAD_ONLY ON) rapids_cpm_thrust(NAMESPACE temp DOWNLOAD_ONLY ON) rapids_cpm_find(skbuild 0.14.1 GIT_REPOSITORY https://github.com/scikit-build/scikit-build.git From e042cd4eff7549b98899a78335dcce5ab6d83cbb Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 25 Apr 2024 12:02:46 -0700 Subject: [PATCH 14/14] remove debugging changes --- testing/cpm/cpm_generate_pins-nested/CMakeLists.txt | 7 +++---- testing/cpm/cpm_generate_pins-nested/verify/CMakeLists.txt | 2 -- testing/cpm/cpm_generate_pins-simple/CMakeLists.txt | 7 +++---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/testing/cpm/cpm_generate_pins-nested/CMakeLists.txt b/testing/cpm/cpm_generate_pins-nested/CMakeLists.txt index a8e70c19..6320281e 100644 --- a/testing/cpm/cpm_generate_pins-nested/CMakeLists.txt +++ b/testing/cpm/cpm_generate_pins-nested/CMakeLists.txt @@ -28,10 +28,9 @@ rapids_cpm_init(GENERATE_PINNED_VERSIONS) # # don't check cuco here as it uses hashes and that breaks our verify script foreach(proj IN ITEMS rmm fmt spdlog CCCL) - list(APPEND projects-to-verify ${proj}) - # if(${proj}_SOURCE_DIR) - # list(APPEND projects-to-verify ${proj}) - # endif() + if(${proj}_SOURCE_DIR) + list(APPEND projects-to-verify ${proj}) + endif() endforeach() add_custom_target(verify_generated_pins ALL diff --git a/testing/cpm/cpm_generate_pins-nested/verify/CMakeLists.txt b/testing/cpm/cpm_generate_pins-nested/verify/CMakeLists.txt index 041f969e..aea5c4b7 100644 --- a/testing/cpm/cpm_generate_pins-nested/verify/CMakeLists.txt +++ b/testing/cpm/cpm_generate_pins-nested/verify/CMakeLists.txt @@ -44,10 +44,8 @@ macro(_get_json_data) endmacro() foreach(proj IN LISTS projects-to-verify) - # Verify that each git_tag is now different. rapids_cpm_package_details(${proj} ${proj}_version ${proj}_repository pin_${proj}_tag pin_${proj}_shallow ${proj}_exclude) - if(pin_${proj}_tag STREQUAL ${proj}_tag) _get_json_data() message(FATAL_ERROR "pinned ${proj} tag (${pin_${proj}_tag}) should differ compared to baseline ${${proj}_tag}\npinned_versions.json:\n${pinned_versions}\nversions.json:\n${default_versions}") diff --git a/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt b/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt index 289da50f..72c98cd9 100644 --- a/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt +++ b/testing/cpm/cpm_generate_pins-simple/CMakeLists.txt @@ -25,10 +25,9 @@ rapids_cpm_rmm() # only check projects that were downloaded by CPM (ignore those already in the build environment) foreach(proj IN ITEMS rmm fmt spdlog CCCL) - list(APPEND projects-to-verify ${proj}) - # if(${proj}_SOURCE_DIR) - # list(APPEND projects-to-verify ${proj}) - # endif() + if(${proj}_SOURCE_DIR) + list(APPEND projects-to-verify ${proj}) + endif() endforeach() add_custom_target(verify_generated_pins ALL