[cmake-developers] 2.8.11-rc3 generator expression error

Brad King brad.king at kitware.com
Wed Apr 24 15:15:06 EDT 2013


Stephen,

I am able to reproduce this with the simple test case shown below
in any multi-config generator (VS IDE and Xcode).

On 04/24/2013 11:27 AM, Brad King wrote:
> On 04/24/2013 09:11 AM, Paul Smith wrote:
>> The package I'm trying to build is here, FWIW:
>>
>> https://github.com/nuodb/nuodb-php-pdo
>>
>> The CMakeLists.txt file is here:
>>
>> https://github.com/nuodb/nuodb-php-pdo/blob/master/CMakeLists.txt

$ cat ../CMakeLists.txt
cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
project(Foo C)
add_library(A SHARED IMPORTED)
add_library(B SHARED a.c)
target_link_libraries(B debug A)

$ cmake .. -G"Xcode"
...
CMake Error at CMakeLists.txt:5 (target_link_libraries):
  Error evaluating generator expression:

    $<TARGET_PROPERTY:$<$<CONFIG:DEBUG>:A>,INTERFACE_INCLUDE_DIRECTORIES>

  $<TARGET_PROPERTY:tgt,prop> expression requires a non-empty target name.
...

The error message appears as many times as there are
CMAKE_CONFIGURATION_TYPES values that are not Debug.  Obviously
the INTERFACE_INCLUDE_DIRECTORIES expression is getting processed
once for each configuration and on any where $<CONFIG:DEBUG> is
false the target name is empty.

Please take a look ASAP.  This is a regression in
2.8.11-rc[123] since 2.8.10.2.

Thanks,
-Brad



More information about the cmake-developers mailing list