[cmake-developers] [CMake 0015052]: INTERFACE_INCLUDE_DIRECTORIES does not allow non-existent directories, but INCLUDE_DIRECTORIES does
Mantis Bug Tracker
mantis at public.kitware.com
Thu Jul 31 13:48:47 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=15052
======================================================================
Reported By: dpantele
Assigned To:
======================================================================
Project: CMake
Issue ID: 15052
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-07-31 13:48 EDT
Last Modified: 2014-07-31 13:48 EDT
======================================================================
Summary: INTERFACE_INCLUDE_DIRECTORIES does not allow
non-existent directories, but INCLUDE_DIRECTORIES does
Description:
It 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 Reproduce:
1. 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
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-07-31 13:48 dpantele New Issue
2014-07-31 13:48 dpantele File Added: cmake-include-issue.zip
======================================================================
More information about the cmake-developers
mailing list