The commit
c389f8bb07e900d805ca3163f47b06e3dbe4303b cmLocalGenerator: Port Find method away from GetGeneratorTarget

seems to have broken the following reduced test case:
  cmake_minimum_required(VERSION 3.3)

  project(Foo CXX)

  file(WRITE sub/CMakeLists.txt [[
      file(WRITE foo.cpp "")

      add_library(foo STATIC foo.cpp)
      add_library(Foo::foo ALIAS foo)
  ]])

  add_subdirectory(sub)

add_custom_target(bar ALL ${CMAKE_COMMAND} -E echo $<TARGET_FILE:Foo::foo>)

At generation time this now produces the diagnostic:

  CMake Error at CMakeLists.txt:14 (add_custom_target):
    Error evaluating generator expression:

      $<TARGET_FILE:Foo::foo>

    No target "Foo::foo"

Nils
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to