I've used that once and you end up with the relative path to the sources from the CMakeLists.txt. If you're in another CMakeLists.txt, then you can't use the paths directly. I tried a few properties but I couldn't find any property to get the folder where the target was defined.

How do you get the full path?

/Orphis

On 17/07/2015 17:50, Brad King wrote:
On 07/15/2015 10:38 PM, Clifford Yapp wrote:
Lists that contains a verbatim collection of all path specifiers,
regardless of form, that are passed to the various add_* targets would
be enough, I think - it'd then be up to our own CMake logic to make
sense of it all.  I'm not hoping to push our whole
in-src-dir/distcheck system into mainstream CMake, just looking for a
way to achieve the current result without requiring the
built-in-command overrides - I think collecting raw lists of paths
supplied to targets is the key piece that is currently driving the
command overrides.
Once the list of all targets is available in a global property as
discussed in another branch of this thread, then you could loop
over that and check the SOURCES target property to get the list
of original path specifiers.  That would handle almost everything.
What would be left for your use case?

-Brad


--

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:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to