On Fri, May 18, 2012 at 1:15 AM, David Doria daviddo...@gmail.com wrote:
Yeah. Well, in that case I'd simply check for the TestB target thats
defined in TestB/CMakeLists.txt as condition for the top-levels
add_subdirectory:
if(NOT TARGET TestB)
add_subdirectory(TestB)
endif()
That
I have a main project (called Test) that has two submodules, TestA and
TestB. TestA also has a submodule, which is exactly the same TestB.
So there is a directory Test/TestB as well as Test/TestA/TestB
In TestA/CMakeLists.txt, I have add_subdirectory(TestB).
In Test/CMakeLists.txt, I have
Hi,
On Thu, May 17, 2012 at 11:20 PM, David Doria daviddo...@gmail.com wrote:
I have a main project (called Test) that has two submodules, TestA and
TestB. TestA also has a submodule, which is exactly the same TestB.
So there is a directory Test/TestB as well as Test/TestA/TestB
In
Why are you doing that? If TestB is always available as sub-dir under
TestA it doesn't make much sense to also add it as a subdirectory of the
parent of TestA - IMHO. Test/CMakeLists.txt can still use all targets from
TestB, since target names are always valid across the complete project.
Hi,
On Thu, May 17, 2012 at 11:36 PM, David Doria daviddo...@gmail.com wrote:
Why are you doing that? If TestB is always available as sub-dir under
TestA it doesn't make much sense to also add it as a subdirectory of the
parent of TestA - IMHO. Test/CMakeLists.txt can still use all targets
Yeah. Well, in that case I'd simply check for the TestB target thats
defined in TestB/CMakeLists.txt as condition for the top-levels
add_subdirectory:
if(NOT TARGET TestB)
add_subdirectory(TestB)
endif()
That should work.
Andreas
Awesome, that seems to do the trick. Thanks!
David