~ruther/guix-local

ref: 8240f35e15ab46f36d76b4ea5518113c67e2c607 guix-local/gnu/packages/patches/tvm_fix_cpptest_build.patch -rw-r--r-- 755 bytes
8240f35e — Sharlatan Hellseher gnu: python-parse-type: Update to 0.6.6. 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)