libxx: Globally reference the header file of libcxxabi and remove duplication code.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This commit is contained in:
cuiziwei 2024-10-14 16:10:53 +08:00 committed by Xiang Xiao
parent aaace108fb
commit 499de61ec3
2 changed files with 6 additions and 6 deletions

View file

@ -102,10 +102,5 @@ endif()
nuttx_add_system_library(libcxx)
target_sources(libcxx PRIVATE ${SRCS})
target_compile_options(libcxx PRIVATE ${FLAGS})
if(CONFIG_LIBCXXABI)
target_include_directories(
libcxx BEFORE PRIVATE ${CMAKE_CURRENT_LIST_DIR}/libcxxabi/include)
endif()
target_include_directories(libcxx BEFORE
PRIVATE ${CMAKE_CURRENT_LIST_DIR}/libcxx/src)

View file

@ -52,6 +52,12 @@ if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/libcxxabi)
endif()
endif()
set_property(
TARGET nuttx
APPEND
PROPERTY NUTTX_CXX_INCLUDE_DIRECTORIES
${CMAKE_CURRENT_LIST_DIR}/libcxxabi/include)
nuttx_add_system_library(libcxxabi)
set(SRCS)
@ -112,7 +118,6 @@ endif()
target_compile_definitions(libcxxabi PRIVATE LIBCXXABI_NON_DEMANGLING_TERMINATE)
target_sources(libcxxabi PRIVATE ${TARGET_SRCS})
target_compile_options(libcxxabi PRIVATE -frtti)
target_include_directories(
libcxxabi BEFORE PRIVATE ${CMAKE_CURRENT_LIST_DIR}/libcxxabi/include
${CMAKE_CURRENT_LIST_DIR}/libcxx/src)