Target Boost:: already has an imported location + link errors

后端 未结 1 1031
谎友^
谎友^ 2021-02-05 21:10

I\'m using Homebrew to install LLVM, Boost, and CMake on MacOS Mojave. After upgrading my LLVM to version 9.0.0 and Boost to 1.71.0, CMake (v3.15.3) started complaining about va

1条回答
  •  囚心锁ツ
    2021-02-05 22:10

    I asked about the CMake warning on Slack. As explained by Peter Dimov:

    this is because homebrew installs both multithreaded and single-threaded boost

    in addition, due to an issue in boost 1.71's cmake support, Boost_USE_MULTITHREADED is not respected

    I've fixed this for the next release

    you can define Boost_NO_BOOST_CMAKE=ON to get around it

    See https://github.com/boostorg/boost_install/issues/13, it should be fixed in the next release.

    January 22, 2020: Updating boost through brew upgrade boost to 1.72 and adding set(Boost_USE_MULTITHREADED TRUE) to my CMakeLists.txt has fixed this problem for me.

    0 讨论(0)
提交回复
热议问题