[CMake] Running library tests under MSVC2010

Martin Sustrik sustrik at 250bpm.com
Fri Oct 19 03:52:55 EDT 2012


Hm,

Another problem. While individual test now runs OK, changing the test 
executable location via RUNTIME_OUTPUT_DIRECTORY seems to confuse 
RUN_TESTS project which is now unable to find the executables.

Martin

On 2012-10-19 09:33, Martin Sustrik wrote:
> Nils,
>
> Thanks, that helps to solve the issue. Now the library is correctly
> loaded. However, debug info is still missing. Any idea of how to make
> the tests debuggable?
>
> Martin
>
> On 2012-10-19 09:04, Nils Gladitz wrote:
>> 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
>
> --
>
> 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



More information about the CMake mailing list