-
Notifications
You must be signed in to change notification settings - Fork 1.1k
referring AWSSDK targets in cmake #953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I recommend using the first method. |
Thank you, Marco. Any comments on question #2? (apologies, I am learning cmake right now, watched "modern cmake" videos literally yesterday :) ) |
reading the source obviously is the ultimate truth. But, idiomatically, |
... but "modern cmake" outlaws usage of Looks like there is no way to discover imported targets given find module introduces... well, besides reading source code. Thank you! |
wait, I might have misunderstood your question then. |
Another problem is that find module behaviour is often controlled by variables set externally (fundamentally flawed idea -- they should be passed as arguments to |
Example: after |
ah! I think you mean components when you say imported targets. In general, a package that does not have components (like curl), should drag in its deps as targets, but in most cases, you wouldn't need to know about those targets/deps. In the AWSSDK case, we have many components and like I said in my first comment, we have some work to do there to make our build story more modern. |
I may be misusing terminology here. In case of single library (e.g. In case if I import more complex package -- there in no way to discover which targets (if any) it will create for me... because cmake find modules are effectively black boxes and there is no way to "probe" it dynamically -- you just "have to know" that |
@crusader-mike
Without worrying about that |
@singku, thank you. |
I am updating our codebase to use cmake and having difficulty with linking with AWS SDK (and learning cmake as I go). Apparently there are two ways to reference SDK:
old one (apparently it is deprecated?):
related find module creates imported target
aws-cpp-sdk-core
that drags in required dependencies removing some of my headaches (selecting correct ssl library, etc). CMake guidelines suggest using "namespaces" (i.e. target should be namedaws-cpp-sdk-core::<smth>
), but it is not fatal...new one:
unfortunately it doesn't seem to follow ideas introduced by "modern cmake" -- it doesn't create imported targets, thus forcing me to take care of aws-cpp-sdk-core dependencies (like ssl libs, etc).
I have two questions:
The text was updated successfully, but these errors were encountered: