Add checking stdatomic header file checking
[processor-sdk/open-amp.git] / cmake / depends.cmake
1 find_package (Libmetal REQUIRED)
2 collect (PROJECT_INC_DIRS "${LIBMETAL_INCLUDE_DIR}")
3 collect (PROJECT_LIB_DIRS "${LIBMETAL_LIB_DIR}")
5 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
6   check_include_files (stdatomic.h HAVE_STDATOMIC_H)
7 else ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
8   set (_saved_cmake_required_flags ${CMAKE_REQUIRED_FLAGS})
9   set (CMAKE_REQUIRED_FLAGS "-c")
10   check_include_files (stdatomic.h HAVE_STDATOMIC_H)
11   set (CMAKE_REQUIRED_FLAGS ${_saved_cmake_required_flags})
12 endif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
13 # vim: expandtab:ts=2:sw=2:smartindent