Skip to content

Commit

Permalink
libxx: Globally reference the header file of libcxxabi and remove dup…
Browse files Browse the repository at this point in the history
…lication code.

Signed-off-by: cuiziwei <[email protected]>
  • Loading branch information
cuiziweizw committed Oct 16, 2024
1 parent b63cffe commit 2a7d2b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 0 additions & 5 deletions libs/libxx/libcxx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 5 additions & 1 deletion libs/libxx/libcxxabi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/libcxxabi)
endif()
endif()

set_property(
TARGET nuttx
APPEND
PROPERTY NUTTX_CXX_INCLUDE_DIRECTORIES ${CMAKE_BINARY_DIR}/include/libcxxabi)

nuttx_add_system_library(libcxxabi)

set(SRCS)
Expand Down Expand Up @@ -112,7 +117,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)

0 comments on commit 2a7d2b4

Please sign in to comment.