[cmake-developers] Expression unit test

Stephen Kelly steveire at gmail.com
Fri Oct 5 09:55:22 EDT 2012


Peter Kümmel wrote:

> A unit tests for expressions is broken for ninja:
> 
> http://open.cdash.org/testDetails.php?test=161505814&build=2596684
> 
> 
> ninja prints the wrong parameter as it is used in the cmake file,
> 
>      
include_directories("$<TARGET_PROPERTY:Invali/dTarget,INCLUDE_DIRECTORIES>")
> 
> but the test wants the $ escaped one:
> 
>    Expected stderr to match:
>     expect-err>     \$<TARGET_PROPERTY:Invali/dTarget,INCLUDE_DIRECTORIES>
> 
>    Actual stderr:
>     actual-err>     $<TARGET_PROPERTY:Invali/dTarget,INCLUDE_DIRECTORIES>
> 
> 
> Is this a bug in the test (and the other generators) or in the ninja
> generator?
> 

It's a bug in the code, and a bug in the unit testing framework. The 
unescaped $ wasn't the problem, but there was a missing '.' which the unit 
test expected.

I don't know why the unit test failed only on Ninja, and not with all 
generators, but I've fixed the bug in the code.

Thanks,

Steve.





More information about the cmake-developers mailing list