From d660c519e9c3f81c05b08bf31d11c158f42912a8 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 7 Aug 2024 20:09:05 +0100 Subject: [PATCH] fixup! cmake: Add introspection module Skip the superfluous `string.h` check. --- cmake/introspection.cmake | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/cmake/introspection.cmake b/cmake/introspection.cmake index e932b8243883a..2b597674da665 100644 --- a/cmake/introspection.cmake +++ b/cmake/introspection.cmake @@ -38,20 +38,17 @@ if(HAVE_STD_SYSTEM OR HAVE__WSYSTEM) set(HAVE_SYSTEM 1) endif() -check_include_file_cxx(string.h HAVE_STRING_H) -if(HAVE_STRING_H) - check_cxx_source_compiles(" - #include +check_cxx_source_compiles(" + #include - int main() - { - char buf[100]; - char* p{strerror_r(0, buf, sizeof buf)}; - (void)p; - } - " STRERROR_R_CHAR_P - ) -endif() + int main() + { + char buf[100]; + char* p{strerror_r(0, buf, sizeof buf)}; + (void)p; + } + " STRERROR_R_CHAR_P +) # Check for malloc_info (for memory statistics information in getmemoryinfo). check_cxx_symbol_exists(malloc_info "malloc.h" HAVE_MALLOC_INFO)