[cmake-developers] add_custom_command differences in tests
Steve Wilson
stevew at wolfram.com
Tue Feb 11 19:02:48 EST 2014
Thank you, that fixed the problem I was seeing.
SteveW
On Feb 10, 2014, at 8:28 AM, Brad King <brad.king at kitware.com> wrote:
> On 02/07/2014 05:19 PM, Steve Wilson wrote:
>> On Feb 7, 2014, at 3:01 PM, Brad King wrote:
>>> -DCMAKE_BUILD_TYPE=\${CTEST_CONFIGURATION_TYPE}
>>
>> I have tried adding that to my test call (--build-options) but it doesn't seem to make any difference.
>
> Oops, I picked the wrong line for an example. We need to pass
> the test configuration to the invocation of ctest --build-and-test.
> In your example change:
>
> add_test(CustomCommand.CONFIG ${CMAKE_CTEST_COMMAND}
> --build-and-test
> ...
> )
>
> to:
>
> add_test(CustomCommand.CONFIG
> ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE}
> --build-and-test
> ...
> )
>
> That will ensure that the test project builds as the tested config.
>
> -Brad
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140211/5be6d74d/attachment-0002.sig>
More information about the cmake-developers
mailing list