Initialize

This commit is contained in:
2021-12-16 09:29:17 +08:00
commit 6e0f72d7ed
22 changed files with 1550 additions and 0 deletions

12
TestStrerrorR.cmake Normal file
View File

@@ -0,0 +1,12 @@
function(test_strerror_r OUTPUT_VAR)
if (DEFINED STRERROR_R_TEST_RESULT_CACHE)
set(${OUTPUT_VAR} ${STRERROR_R_TEST_RESULT_CACHE} PARENT_SCOPE)
message(STATUS "Check strerror_r is GNU complatable - ${STRERROR_R_TEST_RESULT_CACHE} (Cached)")
else()
message(STATUS "Check strerror_r is GNU complatable")
try_compile(STRERROR_R_TEST_RESULT "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/test_strerror_r.c")
set(STRERROR_R_TEST_RESULT_CACHE ${STRERROR_R_TEST_RESULT} CACHE BOOL "Is strerror_r is GNU complatable.")
set(${OUTPUT_VAR} ${STRERROR_R_TEST_RESULT} PARENT_SCOPE)
message(STATUS "Check strerror_r is GNU complatable - ${STRERROR_R_TEST_RESULT}")
endif()
endfunction()