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

When the dependency package fails to download due to network issues, calling CPMAddPackage again will not attempt to download the dependency package again. #623

Open
web3hulei opened this issue Dec 4, 2024 · 0 comments

Comments

@web3hulei
Copy link

I used CPMAddPackage to download Boost. The specific command is as follows:

CPMAddPackage(NAME Boost
                              VERSION 1.86.0
                              URL https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-cmake.7z
                              OPTIONS "Boost_USE_STATIC_LIBS ON" "BOOST_INCLUDE_LIBRARIES multiprecision")

I configured the CPM_SOURCE_CACHE environment variable. The first time I ran the cmake command, CPMAddPackage attempted to download the Boost package and created the corresponding directory in the cache to store the source files. However, due to network issues, the download failed. The second time I ran the cmake command, CPMAddPackage did not attempt to download the package again. Instead, it assumed that Boost had been successfully downloaded and continued executing the subsequent commands. This caused the Boost target to fail to be created, leading to errors in the subsequent steps. Manually deleting the newly created Boost directory from the cache resolves the issue. Could you please let me know if there is any issue with how I am using CPMAddPackage?

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

1 participant