Skip to content

Commit

Permalink
fixup! cmake: Add introspection module
Browse files Browse the repository at this point in the history
Skip the superfluous `string.h` check.
  • Loading branch information
hebasto committed Aug 7, 2024
1 parent 41c8aac commit d660c51
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions cmake/introspection.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 <string.h>
check_cxx_source_compiles("
#include <string.h>
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)
Expand Down

0 comments on commit d660c51

Please sign in to comment.