Skip to content

Help: Document system paths added in CMAKE_SYSTEM_PREFIX_PATH

I was debugging how CMake was able to find CMake projects installed out of the box in a conda environment on Windows. !4773 (merged) only covers the Unix case, so it was not clear to me how this possibly worked.

It turned out that it worked as in the environment cmake was installed, and so the cmake install prefix was added in CMAKE_SYSTEM_PREFIX_PATH for that reason. However, this was not documented, so I took the occasion to document the directory added in CMAKE_SYSTEM_PREFIX_PATH by Modules/Platform/UnixPaths.cmake and Modules/Platform/WindowsPaths.cmake. For consistency with the documentation of the path that depend on environment variables I added a phrase "they are subject to change:".

Edited by Silvio Traversaro

Merge request reports