View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015832CMake(No Category)public2015-11-05 03:082016-05-02 08:30
ReporterNils Gladitz 
Assigned ToStephen Kelly 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 3.5 
Target VersionCMake 3.5Fixed in VersionCMake 3.5 
Summary0015832: ALIAS target scope regression
DescriptionThe 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"
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0039850)
Brad King (manager)
2015-11-09 09:53

Fixed here:

 Alias: Fix access at generate-time
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ce9742a [^]
(0040956)
Robert Maynard (manager)
2016-05-02 08:30

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2015-11-05 03:08 Nils Gladitz New Issue
2015-11-06 08:31 Brad King Assigned To => Stephen Kelly
2015-11-06 08:31 Brad King Status new => assigned
2015-11-06 08:31 Brad King Target Version => CMake 3.5
2015-11-09 09:53 Brad King Note Added: 0039850
2015-11-09 09:54 Brad King Status assigned => resolved
2015-11-09 09:54 Brad King Resolution open => fixed
2015-11-09 09:54 Brad King Fixed in Version => CMake 3.5
2016-05-02 08:30 Robert Maynard Note Added: 0040956
2016-05-02 08:30 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team