[package] boost/*: CMakeDeps generator broken for Conan 1.51.0
See original GitHub issuePackage and Environment Details
- Package Name/Version: conan/1.79.0
- Operating System+version: Fedora Linux 36
- Compiler+version: GCC 12
- Conan version: conan 1.51.0
- Python version: Python 3.10.5
Conan profile
conan profile show linux/gcc/debug Configuration for profile linux/gcc/debug:
[settings] os=Linux arch=x86_64 compiler=gcc compiler.version=12 compiler.libcxx=libstdc++11 compiler.cppstd=17 build_type=Debug [options] [conf] [build_requires] [env]
Steps to reproduce
- Use CMakeDeps generator with the Boost package from Conan Center as a
requires
. - Run
conan install
. - Run
conan build
, where the configure stage of CMake will fail.
Logs
Click to expand log
CMake Error at build/Boost-Target-debug.cmake:1274 (target_link_libraries):
Cannot specify link libraries for target "boost::boost" which is not built
by this project.
Call Stack (most recent call first):
build/BoostTargets.cmake:26 (include)
build/BoostConfig.cmake:10 (include)
CMakeLists.txt:1 (find_package)
-- Configuring incomplete, errors occurred!
Issue Analytics
- State:
- Created a year ago
- Comments:20 (15 by maintainers)
Top Results From Across the Web
Changelog — conan 1.56.0 documentation
Fix: Clang compiler check in cmake generator. Fix: Detection of Zypper package tool on latest versions of openSUSE. Fix: Improved help output of...
Read more >Why do some Conan packages delete CMake ...
I can make and consume packages with that generator no problem. I'm now trying to comsume a number of third party libraries, namely...
Read more >conan Changelog - pyup.io
Bugfix: The `CMakeDeps` generator was not working properly when the consumer ... 1.51.0. - Feature: Update system package manager db right before install, ......
Read more >conanio/conan
liberforce yeah, I first tried with adding boost/1.66.0@conan/stable to my ... on Freenode Can you add an argument to a generator in a...
Read more >Why is it that package managers are unnecessarily hard?
-GNinja. And here is my conanfile.txt [requires] boost/1.80.0 fmt/9.1.0 pcapplusplus/22.05 [generators] CMakeDeps CMakeToolchain.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I re-created a minimal example project demonstrating the problem. Due to the fact the release notes mentioned GLOBAL target behavior, I deduced the problem only occurred when using multiple
CMakeLists.txt
files throughadd_subdirectory
.CMakeLists.txt
:src/CMakeLists.txt
:I finally manage to reproduce it. Now I can hunt the bug, million thanks for your help.