cmake 编译指令
时间: 2023-10-14 08:06:45 浏览: 101
cmake提供了一些常用的编译指令,包括但不限于以下几个指令:PROJECT,ADD_EXECUTABLE,INSTALL,ADD_SUBDIRECTORY,SUBDIRS,INCLUDE_DIRECTORIES,LINK_DIRECTORIES,TARGET_LINK_LIBRARIES和SET。其中,PROJECT指令用于定义项目名称,ADD_EXECUTABLE指令用于添加可执行文件,INSTALL指令用于安装文件,ADD_SUBDIRECTORY指令用于添加子目录,SUBDIRS指令用于指定子目录,INCLUDE_DIRECTORIES指令用于指定头文件搜索路径,LINK_DIRECTORIES指令用于指定库文件搜索路径,TARGET_LINK_LIBRARIES指令用于链接库文件,SET指令用于设置变量的值。这些指令可以帮助我们管理和构建复杂的程序。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [CMake常用指令](https://blog.csdn.net/Long_xu/article/details/129179618)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [CMake 的常用命令](https://blog.csdn.net/LearnLHC/article/details/125515650)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文