CMAKE_SYSTEM_INCLUDE_PATH - has just one path, for X11?

Running on Ubuntu 18.04, cmake version 3.18.0-rc2. From documentation I expect CMAKE_SYSTEM_INCLUDE_PATH to hold a list of directories including /usr/include, /usr/local/include, etc. :

Semicolon-separated list of directories specifying a search path for the find_file() and find_path() commands. By default this contains the standard directories for the current system.

However when I print the value of CMAKE_SYSTEM_INCLUDE_PATH from my CMakeLists.txt I get:


Why is this? Thanks!


It’s historical. Most of the paths that were once in CMAKE_SYSTEM_INCLUDE_PATH are now handled by CMAKE_SYSTEM_PREFIX_PATH. Note that these values are meant for the find_* commands and are not supposed to represent the compiler’s implicit include directories or anything like that.

1 Like