CMAKE
Posted zjbfvfv
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CMAKE相关的知识,希望对你有一定的参考价值。
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的主要内容,如果未能解决你的问题,请参考以下文章