[CMake] Unable to locate the project's shared library when running the tests
Yaron Cohen-Tal
yaronct at gmail.com
Wed Sep 2 03:40:49 EDT 2015
Hi,
My project is a shared library, and my tests are linked to that shared
library. When I try to run the tests, they fail because they can't find the
DLL of the project. The "CMakeLists.txt" of the tests is in a different
folder ("test/") than that of the shared lib ("src/"), and therefore
they're built in different directories. Currently I'm using Visual Studio,
and the DLL of the project is built in "src\Debug\", and the executables of
the tests are built in "test\Debug\"; That is, for a debug build of course.
What would be the best solution to b able to run the tests? I'm currently
with Visual Studio but I guess the same problem would arise on Linux and OS
X, and it should work there too.
Thanx,
Yaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150902/dccc370f/attachment.html>
More information about the CMake
mailing list