Comments (16)
Couldn't you forward GitHub URLs on your side? Not having access to GitHub is unfortunate as many tools (not just project_options) rely on it.
PRs for adding options for the mirrors are welcome. It might be easier to maintain a fork with your special mirrors.
from project_options.
I also tried to forward it via /etc/hosts file, but I could not mange to forward https://github.com -> https://mycompany.corp/github-proxy/mirror/. As you mentioned, no access to GitHub complicate a lot of things. Do you have any suggestions how the forwarding would be possible on a linux machine?
I will think about a mirror option in case I cannot work out the forwarding.
from project_options.
you may try this: https://github.com/cpm-cmake/CPM.cmake#private-repositories-and-ci
from project_options.
Thanks for the link. But this works only for git right?
And I think
FetchContent_Declare(_ycm URL https://github.com/robotology/ycm/archive/refs/tags/v0.13.0.zip)
does not use git.
from project_options.
Take a look at this discussion. It shows how you can forward URLs in Linux
https://stackoverflow.com/questions/35370967/redirect-local-url-to-another-url
from project_options.
Sorry, our company rules are: no internet access on CI build.
this does not work on windows for us: https://github.com/aminya/project_options/blob/main/src/VCEnvironment.cmake#L70
Is this really necessary to use FetchContents
?
Would it be possible to use CMP.cmake
?
We have a local git mirror with selected git repos while build our SW projects on our CI.
from project_options.
I use project_options
always like this:
# see https://github.com/TheLartians/CPM.cmake for more info
include(cmake/CPM.cmake)
# see https://github.com/aminya/project_options for more info
CPMAddPackage("gh:aminya/[email protected]")
list(APPEND CMAKE_MODULE_PATH ${ProjectOptions_SRC_DIR})
#XXX list(APPEND CMAKE_MODULE_PATH ${project_options_SOURCE_DIR}/src) # the CPM.cmake way
from project_options.
Take a look at this discussion. It shows how you can forward URLs in Linux
https://stackoverflow.com/questions/35370967/redirect-local-url-to-another-url
@aminya This is not an option because of our company rules!
from project_options.
This is not an option because of our company rules!
Your company rules are too strict. You would have a better chance by emulating the internet via spawning a local HTTP server that returns your local files.
from project_options.
I am closing this issue as it is not related to project_options or any other tool that uses the internet. You have to fix the issues with proxy, forwarding, or emulation of the internet using your local servers on your side.
from project_options.
I am closing this issue as it is not related to project_options or any other tool that uses the internet.
Sorry, it is related to your project!
This extremely limit the usability of this project.
I am searching for a solution:
- you may not fetch zip archives but clone git repositories
- you may use
CPM.cmake
to fetch git repos and we may fill the CPM_SOURCE_CACHE - you may document and supports for each external package you net to fetch the
<dependency>_SOURCE_DIR
cmake variable, which is the path to the source of the dependency already installed on CI
The CMP.cmake
package-lock is in general a good idea to have control, which external dependency are used while build!
from project_options.
@aminya see ClausKlein#5 (the only change is to use git clone)
This would work at my company!
And much easier with CMP.cmake
instead of FetchContents
from project_options.
Well, the way you emulate the internet is not sufficient. Local git repositories are just a very small part of the internet. You should also run a local DNS server that returns the zip files. This way you can emulate the internet correctly.
The whole point of modern package managers like vcpkg and Conan is to not rely on the Git repositories that are slow, untested, mutable, and error-prone.
As I said this is out of the scope of a CMake build system. You should contact your IT specialists to set up a local DNS and Web server for you.
See
https://www.lafuente.me/posts/local-dns-and-web-server/
https://www.howtogeek.com/devops/how-to-run-your-own-dns-server-on-your-local-network/
from project_options.
I am not a friend of having such restrictions!
Our IT is given and may not changed or extended.
But we must have control what is need to build our SW.
We have to document and archive everything. (source, tools, build scripts, licence, ..)
And we want to reproduce a build if needed.
And, I like to be able to compile with my local cache, too if my internet is down.
from project_options.
The original issue is about Conan, which uses the internet (not git). The only solution to emulate the internet locally is to run a DNS server as I explained in
#145 (comment)
Still, both problems are out of scope.
from project_options.
@lefticus @aminya The problem is common and perhaps solved bye CMake v3.24
from project_options.
Related Issues (20)
- cmake policy warnings HOT 1
- Macro for installing conan HOT 3
- Doxygen options overwrite HOT 1
- Warning is valid for C++/ObjC++ but not for C
- Cross-compiling HOT 10
- conancenter remote name is not conan's default
- After 0.26, cmake configuration has fail with 'Unable identify compiler architecture for CMAKE_SYSTEM_PROCESSOR' HOT 16
- `target_link_system_directories` dosen't support generator expressions that have semicolons
- Conan server errors inside CI HOT 1
- Support Conan 2 HOT 9
- When compiling with LTO compiler warnings should be passed to the linker. HOT 2
- Add an option to enable GCC 10+ analyzer HOT 2
- Add utility function to check if sanitizers are supported
- dynamic_project_options:
- target_find_dependencies with COMPONENT HOT 2
- target_find_dependencies and pkg-config HOT 10
- Using clang-cl with ENABLE_COVERAGE lead to 'argument unused during compilation: '-O0'' HOT 1
- Bincrafter's Conan repo down HOT 5
- `target_link_system_libraries` might not work with unqouted inputs HOT 2
- Hardening and LTO are not set correctly when using a multi-configuration generator
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from project_options.