View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015052CMakeCMakepublic2014-07-31 13:482016-06-10 14:31
ReporterDmitry 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformLinuxOSUbuntuOS Version14.04
Product VersionCMake 2.8.12.2 
Target VersionFixed in Version 
Summary0015052: INTERFACE_INCLUDE_DIRECTORIES does not allow non-existent directories, but INCLUDE_DIRECTORIES does
DescriptionIt is a duplicate of http://public.kitware.com/Bug/bug_relationship_graph.php?bug_id=14495 [^] , but I think that Stephen Kelly was not right there.

When using add_library(IMPORTED) with INTERFACE_INCLUDE_DIRECTORIES CMake checks existence of the directory in the configuration-time. However, if we declare the same path in INCLUDE_DIRECTORY of the dependent target, everything work fine. This is not consistent.
Steps To Reproduce1. Unzip cmake-include-issue.zip
2. Try to build, build will fail
3. Replace "include(inc1.txt)' on line 25 of CMakeLists.txt with "include(inc2.txt)", effectively replacing

set_target_properties(sub PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${source_dir}/include"
)

with

target_include_directories(main PRIVATE "${source_dir}/include")

4. Now everything works as expected
TagsNo tags attached.
Attached Fileszip file icon cmake-include-issue.zip [^] (2,647 bytes) 2014-07-31 13:48

 Relationships
related to 0014495closedStephen Kelly Spurious error about non-existent INTERFACE_INCLUDE_DIRECTORIES of IMPORTED target 

  Notes
(0040384)
Xavier Décoret (reporter)
2016-01-31 10:31

This bug is still active. This is very annoying to create third_party libraries using ExternalProject. When declaring the IMPORTED target, you can't specify the include associated to it, because it does not exist yet.
(0040385)
Dmitry (reporter)
2016-01-31 18:46

By the way, there is a workaround - just call file(MAKE_DIRECTORY) for the include directory, then everything goes smooth.
(0042598)
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
2014-07-31 13:48 Dmitry New Issue
2014-07-31 13:48 Dmitry File Added: cmake-include-issue.zip
2014-07-31 14:06 Brad King Relationship added related to 0014495
2016-01-31 10:31 Xavier Décoret Note Added: 0040384
2016-01-31 18:46 Dmitry Note Added: 0040385
2016-06-10 14:29 Kitware Robot Note Added: 0042598
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