[CMake] MinGW: running test driver fails, dll not found

David Cole david.cole at kitware.com
Mon Aug 9 19:24:13 EDT 2010


You could set this target property:
http://cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:RUNTIME_OUTPUT_DIRECTORY

Or this variable prior to defining any targets:
http://cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_RUNTIME_OUTPUT_DIRECTORY

...to put all the runtime (exe and dll) output files in the same directory
with each other...

That's really the easiest thing to do for a multi-dll windows build of a
project.


HTH,
David


On Mon, Aug 9, 2010 at 6:54 PM, Daniel Franke <franke.daniel at gmail.com>wrote:

>
> Hi all.
>
> I wrote some unit tests for a library target in my project. A driver
> application links the library and runs the tests. This works fine with
> Makefile targets on Linux. With MinGW Makefiles on Windows, the driver
> properly links, but when running `make test`, the system complains that it
> can
> not find the dll linked previously ("The application has failed to start
> because target.dll was not found. [...]").
>
> Is there any cmake-magic that would allow to run `make test` on MinGW
> similar
> to any Linux or Mac environment, i.e. without any manual steps? Anything
> but a
> custom target to copy the dll in question into the directory of the test
> driver or modifying %PATH%?
>
> Thanks
>
>        Daniel
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100809/045cb805/attachment.htm>


More information about the CMake mailing list