cmake HAVE_RAND_R examples

MiKTeX/miktex CMakeLists.txt :1336

check_function_exists(rand_r HAVE_RAND_R)

fluent/fluent-bit lib/librdkafka-2.10.1/packaging/cmake/try_compile/rdkafka_setup.cmake :13

try_compile(
    HAVE_RAND_R
    "${CMAKE_CURRENT_BINARY_DIR}/try_compile"
    "${TRYCOMPILE_SRC_DIR}/rand_r_test.c"
)