[CMake] CTest: Toggling BUILD_TESTING triggers a project recompile

Adolfo Rodríguez dofo79 at gmail.com
Tue Mar 24 10:28:50 EDT 2009


Thanks Bill, effectively part of a project was setting a -D flag based on
the value of BUILD_TESTING. Refactored some code and everything is behaving
as expected now :)

Cheers

2009/3/23 Bill Hoffman <bill.hoffman at kitware.com>

> Adolfo Rodríguez wrote:
>
>> I'm not setting any -D flags that depend on BUILD_TESTING. I only use the
>> variable to guard entering the subdirectories where tests are generated:
>>
>> if(BUILD_TESTING)
>>  add_subdirectory(test)
>> endif(BUILD_TESTING)
>>
>> I am working in a project that adds a test subfolder to each folder where
>> a target is generated. Could this be it? However, no source files (or its
>> associated flags) are being changed. I'm just preventing CMake from entering
>> the test dirs.
>>
>>
> Try make VERBOSE=1 more make -d to figure out why it is rebuilding.  It
> should not.
>
> -Bill
>



-- 
Adolfo Rodríguez Tsouroukdissian

Robotics engineer
PAL ROBOTICS S.L
http://www.pal-robotics.com
Tel. +34.93.414.53.47
Fax.+34.93.209.11.09
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090324/4eb505c8/attachment.htm>


More information about the CMake mailing list