1b815c7f3Sopenharmony_cimacro (TEST_INLINE) 2b815c7f3Sopenharmony_ci if (NOT DEFINED INLINE_CODE) 3b815c7f3Sopenharmony_ci message (STATUS "Checking for inline...") 4b815c7f3Sopenharmony_ci set (INLINE_KEYWORD "inline") 5b815c7f3Sopenharmony_ci configure_file (cmake/TestInline.c.in ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c) 6b815c7f3Sopenharmony_ci try_compile (HAVE_INLINE "${CMAKE_CURRENT_BINARY_DIR}" 7b815c7f3Sopenharmony_ci "${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c") 8b815c7f3Sopenharmony_ci if (HAVE_INLINE) 9b815c7f3Sopenharmony_ci message (STATUS "Checking for inline... supported") 10b815c7f3Sopenharmony_ci else () 11b815c7f3Sopenharmony_ci message (STATUS "Checking for inline... not supported") 12b815c7f3Sopenharmony_ci 13b815c7f3Sopenharmony_ci message (STATUS "Checking for __inline...") 14b815c7f3Sopenharmony_ci set (INLINE_KEYWORD "__inline") 15b815c7f3Sopenharmony_ci configure_file (cmake/TestInline.c.in ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c) 16b815c7f3Sopenharmony_ci try_compile (HAVE___INLINE "${CMAKE_CURRENT_BINARY_DIR}" 17b815c7f3Sopenharmony_ci "${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c") 18b815c7f3Sopenharmony_ci if (HAVE___INLINE) 19b815c7f3Sopenharmony_ci message (STATUS "Checking for __inline... supported") 20b815c7f3Sopenharmony_ci else () 21b815c7f3Sopenharmony_ci message (STATUS "Checking for __inline... not supported") 22b815c7f3Sopenharmony_ci 23b815c7f3Sopenharmony_ci message (STATUS "Checking for __inline__...") 24b815c7f3Sopenharmony_ci set (INLINE_KEYWORD "__inline__") 25b815c7f3Sopenharmony_ci configure_file (cmake/TestInline.c.in ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c) 26b815c7f3Sopenharmony_ci try_compile (HAVE___INLINE "${CMAKE_CURRENT_BINARY_DIR}" 27b815c7f3Sopenharmony_ci "${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c") 28b815c7f3Sopenharmony_ci if (HAVE___INLINE) 29b815c7f3Sopenharmony_ci message (STATUS "Checking for __inline__... supported") 30b815c7f3Sopenharmony_ci 31b815c7f3Sopenharmony_ci message (STATUS "Checking for __inline__...") 32b815c7f3Sopenharmony_ci set (INLINE_KEYWORD "__inline__") 33b815c7f3Sopenharmony_ci configure_file (cmake/TestInline.c.in ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/cmake/TestInline.c) 34b815c7f3Sopenharmony_ci try_compile (HAVE___INLINE__ "${CMAKE_CURRENT_BINARY_DIR}" 35b815c7f3Sopenharmony_ci "${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c") 36b815c7f3Sopenharmony_ci else () 37b815c7f3Sopenharmony_ci message (STATUS "Checking for __inline__... not supported") 38b815c7f3Sopenharmony_ci set (INLINE_KEYWORD "") 39b815c7f3Sopenharmony_ci endif () 40b815c7f3Sopenharmony_ci 41b815c7f3Sopenharmony_ci endif () 42b815c7f3Sopenharmony_ci endif () 43b815c7f3Sopenharmony_ci 44b815c7f3Sopenharmony_ci if (HAVE_INLINE) 45b815c7f3Sopenharmony_ci set (INLINE_CODE "/* #undef inline */" CACHE INTERNAL "") 46b815c7f3Sopenharmony_ci elseif (HAVE___INLINE) 47b815c7f3Sopenharmony_ci set (INLINE_CODE "#define inline __inline" CACHE INTERNAL "") 48b815c7f3Sopenharmony_ci elseif (HAVE___INLINE__) 49b815c7f3Sopenharmony_ci set (INLINE_CODE "#define inline __inline__" CACHE INTERNAL "") 50b815c7f3Sopenharmony_ci else () 51b815c7f3Sopenharmony_ci set (INLINE_CODE "#define inline " CACHE INTERNAL "") 52b815c7f3Sopenharmony_ci endif () 53b815c7f3Sopenharmony_ci endif () 54b815c7f3Sopenharmony_ciendmacro (TEST_INLINE) 55