On Thu, Jan 2, 2014 at 10:20 AM, Magnus Therning <mag...@therning.org>wrote:
> On Thu, Jan 02, 2014 at 12:14:38AM -0500, Matt Wilbur wrote: > > With a bit of thought and source code reading, I sorted this out. > > Let me know if you'd like me to post my answer to my own question. > > Yes, please do. > > I'm sure you've found yourself in the very irritating situation where > you're looking for the answer to some question, but all you can find > is other people asking the same question in various fora. By > answering your own question you'll help other people avoid that > irritating situation when they are looking around for an answer to > this particular question. :) > Very good point. So, the flaw in my understanding was that the ONLY_CMAKE_FIND_ROOT_PATH | NO_CMAKE_FIND_ROOT_PATH | CMAKE_FIND_ROOT_PATH_BOTH had no effect if NO_DEFAULTS is used. NO_DEFAULTS only affects the construction of the list of paths to be searched. i.e. NO_DEFAULTS means the list of paths to be searched consists only of the paths specified by the PATHS argument (maybe others - haven't looked into that one). Point is, all the find_XXX commands construct a list of paths to be searched, consisting of what is specified in the command plus maybe some other paths. The effect of ONLY_CMAKE_FIND_ROOT_PATH | NO_CMAKE_FIND_ROOT_PATH | CMAKE_FIND_ROOT_PATH_BOTH (and, similarly CMAKE_FIND_ROOT_PATH_MODE_*) is to determine how that list of search paths is further processed to create the final list of paths searched by CMake. Call the initial list of paths to be searched InitialSearchPaths. Call RerootedSearchPaths the result of prepending each element of CMAKE_FIND_ROOT to each element of InitialSearchPaths. In Clojure (since I've been playing with it in my personal time and it succinctly captures the list processing): (flatten (for [r CMAKE_FIND_ROOT] (map #(str r %) InitialSearchPaths))) The actual list of search paths, SearchPaths would be one of IntitalSearchPaths RerootedSearchPaths (concat RerootedSearchPaths IntitalSearchPaths)
-- 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