View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015689CMakeCMakepublic2015-08-07 15:172016-06-10 14:31
ReporterJames Johnston 
Assigned ToKitware Robot 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionmoved 
PlatformWindows 7OSOS Version
Product VersionCMake 3.3 
Target VersionFixed in Version 
Summary0015689: Allow target_include_directories to specify INTERFACE for IMPORTED targets
DescriptionWhen target_include_directories is used with an INTERFACE option on an IMPORTED target, the command fails with an error.

Since I specified INTERFACE and not PUBLIC or PRIVATE, I should expect the command to work without error on the IMPORTED target.

As a workaround, I have to use the more verbose set_property command.
Steps To Reproduceadd_library(MyLib SHARED IMPORTED)
set_property(TARGET MyLib PROPERTY IMPORTED_LOCATION mylib.dll)
set_property(TARGET MyLib PROPERTY IMPORTED_IMPLIB mylib.lib)

# Following line fails with an error:
target_include_directories(MyLib INTERFACE mylib/include)
# The error is:
# Cannot specify include directories for imported target "MyLib".
# Alternative command that works:
# set_property(TARGET MyLib APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES mylib/include)
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0039258)
Brad King (manager)
2015-08-10 08:32

Currently this is as intended, but certainly we could consider making IMPORTED target INTERFACE properties settable via the target_* commands.
(0042820)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2015-08-07 15:17 James Johnston New Issue
2015-08-10 08:31 Brad King Severity minor => feature
2015-08-10 08:31 Brad King Summary target_include_directories INTERFACE does not work for IMPORTED targets => Allow target_include_directories to specify INTERFACE for IMPORTED targets
2015-08-10 08:32 Brad King Note Added: 0039258
2016-06-10 14:29 Kitware Robot Note Added: 0042820
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team