[CMake] Building tests only for "make test"

Marcel Loose loose at astron.nl
Fri Dec 11 12:16:47 EST 2009


Hi Stefan,

I once dug into this issue, because I wanted to (more or less) emulate
the GNU Autotools 'make check' feature. Have a look at
http://www.cmake.org/Wiki/CMakeEmulateMakeCheck and see if that answers
you question.

Best regards,
Marcel Loose.

On Fri, 2009-12-11 at 15:53 +0100, Dr. Stefan Sablatnög wrote:
> Hi all,
> 
>  
> 
> I face a (probably simple) problem:
> 
>  
> 
> I want to build a project, that includes tests, but these should not
> be build on 
> 
> default, so I added EXCLUDE_FROM_ALL to the add_executable command.
> 
>  
> 
> How can I force them to be built when testing ?
> 
> (we test through make test and continuously via a ctest script)
> 
>  
> 
> Is there a simple solution?
> 
>  
> 
> Thanks in advance 
> 
> Stefan
> 
> --
> 
>  
> 
> best regards
> 
>  
> 
> Dr. Stefan Sablatnög
> 
>  
> 
> email: stefan.sablatnoeg at svox.com
> 
> phone: ++49 731 15239474
> 
> address:
> 
> SVOX Ulm
> 
> Magirus Deutz-Straße 16
> 
> 89077 Ulm
> 
>  
> 
>  
> 
> 
> _______________________________________________
> 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