cmake 脚本模式支持什么,不支持什么

cmake script mode what is supported and what not

我正在使用 cmake 构建我的项目之一,我看到它安装文件的方式是通过 cmake -P cmake_install.cmake 调用 cmake 脚本,但此 cmake 文件中使用的函数看起来与记录的不同,例如对于共享库安装目标,它有:

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

但是我在cmake documentation中找不到这个文件子命令,请问有没有可以在脚本模式下使用的功能的地方?

这看起来像是供 cmake 内部使用的内部命令。

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

源代码是终极文档https://gitlab.kitware.com/cmake/cmake/-/blob/master/Source/cmFileCommand.cxx#L3757 .

-Pcmake . 调用之间的可用函数没有区别。您可以在任何 cmake 中使用 file(RPATH_CHECK