diff --git a/CMakeLists.txt b/CMakeLists.txt index 50862731..623b003d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,32 +131,30 @@ if(LIBXML2_WITH_ZLIB) find_package(ZLIB REQUIRED) endif() -if (NOT MSVC) - check_c_source_compiles(" - void __attribute__((destructor)) - f(void) {} - int main(void) { return 0; } - " HAVE_FUNC_ATTRIBUTE_DESTRUCTOR) - check_include_files(arpa/inet.h HAVE_ARPA_INET_H) - check_function_exists(class HAVE_CLASS) - check_include_files(dlfcn.h HAVE_DLFCN_H) - check_library_exists(dl dlopen "" HAVE_DLOPEN) - check_include_files(dl.h HAVE_DL_H) - check_function_exists(getentropy HAVE_GETENTROPY) - check_library_exists(history append_history "" HAVE_LIBHISTORY) - check_library_exists(readline readline "" HAVE_LIBREADLINE) - check_function_exists(mmap HAVE_MMAP) - check_function_exists(munmap HAVE_MUNMAP) - check_include_files(netdb.h HAVE_NETDB_H) - check_include_files(netinet/in.h HAVE_NETINET_IN_H) - check_include_files(poll.h HAVE_POLL_H) - check_library_exists(dld shl_load "" HAVE_SHLLOAD) - check_include_files(stdint.h HAVE_STDINT_H) - check_include_files(sys/mman.h HAVE_SYS_MMAN_H) - check_include_files(sys/random.h HAVE_SYS_RANDOM_H) - check_include_files(sys/select.h HAVE_SYS_SELECT_H) - check_include_files(sys/socket.h HAVE_SYS_SOCKET_H) -endif() +check_c_source_compiles(" + void __attribute__((destructor)) + f(void) {} + int main(void) { return 0; } +" HAVE_FUNC_ATTRIBUTE_DESTRUCTOR) +check_include_files(arpa/inet.h HAVE_ARPA_INET_H) +check_function_exists(class HAVE_CLASS) +check_include_files(dlfcn.h HAVE_DLFCN_H) +check_library_exists(dl dlopen "" HAVE_DLOPEN) +check_include_files(dl.h HAVE_DL_H) +check_function_exists(getentropy HAVE_GETENTROPY) +check_library_exists(history append_history "" HAVE_LIBHISTORY) +check_library_exists(readline readline "" HAVE_LIBREADLINE) +check_function_exists(mmap HAVE_MMAP) +check_function_exists(munmap HAVE_MUNMAP) +check_include_files(netdb.h HAVE_NETDB_H) +check_include_files(netinet/in.h HAVE_NETINET_IN_H) +check_include_files(poll.h HAVE_POLL_H) +check_library_exists(dld shl_load "" HAVE_SHLLOAD) +check_include_files(stdint.h HAVE_STDINT_H) +check_include_files(sys/mman.h HAVE_SYS_MMAN_H) +check_include_files(sys/random.h HAVE_SYS_RANDOM_H) +check_include_files(sys/select.h HAVE_SYS_SELECT_H) +check_include_files(sys/socket.h HAVE_SYS_SOCKET_H) if(LIBXML2_WITH_TLS) check_c_source_compiles(