arrayfire: avoid FetchContent downloading stuff
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
, fmt_9
|
||||
, forge
|
||||
, freeimage
|
||||
, git
|
||||
, gtest
|
||||
, lapack
|
||||
, lib
|
||||
@@ -131,7 +130,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# ArrayFire have a repo with assets for the examples. Since we don't build
|
||||
# the examples anyway, remove the dependency on assets.
|
||||
patches = [ ./no-assets.patch ];
|
||||
patches = [ ./no-assets.patch ./no-download.patch ];
|
||||
|
||||
postPatch = ''
|
||||
mkdir -p ./extern/af_glad-src
|
||||
@@ -209,11 +208,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
# ArrayFire have their own CMake functions for downloading the
|
||||
# dependencies, and it uses git. Even though we bypass that system by
|
||||
# downloading the dependencies beforehand, CMake files still invoke git for
|
||||
# checking...
|
||||
git
|
||||
pkg-config
|
||||
python3
|
||||
];
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index deafa7a75..b9ca54621 100644
|
||||
index 12d6e557c..cc004555d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -320,11 +320,11 @@ if(NOT TARGET nonstd::span-lite)
|
||||
@@ -321,11 +321,6 @@ if(NOT TARGET nonstd::span-lite)
|
||||
|
||||
endif()
|
||||
|
||||
@@ -11,31 +11,25 @@ index deafa7a75..b9ca54621 100644
|
||||
- REF master
|
||||
-)
|
||||
-set(ASSETS_DIR ${${assets_prefix}_SOURCE_DIR})
|
||||
+# af_dep_check_and_populate(${assets_prefix}
|
||||
+# URI https://github.com/arrayfire/assets.git
|
||||
+# REF master
|
||||
+# )
|
||||
+# set(ASSETS_DIR ${${assets_prefix}_SOURCE_DIR})
|
||||
|
||||
# when crosscompiling use the bin2cpp file from the native bin directory
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
@@ -477,13 +477,13 @@ install(FILES ${ArrayFire_BINARY_DIR}/include/af/version.h
|
||||
# source files does not depend on AF_BUILD_EXAMPLES
|
||||
# when AF_BUILD_EXAMPLES is OFF, the examples source is installed without
|
||||
# building the example executables
|
||||
@@ -473,18 +468,6 @@ install(FILES ${ArrayFire_BINARY_DIR}/include/af/version.h
|
||||
DESTINATION "${AF_INSTALL_INC_DIR}/af/"
|
||||
COMPONENT headers)
|
||||
|
||||
-# install the examples irrespective of the AF_BUILD_EXAMPLES value
|
||||
-# only the examples source files are installed, so the installation of these
|
||||
-# source files does not depend on AF_BUILD_EXAMPLES
|
||||
-# when AF_BUILD_EXAMPLES is OFF, the examples source is installed without
|
||||
-# building the example executables
|
||||
-install(DIRECTORY examples/ #NOTE The slash at the end is important
|
||||
- DESTINATION ${AF_INSTALL_EXAMPLE_DIR}
|
||||
- COMPONENT examples)
|
||||
+# install(DIRECTORY examples/ #NOTE The slash at the end is important
|
||||
+# DESTINATION ${AF_INSTALL_EXAMPLE_DIR}
|
||||
+# COMPONENT examples)
|
||||
|
||||
-
|
||||
-install(DIRECTORY ${ASSETS_DIR}/examples/ #NOTE The slash at the end is important
|
||||
- DESTINATION ${AF_INSTALL_EXAMPLE_DIR}
|
||||
- COMPONENT examples)
|
||||
+#install(DIRECTORY ${ASSETS_DIR}/examples/ #NOTE The slash at the end is important
|
||||
+# DESTINATION ${AF_INSTALL_EXAMPLE_DIR}
|
||||
+# COMPONENT examples)
|
||||
|
||||
install(DIRECTORY "${ArrayFire_SOURCE_DIR}/LICENSES/"
|
||||
DESTINATION LICENSES
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
diff --git a/CMakeModules/AFconfigure_deps_vars.cmake b/CMakeModules/AFconfigure_deps_vars.cmake
|
||||
index aac332f5a..e9e711159 100644
|
||||
--- a/CMakeModules/AFconfigure_deps_vars.cmake
|
||||
+++ b/CMakeModules/AFconfigure_deps_vars.cmake
|
||||
@@ -94,7 +94,7 @@ macro(af_dep_check_and_populate dep_prefix)
|
||||
URL ${adcp_args_URI}
|
||||
URL_HASH ${adcp_args_REF}
|
||||
DOWNLOAD_COMMAND \"\"
|
||||
- UPDATE_DISCONNECTED ON
|
||||
+ UPDATE_COMMAND \"\"
|
||||
SOURCE_DIR "${ArrayFire_SOURCE_DIR}/extern/${dep_prefix}-src"
|
||||
BINARY_DIR "${ArrayFire_BINARY_DIR}/extern/${dep_prefix}-build"
|
||||
SUBBUILD_DIR "${ArrayFire_BINARY_DIR}/extern/${dep_prefix}-subbuild"
|
||||
@@ -104,7 +104,7 @@ macro(af_dep_check_and_populate dep_prefix)
|
||||
QUIET
|
||||
URL ${adcp_args_URI}
|
||||
DOWNLOAD_COMMAND \"\"
|
||||
- UPDATE_DISCONNECTED ON
|
||||
+ UPDATE_COMMAND \"\"
|
||||
SOURCE_DIR "${ArrayFire_SOURCE_DIR}/extern/${dep_prefix}-src"
|
||||
BINARY_DIR "${ArrayFire_BINARY_DIR}/extern/${dep_prefix}-build"
|
||||
SUBBUILD_DIR "${ArrayFire_BINARY_DIR}/extern/${dep_prefix}-subbuild"
|
||||
@@ -116,7 +116,7 @@ macro(af_dep_check_and_populate dep_prefix)
|
||||
GIT_REPOSITORY ${adcp_args_URI}
|
||||
GIT_TAG ${adcp_args_REF}
|
||||
DOWNLOAD_COMMAND \"\"
|
||||
- UPDATE_DISCONNECTED ON
|
||||
+ UPDATE_COMMAND \"\"
|
||||
SOURCE_DIR "${ArrayFire_SOURCE_DIR}/extern/${dep_prefix}-src"
|
||||
BINARY_DIR "${ArrayFire_BINARY_DIR}/extern/${dep_prefix}-build"
|
||||
SUBBUILD_DIR "${ArrayFire_BINARY_DIR}/extern/${dep_prefix}-subbuild"
|
||||
Reference in New Issue
Block a user