From e25df6706d51907f535dfcbb343708bd1b11d430 Mon Sep 17 00:00:00 2001 From: Long Dao Date: Sat, 2 Apr 2022 18:33:47 +0700 Subject: [PATCH] Update cpp_cmake.rst update CMAKE_C_FLAGS when compile C file --- Documentation/guides/cpp_cmake.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/guides/cpp_cmake.rst b/Documentation/guides/cpp_cmake.rst index f5167d3402..1aa5c1e2dd 100644 --- a/Documentation/guides/cpp_cmake.rst +++ b/Documentation/guides/cpp_cmake.rst @@ -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 ")