Alexander Neundorf wrote: > > On Tuesday 20 August 2013, Robert Maynard wrote: >> Introduced CMake Policy 21: >> It is now an error to use relative paths to include_directories. > > Why is this necessary ? > The documentation for this policy says: > "The base path for such relative entries is not well defined." > > I don't understand this. > Why isn't it simply interpreted as relative to ${CMAKE_CURRENT_SOURCE_DIR} > in the CMakeLists.txt where the property is set ? > include_directories(), link_directories() and I think more or less all > other commands interpret relative paths as relative to > ${CMAKE_CURRENT_SOURCE_DIR}.
I think the bug is in the release notes entry. This relates to commit eabefa8b02b399b00aea83185b6b364ab5b6aa3d. Relative paths can still be used with the include_directories() command. This relates mostly to using set_property and using generator expressions where the base path is not well-defined until generate-time. Maybe a better release notes entry would be - It is now an error to add relative paths to the INCLUDE_DIRECTORIES target property. Thanks, Steve. -- 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://www.cmake.org/mailman/listinfo/cmake