On 2016-08-16 at 20:14 -0500, Nicholas Braden wrote:
> Ah, I misunderstood what you were asking about. It would be pretty
> weird if CMake didn't know that static libraries always need all
> their
> dependencies linked regardless of privacy, but I agree it should at
> least be mentioned somewhere. My bad.
> 
> As for include path bloat, I cannot replicate this in my test project
> - CMake will link all the dependencies as required but will NOT
> violate "PRIVATE" for other things like include directories. Could
> you
> give an example where you are seeing a static library's private
> dependency's include path being added when linking the static
> library?

Please take a look at https://github.com/intelfx/cmake-demo. This is a
sample dependency chain of two libraries and one executable (client ->
foo -> bar), both libraries are found and linked as IMPORTED targets. 
The client is built with VERBOSE=1 -- notice the compiler command
lines.

On my system it says (pretty self-explanatory):

/usr/bin/c++    -isystem 
/home/intelfx/devel/__auxiliary/experiments/cmake-static-transitive/prefix/foo/include
 -isystem 
/home/intelfx/devel/__auxiliary/experiments/cmake-static-transitive/prefix/bar/include
   -o CMakeFiles/client.dir/src/
main.cpp.o -c 
/home/intelfx/devel/__auxiliary/experiments/cmake-static-transitive/client/src/main.cpp

-- 
Ivan Shapovalov / intelfx /

Attachment: signature.asc
Description: This is a digitally signed message part

-- 

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

Reply via email to