The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15119 ====================================================================== Reported By: Alex Lamaison Assigned To: ====================================================================== Project: CMake Issue ID: 15119 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2014-08-31 04:22 EDT Last Modified: 2014-08-31 04:22 EDT ====================================================================== Summary: target_include_directories(target INTERFACE) does make sense for custom targets Description: This commit https://gitorious.org/cmake/cmake/commit/510fdcb18801076e2041eaae2941375eecc93ec2 says "Setting include directories or compile definitions on a target created with add_custom_target does not make sense". But that's not quite true.
If that custom target generates a header file in a particular directory then the INTERFACE variant of target_include_directories makes sense so other targets can pick up its usage requirements by 'linking' against it. Similarly, if the generated header needs certain compile defintions to use it, the INTERFACE variant of target_compile_definitions also makes sense. Steps to Reproduce: use add_custom_target to generate a header file in some directory. use target_include_directories to expose the header file's directory as a usage requirement of that header. configure. CMake says "target_include_directories called with non-compilable target type". ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2014-08-31 04:22 Alex Lamaison New Issue ====================================================================== -- 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
