[CMake] unit test issue

Surya Kiran Gullapalli suryakiran.gullapalli at gmail.com
Fri Feb 19 01:41:29 EST 2010


Hello all,
I'm facing a problem where in I build a shared library and and a unit-test
executable (which is in a sub directory)
I want to execute this test as a POST_BUILD operation for the shared
library. So I gave

Add_Custom_Command (TARGET ShLibName POST_BUILD COMMAND unit_test_exe)

CMake throws an error message during generation process
========
CMake Error: The inter-target dependency graph contains the following
strongly connected component (cycle):

 "libCUEUtilities" of type SHARED_LIBRARY

depends on "UtilitiesUnitTest"

"UtilitiesUnitTest" of type EXECUTABLE

depends on "libCUEUtilities"

At least one of these targets is not a STATIC_LIBRARY. Cyclic dependencies
are allowed only among static libraries.

========


So, How can i achieve what i'm trying to do.


I'm using CMake 2.8.1 (RC3) with VS2005 generator.


Thanks in advance,

Surya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100219/7fd706a6/attachment.htm>


More information about the CMake mailing list