cmake 条件语句
时间: 2023-08-29 21:06:50 浏览: 105
CMake的条件语句用于根据特定的条件来选择性地执行代码块。条件语句可以在CMakeLists.txt文件中使用,例如,使用IF语句判断某个变量是否满足某个条件,如果满足则执行相应的代码块。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [CMake:条件语句、选项命令以及指定编译器](https://blog.csdn.net/jjjstephen/article/details/130209928)[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* [cppsh:C++11 作为脚本语言,使用 CMake 作为构建系统](https://download.csdn.net/download/weixin_42154650/19866092)[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 ]
阅读全文