[cmake-developers] Generator Expressions and packages (Was: target_link_libraries and --start-group/--end-group ?)
Robert.Goulet at autodesk.com
Wed Jan 14 11:20:52 EST 2015
To be honest I haven't spent much time trying to learn 'imported' libraries with CMake. It was already difficult to deal with commands that don't support generator expressions versus those that does. It wasn't clear which commands we should not try to use because of that, and in the end we had to rewrite part of the CMakeLists.txt file because we wanted to use generator expressions and packages.
Talking about that, what is the correct way to use generator expressions in a context of packages? find_library does not support generator expressions, so right now in our Find files we don't use it, we just set variables instead.
For example, consider the following external library setup:
How does one deal with such a setup, when all versions of the library use the same name, but in different paths, within a package context? It would have been nice if find_library supported generator expressions. But maybe I misunderstood how to properly deal with that?
From: cmake-developers [mailto:cmake-developers-bounces at cmake.org] On Behalf Of Stephen Kelly
Sent: Tuesday, January 13, 2015 5:49 PM
To: cmake-developers at cmake.org
Subject: [cmake-developers] Generator Expressions and packages (Was: target_link_libraries and --start-group/--end-group ?)
Robert Goulet wrote:
> Using Brad's method of link multiplicity is too much work because we
> make use of packages and heavy generator expressions, making it a lot
> more difficult and much less elegant.
We have not had much external feedback from the generator expressions and IMPORTED targets in packages features, so this is interesting to me.
Can you say what you rely on those features for? Which generator expressions you use? Limitations you hit? Experience learning to use the features?
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
More information about the cmake-developers