Comments (6)
Interesting, I've never thought of a use case for non-local sources for the build command, so I have never tested. Let me look into fixing this. However, for it to work even after a fix you will need to give a correct url, like cget build -c https://github.com/ruslo/sugar/archive/master.tar.gz
or cget build -c ruslo/sugar
from cget.
Looking at this more, I am not sure exactly how this will work, as there needs to be a local source directory for cmake. On the install
command, it creates a temporary directory to copy the source directory from remote urls, and then it deletes the temporary directory after install finishes. The build
command could do the same thing, but it seems very inefficient, as it will download a new source every time. It seems better to just do:
git clone https://github.com/ruslo/sugar
cget build -c sugar
Is there a reason this is not useful for your use case?
from cget.
The particular use case that is close to mine is following:
- I want to fetch and cmake-gui some package P.
- P has lots of dependencies and It is described by an external recipe R.
- I want cget to handle the dependencies as well as running the CMake.
If R directs to the local source then it will have no issues, but it does not make much sense. Then one needs to manually fetch the repo of P, then copy requirements.txt from R to the repo, and then build it via cget. This is a bit cumbersome, and moreover, resulting in modifying the repo itself. So it would be handy to avoid such situation.
As a suggestion, I think there should be some options to leave intermediate files anyway for both install and build commands, since it's quite often the case that one needs to review which CMake options have been applied to each dependent package, e.g. finding collision of std. library versions. Once that option becomes available, leaving them for the remote source can be easily done, I guess.
from cget.
The particular use case that is close to mine is following:
I want to fetch and cmake-gui some package P. P has lots of dependencies and It is described by an external recipe R. I want cget to handle the dependencies as well as running the CMake.
That makes a lot of sense. So instead of having cget build
take a non-local source directory, instead an extra flag(such as --from
or --fetch
) could be given to fetch the sources and then they will be stored in the source directory set by cget build
, something like this:
cget build -c . --fetch ruslo/sugar@master
Of course, this doesn't fetch the git repository as cget doesn't ever use git. Alternatively, I could add a flag to install
that will just install the dependencies of a recipe rather than installing the recipes. So you could clone the repo and install the dependencies from the external recipe.
from cget.
Either way would work.
from cget.
So I added the --fetch
flag on the fetch
branch already. Right now, there seems to be a problem with long names on windows, so I haven't merged it in yet.
from cget.
Related Issues (20)
- Show computed hash when hashes dont match
- File does not exists: /usr/local/etc/cget/recipes/pcre/package.txt HOT 1
- LD_LIBRARY_PATH doesn't get passed to package HOT 1
- Trying to install individual boost packages failed HOT 1
- global name 'lzma' is not defined HOT 1
- Using cget to manage dependencies that are constantly evolving together with main library HOT 2
- cget with cmake v3.14.0 HOT 4
- Is there a way to add "--parallel" when cmake build is done? HOT 2
- Add install/build options to requirements.txt HOT 5
- Automatically generated CMakeLists.txt ends in error for --cmake autotools HOT 3
- "cget install" fails for items accessible to wget; proxy consideration HOT 3
- cget doesn't run CTest tests in parallel
- build cache HOT 1
- bump required cmake version? HOT 1
- cmake integration HOT 3
- support osx multi-arch builds
- explain the idea begind tracking/parents/inheriting defines
- Consider releasing standalone setups for Windows using pyinstaller
- cget install with nonexistent file fails silently
- Repo description "C++ package retrieval" vs docs/pypi "Cmake package retrieval"
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 cget.