Skip to content
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

Replace submodules by CMake's FetchContent #494

Open
mmoelle1 opened this issue Jul 17, 2023 · 0 comments
Open

Replace submodules by CMake's FetchContent #494

mmoelle1 opened this issue Jul 17, 2023 · 0 comments
Assignees

Comments

@mmoelle1
Copy link
Collaborator

Dear OpenQL developers,

may I suggest to replace the git submodules in the deps directory by CMake's FetchContent mechanism. It is as easy as potting the following code snippet into your CMakeLists.txt file

include(FetchContent)
FetchContent_Declare(openql
  URL https://github.com/QuTech-Delft/OpenQL/archive/refs/tags/v0.11.1.zip
  )

# Here you can `set` Make variables if needed

FetchContent_MakeAvailable(openql)
FetchContent_GetProperties(openql)
include_directories(${openql_SOURCE_DIR}/include)

This will download the archive, unpack it, and configure it to be used within the CMake project.

The problem with the current submodule approach is that tar.gz and zip archives of OpenQL are basically unusable due to the missing and not-obtainable submodule dependencies.

@rturrado rturrado self-assigned this Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants