[CMake] General questions re. CTest

Andy Cedilnik andy.cedilnik at kitware.com
Thu Sep 29 08:19:08 EDT 2005


Hi Anton,

If you are using CTest, you can disable individual warnings or errors.
Please check:

http://www.cmake.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest

In CTest 2.2 there is a way to negate the result of the test, but it
currently only works for return value. I guess we could add more
elaborate testing that would say for example it is ok to throw exception...

Please put a feature request to the cmake bug tracker.

       Andy

Anton Deguet wrote:

>Hello,
>
>I have been using CTest in combination with Dart pretty happily so far.
>I have two minor questions:
>
>-1- For our libraries, we have a macro to tag a function/class/method as
>deprecated.  Since we are using multiple compilers, the implementation
>of this macro is not always the same and sometimes not defined therefore
>it would be nice to actually compile using deprecated methods and test
>that these warnings are here.  Right now, using Dart2, they show up as
>compilation warnings which is not what I want.
>
>-2- Some of our code is based on "abort()".  I would like to test that,
>in some known conditions, my test program will actually abort.  Again, I
>don't really know how to write a CTest test case for this kind of
>problem.
>
>Has anyone tried to perform some similar "negative testing" with CMake,
>any useful links?
>
>Thanks,
>
>Anton
>
>
>
> 
>  
>


-- 
Andy Cedilnik
Kitware Inc.



More information about the CMake mailing list