I was playing with the C++ Boost.Process library (v1.68) and am using cmake to compile.
I found it surprisingly difficult to know which cmake component (or even boost compiled library) a particular boost header/library requires. There are various similar Stackoverflow topics (some linked below), but most are very specific, fairly old, or end up in long discussions without really satisfying solution, and I am surprised that such a widely used collection of libs wouldn't have a simple section in the docs saying e.g. "Boost process requires X and Y" (or at least I could not find it).
I initially got tricked by boost listing Boost.Process as "header only". Same e.g. at https://stackoverflow.com/a/45946466/8224596. From what I can gather however, it seems to me that "header only" for boost only means "no additional code to compile apart from other boost components". I mistakenly thought the "Categories" in the boost lib list were an indicator to which libs they depend on, but that turns out to be wrong as well.
Thus question remains open... How do I know which compiled libraries a boost library depends on?
The only reliable solution I have found so far is a boost lib tool "bcp" (inspired by How to find out what dependencies (i.e other Boost libraries) a particular Boost library requires?). When I run bcp --list boost/process/child.hpp
(which is the only header I use), I get a long list of files, ending with
[...]
boost/winapi/synchronization.hpp
boost/winapi/time.hpp boost/winapi/wait.hpp
libs/filesystem/build/Jamfile.v2
libs/filesystem/src/codecvt_error_category.cpp
libs/filesystem/src/operations.cpp
libs/filesystem/src/path.cpp
libs/filesystem/src/path_traits.cpp
libs/filesystem/src/portability.cpp
libs/filesystem/src/unique_path.cpp
libs/filesystem/src/utf8_codecvt_facet.cpp
libs/filesystem/src/windows_file_codecvt.cpp
libs/filesystem/src/windows_file_codecvt.hpp
libs/system/build/Jamfile.v2
libs/system/src/error_code.cpp
This would indicate that there are some dependencies on the boost components filesystem and system (for my v.1.68, I believe this would be different for 1.69 since system is now header only according to the docs).
This works, but the original topic is 8 years old. Is there a better way to get information about dependencies than bcp
(e.g. a doc page I missed...)?
I the worst case, I hope this may help someone else going through the same process.
Thanks!