Coder Social home page Coder Social logo

Disable Hunter per default about hunter HOT 7 CLOSED

cpp-pm avatar cpp-pm commented on July 4, 2024
Disable Hunter per default

from hunter.

Comments (7)

bkotzz avatar bkotzz commented on July 4, 2024 1

(maybe they use a system package manager like apt get, maybe another c/c++ package manager like Conan, maybe they use submodules and build deps from source, etc)

I never ever recommend that, that means that identical code isn't being compiled and used in all locations, you get non-reproducible builds and you lose a lot of LTO. A nice thing about hunter is it works with anything else as well.

Whether you, I or anyone else recommends it or not, lots projects do use those methods. The hunter_enabled flag let’s hunter coexist with those methods in projects that don’t want to change for whatever reason.

from hunter.

Bjoe avatar Bjoe commented on July 4, 2024

May I ask, why you are not add a HUNTER_ENABLED option with a default value NO in your project like I did

cmake_minimum_required(VERSION 3.2.0)

option(HUNTER_ENABLED "Enable Hunter package manager" NO)
include("cmake/HunterGate.cmake")
HunterGate(
    URL "https://github.co.............."
    SHA1 "....................."
    LOCAL
....
)

See https://github.com/pocoproject/poco/blob/f74be1d9e50a5d95c7758bb4bb89d888f54b4e52/CMakeLists.txt

To change this behaviour in hunter now means globally, will effect all users/builds/what ever!

from hunter.

NeroBurner avatar NeroBurner commented on July 4, 2024

that's exactly what I did, and what (IMHO) every developer does when he/she shares a project with other developers. Why require every programmer to add the option override to all the projects?

from hunter.

OvermindDL1 avatar OvermindDL1 commented on July 4, 2024

Most of us prefer it to default to YES is why I would imagine. ^.^

from hunter.

bkotzz avatar bkotzz commented on July 4, 2024

I’m not sure I understand the motive here. That flag mostly exists for projects that already have another way to download/build their dependencies (maybe they use a system package manager like apt get, maybe another c/c++ package manager like Conan, maybe they use submodules and build deps from source, etc). It’s useful when contributing to upstream projects, to convince them to support hunter without needing hunter.

But there are also lots of projects that only use hunter, or use hunter by default, and this change would break their build until they set the option back on.

That’s a pretty invasive change. I’d only consider this if a fair amount of people are interested

from hunter.

OvermindDL1 avatar OvermindDL1 commented on July 4, 2024

(maybe they use a system package manager like apt get, maybe another c/c++ package manager like Conan, maybe they use submodules and build deps from source, etc)

I never ever recommend that, that means that identical code isn't being compiled and used in all locations, you get non-reproducible builds and you lose a lot of LTO. A nice thing about hunter is it works with anything else as well.

from hunter.

rbsheth avatar rbsheth commented on July 4, 2024

Most usage of HUNTER_ENABLED is in third-party projects that do not use Hunter but accept our modifications to support their package. To default it to disabled is counter-intuitive behavior, especially for new users. You can always set the option in your project if you want it off. 😄

from hunter.

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.