标签: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>")
标签:dia ide ext pre user override source int plain
原文地址:https://www.cnblogs.com/zjbfvfv/p/10641635.html