From a506abb6de545cbe9da8c6f7bbc341f5f3c61284 Mon Sep 17 00:00:00 2001
From: Bouwe Andela <b.andela@esciencecenter.nl>
Date: Mon, 30 May 2022 11:31:42 +0200
Subject: [PATCH] Download cudawrappers using CMake

---
 .gitmodules           | 3 ---
 CMakeLists.txt        | 7 ++++++-
 README.md             | 2 +-
 external/cudawrappers | 1 -
 4 files changed, 7 insertions(+), 6 deletions(-)
 delete mode 100644 .gitmodules
 delete mode 160000 external/cudawrappers

diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 4733efa..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "external/cuda-wrappers"]
-	path = external/cudawrappers
-	url = https://github.com/nlesc-recruit/CUDA-wrappers.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f33b535..f75ec83 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,12 @@ include(GNUInstallDirs)
 list(APPEND CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
 
 # Add cudawrappers dependency
-add_subdirectory(external/cudawrappers)
+include(FetchContent)
+FetchContent_Declare(
+  cudawrappers
+  GIT_REPOSITORY https://github.com/nlesc-recruit/cudawrappers
+  GIT_TAG e8f0943c70e688829f75b2b90a7af128c0a6df49)
+FetchContent_MakeAvailable(cudawrappers)
 
 # Set up libtcc
 add_subdirectory(libtcc)
diff --git a/README.md b/README.md
index a52ae01..f043ce0 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ appear in _Astronomy and Astrophysics_ soon.
 
 ## Brief overview on how to use the Tensor-Core Correlator library:
 
-Clone the repository (`git clone --recursive`)
+Clone the repository (`git clone https://git.astron.nl/RD/tensor-core-correlator.git`)
 
 Build the library (just type `make`)
 
diff --git a/external/cudawrappers b/external/cudawrappers
deleted file mode 160000
index ffacb0e..0000000
--- a/external/cudawrappers
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit ffacb0e3c649a4d8999b3c7959ce12dc03d25bf7
-- 
GitLab