[CMake] How to integrate Ctest onto CMake build?

Mathieu Malaterre mathieu.malaterre at gmail.com
Fri Jan 23 07:40:45 EST 2009


On Fri, Jan 23, 2009 at 6:43 AM, Philip Lowman <philip at yhbt.com> wrote:
> On Thu, Jan 22, 2009 at 12:42 PM, Ashutosh Juneja
> <ashutosh.juneja at gmail.com> wrote:
>>
>> Hi,
>>
>> I am new to CMake/CTest infrastructure. I have built a project (c:\build)
>> from source code (c:\src) using cmake on windows. My aim is to integrate
>> CTest onto CMake build by running few regression tests. The testcases are
>> located at c:\tests.
>>
>> c:\test\test01
>> c:\test\test02
>> To run a test, i have to cd to area 'test01' and then execute perl
>> commands. I want to know:
>>
>> 1. At what location should i modify CMakeList.txt file to include ADD_TEST
>> commands? At c:\build or c:\src or c:\test?
>
> I suppose you could have the ADD_TEST commands be in either C:\src or
> C:\test.  Most people keep their tests in their source tree.  I think you
> should be able to include CMake code in C:\test, however, if this is what
> you want to do.

do not forget to call enable_testing() before.

Ref:
http://www.cmake.org/Wiki/CMake_Testing_With_CTest

-- 
Mathieu


More information about the CMake mailing list