【Cmake】.cmake 文件是什么|有什么用?


.cmake 文件谁用

.cmake 文件 是给cmake执行用的:

cmake  -P    /path/of/xxx.cmake

cmake 参数-P的解释

-P <file>
Process script mode.

Process the given cmake file as a script written in the CMake language. No configure or generate step is performed and the cache is not modified. If variables are defined using -D, this must be done before the -P argument.

原文链接:https://blog.csdn.net/xiaowang1379214245/article/details/78191917

 .cmake 文件的作用

就像CMakeList.txt的库一样,加载后可以在CMakeList.txt中使用它的一些函数和定义?

提供最小可用配置?

其他:

https://gitlab.kitware.com/cmake/community/-/wikis/doc/tutorials/How-to-create-a-ProjectConfig.cmake-file

https://stackoverflow.com/questions/62875805/what-is-the-use-of-cmake-files-in-install-function-of-cmakelists-txt

https://stackoverflow.com/questions/34795816/hinting-findname-cmake-files-with-a-custom-directory

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM