Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.

Standard FindBoost does not support CONFIG. #174

Closed
moubctez opened this issue Sep 19, 2019 · 3 comments
Closed

Standard FindBoost does not support CONFIG. #174

moubctez opened this issue Sep 19, 2019 · 3 comments

Comments

@moubctez
Copy link

Requirement - what kind of business use case are you trying to solve?

Adding jaeger-client-cpp to CMakeFile.txt as a dependency.

Problem - what in Jaeger blocks you from solving the requirement?

There is a problem configuring a project that depends on jaeger-client-cpp. When using
find_package(jaegertracing CONFIG REQUIRED) the process fails.

Proposal - what do you suggest to solve the problem or improve the existing situation?

Standard FindBoost does not support CONFIG flag. This patch solves the problem:

--- cmake/Config.cmake.in.orig
+++ cmake/Config.cmake.in
@@ -13,7 +13,7 @@ foreach(dep IN LISTS package_deps)
 endforeach()
 
 set(boost_components @boost_components@)
-find_package(Boost CONFIG REQUIRED ${boost_components})
+find_package(Boost REQUIRED COMPONENTS ${boost_components})
 
 check_required_components("@PROJECT_NAME@")
 

There is a drawback. If a project also requires Boost, its find_package(Boost must come last.

For example:

find_package(jaegertracing CONFIG REQUIRED)
find_package(Boost COMPONENTS system program_options REQUIRED)

works.

While

find_package(Boost COMPONENTS system program_options REQUIRED)
find_package(jaegertracing CONFIG REQUIRED)

fails.

@weinrea
Copy link

weinrea commented Oct 17, 2019

I am facing the same issue but your workaround did not do it for me.
The problem is that thirft also does not have a cmake config file for v0.12 but and more recent versions removed the stdcxx.h header used by jaeger_types.h

@xd009642
Copy link

Is boost even necessary? I can't see any use of the boost namespace or headers in the source code and it's only in the jaegertracingConfig.cmake.

I'm also not sure why this fails for me as well given I have boost on my system. Though looking at the cmake logs Hunter decided to download boost during the make install... It would be nice if Hunter could be opt-out (as an aside)

@david-antiteum
Copy link

I found the same problem with Boost and it seems that it is not necessary at all (from my open case #156 ). And I'm also affects the Thrift problem mentioned by @weinrea, so I have opened a new case: #195

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants