GithubHelp home page GithubHelp logo

Multiple versions of CPM? about cpm.cmake HOT 5 CLOSED

cpm-cmake avatar cpm-cmake commented on August 18, 2024
Multiple versions of CPM?

from cpm.cmake.

Comments (5)

TheLartians avatar TheLartians commented on August 18, 2024

Hey, thanks for the question, this is a common use case.

CPM always sticks with the first version imported, but emits a warning if a (semantic) newer version is requested. You can see the logic here. In your examples:

What happens if project A uses project B?

The Project uses CPM 0.27.5, but a warning is emitted that B requires the more recent 1.01.0

What happens if project B uses project A?

The Project uses CPM 1.01.0

What happens if project B uses project C?

The Project uses CPM 1.01.0

What happens if project C uses project B?

The Project uses CPM 0.10.0, but a warning is emitted that B requires the more recent 1.01.0

from cpm.cmake.

 avatar commented on August 18, 2024

Gotcha that makes sense.

Is something like this worth adding to the wiki/readme?

Or is this just expected cmake behavior? Because I believe vanilla FetchContent uses the same logic you described.

from cpm.cmake.

TheLartians avatar TheLartians commented on August 18, 2024

It's already kind-of mentioned in the: readme Dependencies using CPM will automatically use the updated script of the outermost project., but if you feel this isn't clear enough feel free to add it to the wiki. :)

from cpm.cmake.

 avatar commented on August 18, 2024

Yeah as soon as I said it, I started looking at the readme... and sure enough it was there. Sorry that's a bad habit of mine.

I think it's clear in the README.md, just that the readme is huge and my eyes tend to glaze when the readme is too large. It may be worth moving more stuff into the wiki. But that's just my opinion.

from cpm.cmake.

TheLartians avatar TheLartians commented on August 18, 2024

I think most of us have that habit. 😄

I agree that the README has gotten rather huge and we can probably outsource move some to the wiki. Thanks for noting it, once I have some spare time I'll see if I can slim things down.

from cpm.cmake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.