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 ====================================================================== -- 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