FetchContent: Missing NETRC/NETRC_FILE support
According to 3.11 release notes:
- The file(DOWNLOAD) and file(UPLOAD) commands gained NETRC and NETRC_FILE options to specify use of a .netrc file.
Unfortunately, there is no support for FetchContent, so when I want to use it for downloading the package from artifact repo that requires authentication, the following code fails:
FetchContent_Declare( my_package URL "https://artifact-repository.com/repo/package.zip" )
The workaround I found is to use
FetchContent_Declare this way:
file(Download "https://artifact-repository.com/repo/package.zip" "outout_folder/package.zip") FetchContent_Declare( my_package URL "outout_folder/package.zip" )
It doesn't look well. I hope you could improve it.