Coder Social home page Coder Social logo

Comments (3)

Kojoley avatar Kojoley commented on June 30, 2024

Could you please check that CMake adds -DBOOST_DYN_LINK? I couldn't find BOOST_DYN_LINK anywhere in CMake, which means it is a CMake bug. From my understanding it should've add it when you do set(Boost_USE_STATIC_LIBS OFF).

from config.

jppgmx avatar jppgmx commented on June 30, 2024

I did the test adding:

#ifndef BOOST_DYN_LINK
    #error "Preprocessor not defined"
#endif

Regardless of whether you add Boost::disable_autolinking or not, the macro is not defined.

from config.

Kojoley avatar Kojoley commented on June 30, 2024

Meh, you would not be able to test BOOST_DYN_LINK from the user code, it is being undefined here

#if defined(BOOST_DYN_LINK)
# undef BOOST_DYN_LINK
#endif

BOOST_DYN_LINK seems to be an 'internal' macro that a library which uses auto_link.hpp configures, the user controlled macros are: BOOST_ALL_DYN_LINK and BOOST_<WHATEVER>_DYN_LINK (BOOST_THREAD_DYN_LINK in your case). It means that set(Boost_USE_STATIC_LIBS OFF) should either make CMake add BOOST_ALL_DYN_LINK on everything or target_link_libraries(ProjName PUBLIC Boost::thread) should add BOOST_THREAD_DYN_LINK.

There are related tickets on CMake bug tracker:
https://gitlab.kitware.com/cmake/cmake/-/issues/16484
https://gitlab.kitware.com/cmake/cmake/-/issues/17241
https://gitlab.kitware.com/cmake/cmake/-/issues/16699

from config.

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.