[CMake] Re: Is it possible to link against libraries, built in another cmakelists.txt ?

Matthew Woehlke mw_triad at users.sourceforge.net
Wed Jun 6 14:51:49 EDT 2007


Alexander Ivash wrote:
> Hello, cmake.
> 
> Is the subj is possible? I have two cmake-managed projects: the library and tests. And this tests need to
> be linked against the library. How can I get such result? (Of course I can place tests and library into
> the same cmakelists.txt, but I think there will be a lot of tests and I don't want to pollute
> library+examples+tools solution with tests, that is whyI created different project for tests)

Have you considered instead 'ADD_SUBDIRECTORY(tests EXCLUDE_FROM_ALL)'? 
Then you can have one project, but the tests aren't built by default.

-- 
Matthew
...yzarc gniog ylwols era uoY



More information about the CMake mailing list