Re: [CMake] add_test() and DEBUG_POSTFIX

2013-03-25 Thread David Cole
If you use the NAME/COMMAND signature form of add_test, the COMMAND may be a 
target name, and if it doesn't "just work" at that point, it is a bug.

Also, for multi-config generators, you may need to use -C Release or -C Debug 
on the ctest command line to run the correct configuration.


On Mar 25, 2013, at 9:27 AM, Nils Gladitz  wrote:

> The second parameter to add_test is an executable name (it may be a script or 
> executable which may not even be build by cmake) rather than a target name so 
> I'd say this is by design.
> 
> Nils
> 
> On 03/25/2013 02:15 PM, Martin Baute wrote:
>> I did not get any feedback on this, so please excuse me asking again:
>> 
>> Is it by design that adding a DEBUG_POSTFIX to executables makes CMake
>> miss those very same executables when running "make test"?
>> 
>> It is a bit awkward having to chose between either:
>> 
>> A) having no postfix with executables, i.e. debug executables overwriting
>> release executables on installation
>> 
>> or
>> 
>> B) not having "make test" work properly when building anything else but
>> the default / release build type.
>> 
>> Regards,
> 
> 
> -- 
> 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: glad...@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
--

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

Re: [CMake] add_test() and DEBUG_POSTFIX

2013-03-25 Thread Nils Gladitz
The second parameter to add_test is an executable name (it may be a 
script or executable which may not even be build by cmake) rather than a 
target name so I'd say this is by design.


Nils

On 03/25/2013 02:15 PM, Martin Baute wrote:

I did not get any feedback on this, so please excuse me asking again:

Is it by design that adding a DEBUG_POSTFIX to executables makes CMake
miss those very same executables when running "make test"?

It is a bit awkward having to chose between either:

A) having no postfix with executables, i.e. debug executables overwriting
release executables on installation

or

B) not having "make test" work properly when building anything else but
the default / release build type.

Regards,



--
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: glad...@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


Re: [CMake] add_test() and DEBUG_POSTFIX

2013-03-25 Thread Martin Baute

I did not get any feedback on this, so please excuse me asking again:

Is it by design that adding a DEBUG_POSTFIX to executables makes CMake
miss those very same executables when running "make test"?

It is a bit awkward having to chose between either:

A) having no postfix with executables, i.e. debug executables 
overwriting

release executables on installation

or

B) not having "make test" work properly when building anything else but
the default / release build type.

Regards,
--
Martin Baute
so...@rootdirectory.de


Am 20.03.2013 12:51, schrieb Martin Baute:
In my CMakeLists.txt, I defined tests to be run when I call "make 
test":


add_executable( test_tu test/test_tu.cpp )
set( ALL_TARGETS ${ALL_TARGETS} test_tu )
add_test( test_tu test_tu )

I also configured to have a postfix "-debug" when building in that 
config,

so I could install release and debug versions side-by-side:

set_property( TARGET ${ALL_TARGETS} PROPERTY DEBUG_POSTFIX 
"-debug" )


However, when I build with CMAKE_BUILD_TYPE=Debug and call "make 
test",
the Makefile will try to call "test_tu" - not "test_tu-debug". 
Apparently,

the DEBUG_POSTFIX property is not considered by add_test().

Is this by design, a bug, or a faulty config on my part?

Regards,

--

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