当前位置:网站首页>Target of cmake command_ compile_ options
Target of cmake command_ compile_ options
2022-06-24 09:16:00 【Things turn at will】
One 、 Introduce
This command is to add compilation options for a target that needs to be compiled
Command format :
target_compile_options(<target> [BEFORE]
<INTERFACE|PUBLIC|PRIVATE> [items1...]
[<INTERFACE|PUBLIC|PRIVATE> [items2...] ...])target_compile_options Will add options (options) To COMPILE_OPTIONS perhaps INTERFACE_COMPILE_OPOTIONS Target properties ( This means adding compilation options ). These options are used when compiling a given target (<target>) When using , A given goal must have passed add_executable() perhaps add_library() This command is added to the project , And cannot be an alias target .
Two 、 Use
cmake_minimum_required(VERSION 3.10)
project(cmake_gcc_options_try_c C)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
add_executable(cmake_gcc_options_try_c main.c)
target_compile_options(cmake_gcc_options_try_c
PUBLIC -W -Wall -Wextra -pedantic -pedantic-errors)Reference resources :
边栏推荐
- Chapter 7 operation bit and bit string (III)
- 活动报名|Apache Pulsar x KubeSphere 在线 Meetup 火热报名中
- 陆奇:我现在最看好这四大技术趋势
- 浮点数表示法(总结自CS61C和CMU CSAPP)
- 2138. splitting a string into groups of length k
- 2022.06.23 (traversal of lc_144,94145\
- 零基础自学SQL课程 | 相关子查询
- 华为路由器:ipsec技术
- Weekly recommended short video: is the ultimate form of computing "meta universe"?
- RISC-V架构下 FPU Context 的动态保存和恢复
猜你喜欢

Zero foundation self-study SQL course | having clause

Qingcloud based "real estate integration" cloud solution

Kaformer personal notes

解决:jmeter5.5在win11下界面上的字特别小

Linux MySQL installation

Redis实现全局唯一ID

NETRCA: AN EFFECTIVE NETWORK FAULT CAUSE LOCALIZATION之论文阅读

【Redis實現秒殺業務①】秒殺流程概述|基本業務實現

CDGA|到底怎么才能做好数据治理呢?
Depens:*** but it is not going to be installed
随机推荐
深入解析 Apache BookKeeper 系列:第三篇——读取原理
当程序员被问会不会修电脑时… | 每日趣闻
Rpiplay implementation of raspberry pie airplay projector
Recommendation - Secret of curiosity: how many dancing angels can stand on the tip of a needle?
Framework tool class obtained by chance for self use
Vidéo courte recommandée chaque semaine: Soyez sérieux en parlant de "métaunivers"
On the routing tree of gin
Epidemic situation, unemployment, 2022, we shouted to lie down!
可直接套用的Go编码规范
陆奇:我现在最看好这四大技术趋势
Applet wx show
[quantitative investment] discrete Fourier transform to calculate array period
【bug】@JsonFormat 使用时出现日期少一天的问题
Data middle office: the data middle office practice scheme of Minsheng Bank
【输入法】迄今为止,居然有这么多汉字输入法!
牛客网 实现简单计算器功能
Linux (centos7.9) installation and deployment of MySQL Cluster 7.6
Chapter 7 operation bit and bit string (III)
学习太极创客 — ESP8226 (十三)OTA
Squid代理服务器应用