Update cpp_cmake.rst
update CMAKE_C_FLAGS when compile C file
This commit is contained in:
parent
6c22e2894c
commit
e25df6706d
|
@ -104,11 +104,12 @@ Creating the project
|
|||
|
||||
set(EXE_NAME hellocpp)
|
||||
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${AC_HW_FLAGS} ${AC_DEFINES}")
|
||||
set(CMAKE_CXX_FLAGS "${AC_HW_FLAGS} ${AC_DEFINES} ${AC_COMMON_FLAGS} ${AC_CXX_EXTRA_FLAGS}")
|
||||
if (PARAM_DEBUG)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
|
||||
endif()
|
||||
|
||||
|
||||
set(CMAKE_SKIP_RPATH ON)
|
||||
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_LINKER} ${AC_LINKER_FLAGS} -o ${EXE_NAME}.elf <OBJECTS> <LINK_LIBRARIES>")
|
||||
|
||||
|
|
Loading…
Reference in New Issue