Skip to content

Fetch dependencies and data using CMake FetchContent #3037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 17, 2021

Conversation

9prady9
Copy link
Member

@9prady9 9prady9 commented Oct 31, 2020

Description

Changed all the following submodules to be fetched via CMake's FetchContent command. Unfortunately, this command is made available only in 3.11.4, thus we copied the required files to our repository's CMakeModules folder.

  • test/googletest
  • extern/forge
  • extern/glad
  • extern/spdlog
  • extern/cub
  • src/backend/cputhreads
  • assets
  • test/data

Also, marked cmake variables with FETCHCONTENT prefix as advanced

Changes to Users

None to downstream users. Repository cloning and starting the build process is expected to become slightly easier.

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass
  • [ ] Functions added to unified API
  • [ ] Functions documented

@9prady9 9prady9 requested a review from umar456 October 31, 2020 17:54
@9prady9 9prady9 force-pushed the fetch_content_deps branch 5 times, most recently from eec54b6 to c80a7a9 Compare November 7, 2020 08:27
@9prady9 9prady9 force-pushed the fetch_content_deps branch 2 times, most recently from 7dade42 to 00407d7 Compare December 2, 2020 06:29
@9prady9 9prady9 added this to the 3.8.1 milestone Dec 3, 2020
@9prady9 9prady9 force-pushed the fetch_content_deps branch from 00407d7 to 078865f Compare January 5, 2021 09:29
@9prady9 9prady9 force-pushed the fetch_content_deps branch 3 times, most recently from d1140c9 to 9107788 Compare January 23, 2021 06:36
@9prady9 9prady9 force-pushed the fetch_content_deps branch from 72822f8 to 31580dc Compare February 1, 2021 23:57
Removed assets and test/data as submodules
When the above cmake option is turned ON, via the below command
```cmake
ccmake .. -DAF_BUILD_OFFLINE:BOOL=ON
```
FetchContent will look for dependencies under build tree's extern
folder and will not attempt to download any of them.

By default this option is turned OFF
- cl2.hpp header download
- clBLAS build
- clFFT build
- CLBlast build

Use clBLAS and clFFT via add_subdir instead of external project
@9prady9 9prady9 merged commit f1e64bf into arrayfire:master Feb 17, 2021
@9prady9 9prady9 deleted the fetch_content_deps branch February 17, 2021 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants