On 05/26/2016 07:24 AM, Harry Mallon wrote: > I can work around it if need be. I just felt that it was against the > stated behaviour of find_path since that function is meant to give > the folder where you can find "IOKit/pci/IOPCIDevice.h" rather than > the folder where you can find "IOPCIDevice.h".
Yes. The current implementation was clearly written for the find_path(OPENAL_INCLUDE_DIR "al.h") case without considering that it might be a header included using slashes. Harry's proposed patch fixes that. >> On 25 May 2016, at 20:44, Eric Wing wrote: >> There are two common use cases that it was designed to handle: >> >> case 1: #import <Cocoa/Cocoa.h> >> find_path(COCOA_INCLUDE_DIR “Cocoa/Cocoa.h”) >> # Returns something like /System/Library/Frameworks/Cocoa.framework >> >> case 2: #include “al.h” >> find_path(OPENAL_INCLUDE_DIR “al.h”) >> # Returns something like /System/Library/Frameworks/OpenAL.framework/Headers The proposed change doesn't break either of these cases AFAICT. I think the only compatibility concern is for projects that previously worked around this bug that would therefore be broken by a fix. The case seems obscure enough that this may not be a problem. Local builds of old versions of such projects can easily be made to work by manually setting the cache entry with the find_path result. If it becomes a major problem we can always revert the change and re-introduce it with a policy for compatibility. Harry, please see my review of the change in the other branch of this thread. Thanks, -Brad -- 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