Open marakew opened 1 year ago
What specific problem are you having?
i want set manual external library instead use find_package
as example set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB 1) set(ZLIB_FOUND 1) add_library(ZLIB::ZLIB UNKNOWN IMPORTED) ...etc
but with REQUIRED keyword i got always fail to processing cmake
Does this refer to a Boost built with b2
or to one built with CMake?
If with CMake, the config files don't use find_package
or REQUIRED
; they use find_dependency
(e.g. find_dependency(ZLIB)
. This macro automatically sets QUIET
or REQUIRED
to match the parent find_package
call. So if you call find_package(boost_iostreams REQUIRED)
, it will invoke find_package(ZLIB REQUIRED)
, but if you call find_package(boost_iostreams)
, it will invoke find_package(ZLIB)
. This is standard CMake behavior.
Opened a CMake issue about this at https://gitlab.kitware.com/cmake/cmake/-/issues/24293.
you seems dont understand me i don't want use find_package at all i want rewrite it by my own infrastructure with REQUIRED in boost it will impossible
my above example will work it REQUIRED will drop from find_package and users will able to rewrite by own env settings without using find_package for searching
2023-01-08 19:57 GMT+02:00, Peter Dimov @.***>:
If with CMake, the config files don't use
find_package
orREQUIRED
; they usefind_dependency
(e.g.find_dependency(ZLIB)
. This macro automatically setsQUIET
orREQUIRED
to match the parentfind_package
call. So if you callfind_package(boost_iostreams REQUIRED)
, it will invokefind_package(ZLIB REQUIRED)
, but if you callfind_package(boost_iostreams)
, it will invokefind_package(ZLIB)
. This is standard CMake behavior.-- Reply to this email directly or view it on GitHub: https://github.com/boostorg/cmake/issues/34#issuecomment-1374891778 You are receiving this because you authored the thread.
Message ID: @.***>
So, your complaint is not about find_dependency(ZLIB)
in the installed CMake config files, but (for example) about this use of find_package
:
yes and all another "required" with may present or will present in boost/cmake infrastructure just remove it to allow users ovewrite by own libs settings
2023-01-09 1:25 GMT+02:00, Peter Dimov @.***>:
So, your complaint is not above
find_dependency(ZLIB)
in the installed CMake config files, but (for example) about this use offind_package
:-- Reply to this email directly or view it on GitHub: https://github.com/boostorg/cmake/issues/34#issuecomment-1374958322 You are receiving this because you authored the thread.
Message ID: @.***>
can you please drop it let rewrite it by CMAKE_DISABLE_FINDPACKAGE
thanks