Skip to content

Commit

Permalink
libmetal(cmake):set HAVE_STDATOMIC_H default true in NuttX platform
Browse files Browse the repository at this point in the history
there is no need to use cmake include detection under NuttX platform

Signed-off-by: xuxin19 <[email protected]>
  • Loading branch information
xuxin930 authored and wyr-7 committed Oct 10, 2024
1 parent a4bce35 commit b898112
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmake/depends.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
find_package(LibRt REQUIRED)
collect (PROJECT_LIB_DEPS "${LIBRT_LIBRARIES}")

else ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "NuttX")

# there is no need to use cmake include detection
# under NuttX platform
set(HAVE_STDATOMIC_H true)

else ()

# TODO: fix for find_path() to detect stdatomic.h
# find_path (HAVE_STDATOMIC_H stdatomic.h)
Expand All @@ -33,5 +39,5 @@ else ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
check_include_files (stdatomic.h HAVE_STDATOMIC_H)
set (CMAKE_REQUIRED_FLAGS ${_saved_cmake_required_flags})

endif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
endif ()

0 comments on commit b898112

Please sign in to comment.