CMake Generator Expression not recognized by Ninja

Viewed 359

I was trying to use a CMake Generator Expression such as:

 $<TARGET_GENEX_EVAL:foo,$<TARGET_PROPERTY:$<TARGET_NAME_IF_EXISTS:foo>,PROP_BAR>>

This expression works fine when the Generator used is Visual Studio or Unix Makefiles but fails when the generator used is Ninja with errors such as:

CMake Error at cmake/<fname>.cmake:629 (add_custom_command):
  Error evaluating generator expression:

$<TARGET_GENEX_EVAL:foo,$<TARGET_PROPERTY:$<TARGET_NAME_IF_EXISTS:foo>,PROP_BAR>>

  Expression did not evaluate to a known generator expression
Call Stack (most recent call first):
  cmake/<fname>.cmake:1269
  <target>/CMakeLists.txt:16

Does Ninja not support Generator Expressions?

If it doesn't what are my best options?

If it does, what exactly is the issue?

0 Answers
Related