码迷,mamicode.com
首页 > 其他好文 > 详细

CMAKE

时间:2019-04-02 12:53:30      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:dia   ide   ext   pre   user   override   source   int   plain   


cmake_minimum_required(VERSION 3.10) as the first line of CMakeLists.txt

Project(yourprojectname)

override the CFLAGS


set(CMAKE_USER_MAKE_RULES_OVERRIDE ${CMAKE_CURRENT_SOURCE_DIR}/c_flag_overrides.cmake) set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/cxx_flag_overrides.cmake)

a new file name
c_flag_overrides.cmake, which has follow as example.
set(CMAKE_C_FLAGS "--no_unroll --no_inline --no_tbaa --no_scheduling --endian=little --cpu=Cortex-M3 --fpu=None") set(CMAKE_DEPFILE_FLAGS_C "--dependencies=m <DEPFILE>")

set(CMAKE_C_FLAGS "--no_unroll --no_inline --no_tbaa --no_scheduling --endian=little --cpu=Cortex-M3 --fpu=None")set(CMAKE_DEPFILE_FLAGS_C "--dependencies=m <DEPFILE>")

CMAKE

标签:dia   ide   ext   pre   user   override   source   int   plain   

原文地址:https://www.cnblogs.com/zjbfvfv/p/10641635.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!