[CMake] Running library tests under MSVC2010
Nils Gladitz
gladitz at sci-vis.de
Fri Oct 19 03:04:49 EDT 2012
When you run your test binary windows will look for the DLL:
- in the path of your test binary
- the current working directory
- the directories in your PATH environment variable
- ...
Personally I put all binaries (executables and DLLs) into a single
output directory by setting the RUNTIME_OUTPUT_DIRECTORY target property.
The sources can stay distinct that way though the output directory does
get a bit crowded.
Nils
On 10/19/2012 08:48 AM, Martin Sustrik wrote:
> Hi all,
>
> I have a library project with some assocaited tests.
>
> The library is build in myproject/src directory, while tests are built
> in myproject/tests directory.
>
> Everything builds fine under MSVC2010, resulting DLL is stored in
> myproject/src/Debug.
>
> However, if I try to run the test, it complains that the DLL cannot be
> found.
>
> The dependency of test project on the library project seems to be set
> correctly.
>
> Any ideas?
> Martin
> --
>
> 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
--
Nils Gladitz, B.Sc.
DICOM, Konnektivität und Entwicklung
Scivis wissenschaftliche Bildverarbeitung GmbH
Bertha-von-Suttner-Str. 5
D-37085 Göttingen
GERMANY
Handelsregister Nr. / Trade Register No. B3100 Göttingen
Geschäftsführer / Managing Directors Dr. Gernot Ebel, Dr. Uwe Engeland
Tel: 0049 (0)551 634181-28
E-Mail: gladitz at scivis.de
Web: www.scivis.de
More information about the CMake
mailing list