[CMake] Trying to link my project with Boost.Thread using CMake

Philip Lowman philip at yhbt.com
Mon May 24 09:38:39 EDT 2010


I'm not sure what the problem is exactly, but I've seen that kind of error
message before so I think it's just a configuration problem.  What version
of CMake are you running?

On Sun, May 23, 2010 at 11:38 AM, Clark Gaebel <cg.wowus.cg at gmail.com>wrote:

> Yeah. Sorry, in my effort to remove the extra cruft I messed that up.
> Just image they're matching :)
>
> On 05/23/10 11:36, Philip Lowman wrote:
> > On Sun, May 23, 2010 at 10:31 AM, Clark Gaebel <cg.wowus.cg at gmail.com
> >wrote:
> >
> >
> >>  When I link Boost.Thread to my boost_test executable, it gives me
> >>
> >> make[2]: *** No rule to make target `/usr/lib64/libboost_thread-mt.so',
> needed by `gogo/test/test_boost'.  Stop.
> >>
> >> when I make it. Here's the offending CMake code, what am I doing wrong?
> >>
> >> add_executable(test_boost test_boost.cpp)
> >> add_test(test_boost test_boost)
> >> # Boost auto-links for MSVC, so we exclude
> it.if(CMAKE_COMPILER_IS_GNUCXX)
> >>     target_link_libraries(test_boost #LINK_INTERFACE_LIBRARIES
> >>         ${Boost_THREAD_LIBRARY}
> >>     )
> >> endif()
> >>
> >>
> > Don't you want:
> > target_link_libraries(boost_test ${Boost_THREAD_LIBRARY})
> > instead of "test_boost"?
> >
> >
>
> --
> Regards,
> -Clark
>
>


-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100524/ab75454a/attachment.htm>


More information about the CMake mailing list