[arrayfire] New Port (#14240)
* [arrayfire] New Port
* Format manifest file
* Remove nvidia cub, forge, and spdlog submodules and use vcpkg ports - add patch
* Remove arrayfire/assets and don't build examples
* Remove arrayfire/glad submodule, use port, update patch
* Add optional freeimage dependency for graphics lib
* Remove rename of arrayfire threads/pass path to build
* Update ports/arrayfire/portfile.cmake
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
* Fix up cmake targets files, install bin/dlls to the proper location
* Use debug bin dir if in debug mode
* Fixes for unified, Windows dlls, and more
- Make the unified backend its own feature
- Make the unified and CPU backend default features
- Conditionally create a bin directory if a Windows non-static build for the unified dll
- Remove fftw dependency (relies on MKL)
- Only support x64
* Add warning for Windows static builds
* Ensure CMake assets are in the proper dir for non-Windows builds
* Actually, don't change cmake targets in non-Windows systems
* Remove port-version
* Use MKL for CPU and OpenCL backends
* Patch arrayfire/threads - fix duplicate include
* Use newer af/threads, replace include path to fix Windows builds
* Fix binary dir for output DLLs
* Update select_compute_arch to work with CUDA 11
* Don't include CUB if using CUDA >= 11
* Bump port verison to 3.7.3 to handle CUDA 11+
* Update port to use 3.7.3
* Update to include MSVC 2019 fixes, fixup CMake targets on *nix
* Apply suggestions from code review
* Update ports/arrayfire/portfile.cmake
* Change AF CMake dir since targets.cmake are included by other targets
* Bump to commit with fixed AF version for bits
The v3.7 branch tip was still outputting shared objects with 3.7.2 versions attached to them. It's now fixed
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-11-19 12:50:38 -06:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO arrayfire/arrayfire
|
2021-10-27 00:03:08 -07:00
|
|
|
REF d99887ae431fcd58168b653a1e69f027f04d5188 # v3.8.0
|
|
|
|
SHA512 d8ddf6ba254744e62acf5ecf680f0ae56b05f8957b5463572923977ba2ffea7fa37cc1b6179421a1188a6f9e66565ca0f8cd00807513ccbe66ba1e9bbd41a3da
|
[arrayfire] New Port (#14240)
* [arrayfire] New Port
* Format manifest file
* Remove nvidia cub, forge, and spdlog submodules and use vcpkg ports - add patch
* Remove arrayfire/assets and don't build examples
* Remove arrayfire/glad submodule, use port, update patch
* Add optional freeimage dependency for graphics lib
* Remove rename of arrayfire threads/pass path to build
* Update ports/arrayfire/portfile.cmake
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
* Fix up cmake targets files, install bin/dlls to the proper location
* Use debug bin dir if in debug mode
* Fixes for unified, Windows dlls, and more
- Make the unified backend its own feature
- Make the unified and CPU backend default features
- Conditionally create a bin directory if a Windows non-static build for the unified dll
- Remove fftw dependency (relies on MKL)
- Only support x64
* Add warning for Windows static builds
* Ensure CMake assets are in the proper dir for non-Windows builds
* Actually, don't change cmake targets in non-Windows systems
* Remove port-version
* Use MKL for CPU and OpenCL backends
* Patch arrayfire/threads - fix duplicate include
* Use newer af/threads, replace include path to fix Windows builds
* Fix binary dir for output DLLs
* Update select_compute_arch to work with CUDA 11
* Don't include CUB if using CUDA >= 11
* Bump port verison to 3.7.3 to handle CUDA 11+
* Update port to use 3.7.3
* Update to include MSVC 2019 fixes, fixup CMake targets on *nix
* Apply suggestions from code review
* Update ports/arrayfire/portfile.cmake
* Change AF CMake dir since targets.cmake are included by other targets
* Bump to commit with fixed AF version for bits
The v3.7 branch tip was still outputting shared objects with 3.7.2 versions attached to them. It's now fixed
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-11-19 12:50:38 -06:00
|
|
|
HEAD_REF master
|
2021-10-27 00:03:08 -07:00
|
|
|
PATCHES
|
|
|
|
build.patch
|
|
|
|
Fix-constexpr-error-with-vs2019-with-half.patch
|
[arrayfire] New Port (#14240)
* [arrayfire] New Port
* Format manifest file
* Remove nvidia cub, forge, and spdlog submodules and use vcpkg ports - add patch
* Remove arrayfire/assets and don't build examples
* Remove arrayfire/glad submodule, use port, update patch
* Add optional freeimage dependency for graphics lib
* Remove rename of arrayfire threads/pass path to build
* Update ports/arrayfire/portfile.cmake
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
* Fix up cmake targets files, install bin/dlls to the proper location
* Use debug bin dir if in debug mode
* Fixes for unified, Windows dlls, and more
- Make the unified backend its own feature
- Make the unified and CPU backend default features
- Conditionally create a bin directory if a Windows non-static build for the unified dll
- Remove fftw dependency (relies on MKL)
- Only support x64
* Add warning for Windows static builds
* Ensure CMake assets are in the proper dir for non-Windows builds
* Actually, don't change cmake targets in non-Windows systems
* Remove port-version
* Use MKL for CPU and OpenCL backends
* Patch arrayfire/threads - fix duplicate include
* Use newer af/threads, replace include path to fix Windows builds
* Fix binary dir for output DLLs
* Update select_compute_arch to work with CUDA 11
* Don't include CUB if using CUDA >= 11
* Bump port verison to 3.7.3 to handle CUDA 11+
* Update port to use 3.7.3
* Update to include MSVC 2019 fixes, fixup CMake targets on *nix
* Apply suggestions from code review
* Update ports/arrayfire/portfile.cmake
* Change AF CMake dir since targets.cmake are included by other targets
* Bump to commit with fixed AF version for bits
The v3.7 branch tip was still outputting shared objects with 3.7.2 versions attached to them. It's now fixed
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-11-19 12:50:38 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
# arrayfire cpu thread lib needed as a submodule for the CPU backend
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH CPU_THREADS_PATH
|
|
|
|
REPO arrayfire/threads
|
|
|
|
REF b666773940269179f19ef11c8f1eb77005e85d9a
|
|
|
|
SHA512 b3e8b54acf3a588b1f821c2774d5da2d8f8441962c6d99808d513f7117278b9066eb050b8b501bddbd3882e68eb5cc5da0b2fca54e15ab1923fe068a3fe834f5
|
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2020-12-12 17:35:03 -06:00
|
|
|
# Get forge. We only need headers and aren't actually linking.
|
|
|
|
# We don't want to use the vcpkg dependency since it is broken in many
|
|
|
|
# environments - see https://github.com/microsoft/vcpkg/issues/14864. This
|
|
|
|
# can be relaxed when the issue is fixed. Forge and its dependencies
|
|
|
|
# are still runtime dependencies, so the user can use the graphics
|
|
|
|
# library by installing forge and freeimage.
|
|
|
|
vcpkg_from_github(
|
2021-10-27 00:03:08 -07:00
|
|
|
OUT_SOURCE_PATH FORGE_PATH
|
|
|
|
REPO arrayfire/forge
|
|
|
|
REF 1a0f0cb6371a8c8053ab5eb7cbe3039c95132389 # v1.0.5
|
|
|
|
SHA512 8f8607421880a0f0013380eb5efb3a4f05331cd415d68c9cd84dd57eb727da1df6223fc6d65b106675d6aa09c3388359fab64443c31fadadf7641161be6b3b89
|
|
|
|
HEAD_REF master
|
2020-12-12 17:35:03 -06:00
|
|
|
)
|
|
|
|
|
[arrayfire] New Port (#14240)
* [arrayfire] New Port
* Format manifest file
* Remove nvidia cub, forge, and spdlog submodules and use vcpkg ports - add patch
* Remove arrayfire/assets and don't build examples
* Remove arrayfire/glad submodule, use port, update patch
* Add optional freeimage dependency for graphics lib
* Remove rename of arrayfire threads/pass path to build
* Update ports/arrayfire/portfile.cmake
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
* Fix up cmake targets files, install bin/dlls to the proper location
* Use debug bin dir if in debug mode
* Fixes for unified, Windows dlls, and more
- Make the unified backend its own feature
- Make the unified and CPU backend default features
- Conditionally create a bin directory if a Windows non-static build for the unified dll
- Remove fftw dependency (relies on MKL)
- Only support x64
* Add warning for Windows static builds
* Ensure CMake assets are in the proper dir for non-Windows builds
* Actually, don't change cmake targets in non-Windows systems
* Remove port-version
* Use MKL for CPU and OpenCL backends
* Patch arrayfire/threads - fix duplicate include
* Use newer af/threads, replace include path to fix Windows builds
* Fix binary dir for output DLLs
* Update select_compute_arch to work with CUDA 11
* Don't include CUB if using CUDA >= 11
* Bump port verison to 3.7.3 to handle CUDA 11+
* Update port to use 3.7.3
* Update to include MSVC 2019 fixes, fixup CMake targets on *nix
* Apply suggestions from code review
* Update ports/arrayfire/portfile.cmake
* Change AF CMake dir since targets.cmake are included by other targets
* Bump to commit with fixed AF version for bits
The v3.7 branch tip was still outputting shared objects with 3.7.2 versions attached to them. It's now fixed
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-11-19 12:50:38 -06:00
|
|
|
################################### Build ###################################
|
|
|
|
|
|
|
|
# Default flags
|
|
|
|
set(AF_DEFAULT_VCPKG_CMAKE_FLAGS
|
|
|
|
-DBUILD_TESTING=OFF
|
|
|
|
-DAF_BUILD_DOCS=OFF
|
|
|
|
-DAF_BUILD_EXAMPLES=OFF
|
|
|
|
-DUSE_CPU_MKL=ON
|
|
|
|
-DUSE_OPENCL_MKL=ON
|
|
|
|
-DAF_CPU_THREAD_PATH=${CPU_THREADS_PATH} # for building the arrayfire cpu threads lib
|
2020-12-12 17:35:03 -06:00
|
|
|
-DAF_FORGE_PATH=${FORGE_PATH} # forge headers for building the graphics lib
|
|
|
|
-DAF_BUILD_FORGE=OFF
|
[arrayfire] New Port (#14240)
* [arrayfire] New Port
* Format manifest file
* Remove nvidia cub, forge, and spdlog submodules and use vcpkg ports - add patch
* Remove arrayfire/assets and don't build examples
* Remove arrayfire/glad submodule, use port, update patch
* Add optional freeimage dependency for graphics lib
* Remove rename of arrayfire threads/pass path to build
* Update ports/arrayfire/portfile.cmake
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
* Fix up cmake targets files, install bin/dlls to the proper location
* Use debug bin dir if in debug mode
* Fixes for unified, Windows dlls, and more
- Make the unified backend its own feature
- Make the unified and CPU backend default features
- Conditionally create a bin directory if a Windows non-static build for the unified dll
- Remove fftw dependency (relies on MKL)
- Only support x64
* Add warning for Windows static builds
* Ensure CMake assets are in the proper dir for non-Windows builds
* Actually, don't change cmake targets in non-Windows systems
* Remove port-version
* Use MKL for CPU and OpenCL backends
* Patch arrayfire/threads - fix duplicate include
* Use newer af/threads, replace include path to fix Windows builds
* Fix binary dir for output DLLs
* Update select_compute_arch to work with CUDA 11
* Don't include CUB if using CUDA >= 11
* Bump port verison to 3.7.3 to handle CUDA 11+
* Update port to use 3.7.3
* Update to include MSVC 2019 fixes, fixup CMake targets on *nix
* Apply suggestions from code review
* Update ports/arrayfire/portfile.cmake
* Change AF CMake dir since targets.cmake are included by other targets
* Bump to commit with fixed AF version for bits
The v3.7 branch tip was still outputting shared objects with 3.7.2 versions attached to them. It's now fixed
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-11-19 12:50:38 -06:00
|
|
|
-DAF_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/share/${PORT} # for CMake configs/targets
|
|
|
|
)
|
|
|
|
|
|
|
|
# bin/dll directory for Windows non-static builds for the unified backend dll
|
|
|
|
if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
set(AF_BIN_DIR ${CURRENT_PACKAGES_DIR})
|
|
|
|
list(APPEND AF_DEFAULT_VCPKG_CMAKE_FLAGS "-DAF_BIN_DIR=${AF_BIN_DIR}")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
message(WARNING "NOTE: Windows support with static linkeage is still experimental.")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Determine which backend to build via specified feature
|
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS AF_BACKEND_FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
unified AF_BUILD_UNIFIED
|
|
|
|
cpu AF_BUILD_CPU
|
|
|
|
cuda AF_BUILD_CUDA
|
|
|
|
opencl AF_BUILD_OPENCL
|
|
|
|
)
|
|
|
|
|
|
|
|
# Build and install
|
2021-10-27 00:03:08 -07:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
[arrayfire] New Port (#14240)
* [arrayfire] New Port
* Format manifest file
* Remove nvidia cub, forge, and spdlog submodules and use vcpkg ports - add patch
* Remove arrayfire/assets and don't build examples
* Remove arrayfire/glad submodule, use port, update patch
* Add optional freeimage dependency for graphics lib
* Remove rename of arrayfire threads/pass path to build
* Update ports/arrayfire/portfile.cmake
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
* Fix up cmake targets files, install bin/dlls to the proper location
* Use debug bin dir if in debug mode
* Fixes for unified, Windows dlls, and more
- Make the unified backend its own feature
- Make the unified and CPU backend default features
- Conditionally create a bin directory if a Windows non-static build for the unified dll
- Remove fftw dependency (relies on MKL)
- Only support x64
* Add warning for Windows static builds
* Ensure CMake assets are in the proper dir for non-Windows builds
* Actually, don't change cmake targets in non-Windows systems
* Remove port-version
* Use MKL for CPU and OpenCL backends
* Patch arrayfire/threads - fix duplicate include
* Use newer af/threads, replace include path to fix Windows builds
* Fix binary dir for output DLLs
* Update select_compute_arch to work with CUDA 11
* Don't include CUB if using CUDA >= 11
* Bump port verison to 3.7.3 to handle CUDA 11+
* Update port to use 3.7.3
* Update to include MSVC 2019 fixes, fixup CMake targets on *nix
* Apply suggestions from code review
* Update ports/arrayfire/portfile.cmake
* Change AF CMake dir since targets.cmake are included by other targets
* Bump to commit with fixed AF version for bits
The v3.7 branch tip was still outputting shared objects with 3.7.2 versions attached to them. It's now fixed
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-11-19 12:50:38 -06:00
|
|
|
OPTIONS
|
|
|
|
${AF_DEFAULT_VCPKG_CMAKE_FLAGS}
|
|
|
|
${AF_BACKEND_FEATURE_OPTIONS}
|
|
|
|
)
|
2021-10-27 00:03:08 -07:00
|
|
|
vcpkg_cmake_install()
|
[arrayfire] New Port (#14240)
* [arrayfire] New Port
* Format manifest file
* Remove nvidia cub, forge, and spdlog submodules and use vcpkg ports - add patch
* Remove arrayfire/assets and don't build examples
* Remove arrayfire/glad submodule, use port, update patch
* Add optional freeimage dependency for graphics lib
* Remove rename of arrayfire threads/pass path to build
* Update ports/arrayfire/portfile.cmake
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
* Fix up cmake targets files, install bin/dlls to the proper location
* Use debug bin dir if in debug mode
* Fixes for unified, Windows dlls, and more
- Make the unified backend its own feature
- Make the unified and CPU backend default features
- Conditionally create a bin directory if a Windows non-static build for the unified dll
- Remove fftw dependency (relies on MKL)
- Only support x64
* Add warning for Windows static builds
* Ensure CMake assets are in the proper dir for non-Windows builds
* Actually, don't change cmake targets in non-Windows systems
* Remove port-version
* Use MKL for CPU and OpenCL backends
* Patch arrayfire/threads - fix duplicate include
* Use newer af/threads, replace include path to fix Windows builds
* Fix binary dir for output DLLs
* Update select_compute_arch to work with CUDA 11
* Don't include CUB if using CUDA >= 11
* Bump port verison to 3.7.3 to handle CUDA 11+
* Update port to use 3.7.3
* Update to include MSVC 2019 fixes, fixup CMake targets on *nix
* Apply suggestions from code review
* Update ports/arrayfire/portfile.cmake
* Change AF CMake dir since targets.cmake are included by other targets
* Bump to commit with fixed AF version for bits
The v3.7 branch tip was still outputting shared objects with 3.7.2 versions attached to them. It's now fixed
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-11-19 12:50:38 -06:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2021-10-27 00:03:08 -07:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/examples")
|
[arrayfire] New Port (#14240)
* [arrayfire] New Port
* Format manifest file
* Remove nvidia cub, forge, and spdlog submodules and use vcpkg ports - add patch
* Remove arrayfire/assets and don't build examples
* Remove arrayfire/glad submodule, use port, update patch
* Add optional freeimage dependency for graphics lib
* Remove rename of arrayfire threads/pass path to build
* Update ports/arrayfire/portfile.cmake
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
* Fix up cmake targets files, install bin/dlls to the proper location
* Use debug bin dir if in debug mode
* Fixes for unified, Windows dlls, and more
- Make the unified backend its own feature
- Make the unified and CPU backend default features
- Conditionally create a bin directory if a Windows non-static build for the unified dll
- Remove fftw dependency (relies on MKL)
- Only support x64
* Add warning for Windows static builds
* Ensure CMake assets are in the proper dir for non-Windows builds
* Actually, don't change cmake targets in non-Windows systems
* Remove port-version
* Use MKL for CPU and OpenCL backends
* Patch arrayfire/threads - fix duplicate include
* Use newer af/threads, replace include path to fix Windows builds
* Fix binary dir for output DLLs
* Update select_compute_arch to work with CUDA 11
* Don't include CUB if using CUDA >= 11
* Bump port verison to 3.7.3 to handle CUDA 11+
* Update port to use 3.7.3
* Update to include MSVC 2019 fixes, fixup CMake targets on *nix
* Apply suggestions from code review
* Update ports/arrayfire/portfile.cmake
* Change AF CMake dir since targets.cmake are included by other targets
* Bump to commit with fixed AF version for bits
The v3.7 branch tip was still outputting shared objects with 3.7.2 versions attached to them. It's now fixed
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-11-19 12:50:38 -06:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2021-10-27 00:03:08 -07:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/LICENSES")
|
[arrayfire] New Port (#14240)
* [arrayfire] New Port
* Format manifest file
* Remove nvidia cub, forge, and spdlog submodules and use vcpkg ports - add patch
* Remove arrayfire/assets and don't build examples
* Remove arrayfire/glad submodule, use port, update patch
* Add optional freeimage dependency for graphics lib
* Remove rename of arrayfire threads/pass path to build
* Update ports/arrayfire/portfile.cmake
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
* Fix up cmake targets files, install bin/dlls to the proper location
* Use debug bin dir if in debug mode
* Fixes for unified, Windows dlls, and more
- Make the unified backend its own feature
- Make the unified and CPU backend default features
- Conditionally create a bin directory if a Windows non-static build for the unified dll
- Remove fftw dependency (relies on MKL)
- Only support x64
* Add warning for Windows static builds
* Ensure CMake assets are in the proper dir for non-Windows builds
* Actually, don't change cmake targets in non-Windows systems
* Remove port-version
* Use MKL for CPU and OpenCL backends
* Patch arrayfire/threads - fix duplicate include
* Use newer af/threads, replace include path to fix Windows builds
* Fix binary dir for output DLLs
* Update select_compute_arch to work with CUDA 11
* Don't include CUB if using CUDA >= 11
* Bump port verison to 3.7.3 to handle CUDA 11+
* Update port to use 3.7.3
* Update to include MSVC 2019 fixes, fixup CMake targets on *nix
* Apply suggestions from code review
* Update ports/arrayfire/portfile.cmake
* Change AF CMake dir since targets.cmake are included by other targets
* Bump to commit with fixed AF version for bits
The v3.7 branch tip was still outputting shared objects with 3.7.2 versions attached to them. It's now fixed
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-11-19 12:50:38 -06:00
|
|
|
|
|
|
|
# Copyright and license
|
2021-10-27 00:03:08 -07:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYRIGHT.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|