Olivier Delannoy wrote:
I have probably wrongly explained my issue. I have my source code
located in several folders based on the component / library they are
part of. But I don't want to have recursive make so I don't want to
have my project relying on add_subdirectory(). Thus all my target are
located in the main directory and refers to file located in different
folders relative to the current hierarchy. I don't think there is
anything wrong with that and I know how to do it. However, I would
like to be able to ensure that only the library/component that use a
library have access to the header file of that library.


Why are you afraid of recursive make? CMake does not generate makefiles like that anyway. It does use some recursive make, but will use that regardless of add_subdirectory or not. It is needed to get depend information to work correctly, and to make sure everything is up-to-date and in place before the build. CMake will do the right thing if you use add_subdirectory.

-Bill
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to