Search code examples
cmakeshared-librariesrpath

cmake script mode what is supported and what not


I'm using cmake to build one of my projects, I see the way it installs files is calling a cmake script by cmake -P cmake_install.cmake, but the functions used in this cmake file looks different than what is documented, e.g. for shared library install target it has:

file(RPATH_CHECK FILE ... RPATH ...)

But I cannot find this file sub-command in the cmake documentation, so is there a place that have the available functions to use in script mode?


Solution

  • This looks like an internal command for cmake internal use.

    so is there a place that have the available functions to use in script mode?

    The source code is the ultimate documentation https://gitlab.kitware.com/cmake/cmake/-/blob/master/Source/cmFileCommand.cxx#L3757 .

    There is no difference in available functions between -P and cmake . invocations. You can use file(RPATH_CHECK in any cmake.