【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