summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/tvm_fix_cpptest_build.patch
diff options
context:
space:
mode:
authorAndy Tai <[email protected]>2025-03-05 23:35:41 -0800
committerNicolas Goaziou <[email protected]>2025-03-09 01:20:32 +0100
commit5adfe1b8e92ff332656bcc7a9d71a35306b3411e (patch)
tree5bb2e3ba2a9d7976cc8b5115b6a59750b208ae97 /gnu/packages/patches/tvm_fix_cpptest_build.patch
parent9b50aa9bfc61addbf0d4760ac9c09d76e56d906b (diff)
gnu: Add tvm.
* gnu/packages/machine-learning.scm (tvm): New variable. * gnu/packages/patches/tvm_fix_cpptest_build.patch: New file. * gnu/local.mk: Register new file. Change-Id: Icfee19fccc7cc1c9f6d5d6bb680b554d777f62d6 Signed-off-by: Nicolas Goaziou <[email protected]>
Diffstat (limited to 'gnu/packages/patches/tvm_fix_cpptest_build.patch')
-rw-r--r--gnu/packages/patches/tvm_fix_cpptest_build.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/gnu/packages/patches/tvm_fix_cpptest_build.patch b/gnu/packages/patches/tvm_fix_cpptest_build.patch
new file mode 100644
index 0000000000..7c3efac549
--- /dev/null
+++ b/gnu/packages/patches/tvm_fix_cpptest_build.patch
@@ -0,0 +1,18 @@
+Fix build of cpptest by correcting relative include paths
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 757b0d1a8..546ecd516 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -778,6 +778,11 @@ endif()
+ if(GTEST_FOUND)
+ tvm_file_glob(GLOB_RECURSE TEST_SRCS tests/cpp/*.cc)
+ add_executable(cpptest ${TEST_SRCS})
++
++ # fix building cpptest if we don't use 3rdParty subtree as when building with GNU Guix
++ # allowng relative paths starting with ../../.. to point to the top of the source dir
++ target_include_directories(cpptest PRIVATE tests/cpp/runtime)
++
+ # include runtime files for unit testing
+ target_link_libraries(cpptest PRIVATE ${TVM_TEST_LIBRARY_NAME} GTest::GTest GTest::Main GTest::gmock pthread dl)
+ if(DEFINED LLVM_LIBS)