libcpr / cpr

C++ Requests: Curl for People, a spiritual port of Python Requests.
https://docs.libcpr.org/
Other
6.56k stars 934 forks source link

Improve windows support #674

Open ZackOfAllTrades opened 3 years ago

ZackOfAllTrades commented 3 years ago

I'm having a terrible time trying to build cpr on windows.

Describe the solution you'd like I'm fairly new to cmake so maybe Im missing some assumed knowledge, It would be nice to have a beginner friendly verbose setup guide. Im not sure what OpenSSL has to do with it or how to set it up so cpr can use it but it seems like it won't work without it. I've tried setting the CPR_BUILD_TESTS_SSL=OFF but the get runtime errors.


Microsoft Windows [Version 10.0.19043.1288]
(c) Microsoft Corporation. All rights reserved.

C:\REPOS\PERSONAL\CPR_TEST>cmake -B build
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- The CXX compiler identification is MSVC 19.29.30040.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- C++ Requests CMake Options
-- =======================================================
--   CPR_GENERATE_COVERAGE: OFF
--   CPR_CURL_NOSIGNAL: OFF
--   CPR_USE_SYSTEM_GTEST: OFF
--   CPR_FORCE_USE_SYSTEM_CURL: OFF
--   CPR_ENABLE_SSL: ON
--   CPR_FORCE_OPENSSL_BACKEND: OFF
--   CPR_FORCE_WINSSL_BACKEND: OFF
--   CPR_FORCE_DARWINSSL_BACKEND: OFF
--   CPR_BUILD_TESTS: ON
--   CPR_BUILD_TESTS_SSL: ON
-- =======================================================
-- Performing Test THREAD_SANITIZER_AVAILABLE
-- Performing Test THREAD_SANITIZER_AVAILABLE - Success
-- Performing Test ADDRESS_SANITIZER_AVAILABLE
-- Performing Test ADDRESS_SANITIZER_AVAILABLE - Failed
-- Performing Test LEAK_SANITIZER_AVAILABLE
-- Performing Test LEAK_SANITIZER_AVAILABLE - Failed
-- Performing Test UNDEFINED_BEHAVIOUR_SANITIZER_AVAILABLE
-- Performing Test UNDEFINED_BEHAVIOUR_SANITIZER_AVAILABLE - Failed
-- Automatically detecting SSL backend.
-- Detecting SSL backend...
-- SSL auto detect: Using WinSSL.
-- Configuring build in curl...
-- Populating zlib
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/REPOS/PERSONAL/CPR_TEST/build/_deps/zlib-subbuild
Microsoft (R) Build Engine version 16.10.2+857e5a733 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Checking Build System
  Creating directories for 'zlib-populate'
  Building Custom Rule C:/REPOS/PERSONAL/CPR_TEST/build/_deps/zlib-subbuild/CMakeLists.txt
  Performing download step (git clone) for 'zlib-populate'
  Cloning into 'zlib-src'...
  HEAD is now at 7606b9f Version 2.0.0 Release Candidate 2
  Performing update step for 'zlib-populate'
  No patch step for 'zlib-populate'
  No configure step for 'zlib-populate'
  No build step for 'zlib-populate'
  No install step for 'zlib-populate'
  No test step for 'zlib-populate'
  Completed 'zlib-populate'
  Building Custom Rule C:/REPOS/PERSONAL/CPR_TEST/build/_deps/zlib-subbuild/CMakeLists.txt
-- Using CMake version 3.21.2
-- ZLIB_HEADER_VERSION: 1.2.11
-- ZLIBNG_HEADER_VERSION: 2.0.0-RC2
-- The C compiler identification is MSVC 19.29.30040.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Arch detected: 'x86_64'
-- Basearch of 'x86_64' has been detected as: 'x86'
-- Architecture supports unaligned reads
-- Architecture supports unaligned reads of > 4 bytes
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdarg.h
-- Looking for stdarg.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Looking for sys/sdt.h
-- Looking for sys/sdt.h - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Check size of _off64_t
-- Check size of _off64_t - failed
-- Check size of __off64_t
-- Check size of __off64_t - failed
-- Looking for fseeko
-- Looking for fseeko - not found
-- Looking for strerror
-- Looking for strerror - found
-- Performing Test HAVE_NO_INTERPOSITION
-- Performing Test HAVE_NO_INTERPOSITION - Success
-- Performing Test HAVE_ATTRIBUTE_VISIBILITY_HIDDEN
-- Performing Test HAVE_ATTRIBUTE_VISIBILITY_HIDDEN - Failed
-- Performing Test HAVE_ATTRIBUTE_VISIBILITY_INTERNAL
-- Performing Test HAVE_ATTRIBUTE_VISIBILITY_INTERNAL - Failed
-- Performing Test HAVE_BUILTIN_CTZ
-- Performing Test HAVE_BUILTIN_CTZ - Failed
-- Performing Test HAVE_BUILTIN_CTZLL
-- Performing Test HAVE_BUILTIN_CTZLL - Failed
-- Performing Test HAVE_PTRDIFF_T
-- Performing Test HAVE_PTRDIFF_T - Success
-- Performing Test HAVE_SSE2_INTRIN
-- Performing Test HAVE_SSE2_INTRIN - Success
-- Performing Test HAVE_SSSE3_INTRIN
-- Performing Test HAVE_SSSE3_INTRIN - Success
-- Performing Test HAVE_SSE42CRC_INLINE_ASM
-- Performing Test HAVE_SSE42CRC_INLINE_ASM - Failed
-- Performing Test HAVE_SSE42CRC_INTRIN
-- Performing Test HAVE_SSE42CRC_INTRIN - Success
-- Performing Test HAVE_SSE42CMPSTR_INTRIN
-- Performing Test HAVE_SSE42CMPSTR_INTRIN - Success
-- Performing Test HAVE_PCLMULQDQ_INTRIN
-- Performing Test HAVE_PCLMULQDQ_INTRIN - Success
-- Performing Test HAVE_AVX2_INTRIN
-- Performing Test HAVE_AVX2_INTRIN - Success
-- Architecture-specific source files: arch/x86/x86.c;arch/x86/slide_avx.c;arch/x86/chunkset_avx.c;arch/x86/compare258_avx.c;arch/x86/adler32_avx.c;arch/x86/insert_string_sse.c;arch/x86/compare258_sse.c;arch/x86/chunkset_sse.c;arch/x86/slide_sse.c;arch/x86/adler32_ssse3.c;arch/x86/crc_folding.c
-- The following features have been enabled:

 * CMAKE_BUILD_TYPE, Build type: Release (default)
 * WITH_GZFILEOP, Compile with support for gzFile related functions
 * ZLIB_COMPAT, Compile with zlib compatible API
 * WITH_OPTIM, Build with optimisation
 * WITH_NEW_STRATEGIES, Use new strategies
 * WITH_UNALIGNED, Support unaligned reads on platforms that support it
 * WITH_AVX2, Build with AVX2
 * WITH_SSE2, Build with SSE2
 * WITH_SSSE3, Build with SSSE3
 * WITH_SSE4, Build with SSE4
 * WITH_PCLMULQDQ, Build with PCLMULQDQ
 * AVX2_SLIDEHASH, Support AVX2 optimized slide_hash, using ""
 * AVX_CHUNKSET, Support AVX optimized chunkset, using ""
 * AVX2_COMPARE258, Support AVX2 optimized compare258, using ""
 * AVX2_ADLER32, Support AVX2-accelerated adler32, using ""
 * SSE42_CRC, Support SSE4.2 optimized CRC hash generation, using ""
 * SSE42_COMPARE258, Support SSE4.2 optimized compare258, using ""
 * SSSE3_ADLER32, Support SSSE3-accelerated adler32, using ""
 * PCLMUL_CRC, Support CRC hash generation using PCLMULQDQ, using "  "

-- The following OPTIONAL packages have been found:

 * Git

-- The following features have been disabled:

 * ZLIB_ENABLE_TESTS, Build test binaries
 * ZLIB_DUAL_LINK, Dual link tests against system zlib
 * WITH_SANITIZER, Build with sanitizer (Memory, Address, Undefined)
 * WITH_FUZZERS, Build test/fuzz
 * WITH_NATIVE_INSTRUCTIONS, Instruct the compiler to use the full instruction set on this host (gcc/clang -march=native)
 * WITH_MAINTAINER_WARNINGS, Build with project maintainer warnings
 * WITH_CODE_COVERAGE, Enable code coverage reporting
 * WITH_INFLATE_STRICT, Build with strict inflate distance checking
 * WITH_INFLATE_ALLOW_INVALID_DIST, Build with zero fill for inflate invalid distances
 * INSTALL_UTILS, Copy minigzip and minideflate during install

-- Enabled curl SSL
-- Populating curl
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/REPOS/PERSONAL/CPR_TEST/build/_deps/curl-subbuild
Microsoft (R) Build Engine version 16.10.2+857e5a733 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Checking Build System
  Creating directories for 'curl-populate'
  Building Custom Rule C:/REPOS/PERSONAL/CPR_TEST/build/_deps/curl-subbuild/CMakeLists.txt
  Performing download step (download, verify and extract) for 'curl-populate'
  -- Downloading...
     dst='C:/REPOS/PERSONAL/CPR_TEST/build/_deps/curl-subbuild/curl-populate-prefix/src/curl-7.75.0.tar.xz'
     timeout='none'
     inactivity timeout='none'
  -- Using src='https://github.com/curl/curl/releases/download/curl-7_75_0/curl-7.75.0.tar.xz'
  -- [download 100% complete]
  -- [download 0% complete]
  -- [download 1% complete]
  -- [download 2% complete]
  -- [download 3% complete]
  -- [download 4% complete]
  -- [download 5% complete]
  -- [download 6% complete]
  -- [download 7% complete]
  -- [download 8% complete]
  -- [download 9% complete]
  -- [download 10% complete]
  -- [download 11% complete]
  -- [download 12% complete]
  -- [download 13% complete]
  -- [download 14% complete]
  -- [download 15% complete]
  -- [download 16% complete]
  -- [download 17% complete]
  -- [download 18% complete]
  -- [download 19% complete]
  -- [download 20% complete]
  -- [download 21% complete]
  -- [download 22% complete]
  -- [download 23% complete]
  -- [download 24% complete]
  -- [download 25% complete]
  -- [download 26% complete]
  -- [download 27% complete]
  -- [download 28% complete]
  -- [download 29% complete]
  -- [download 30% complete]
  -- [download 31% complete]
  -- [download 32% complete]
  -- [download 33% complete]
  -- [download 34% complete]
  -- [download 35% complete]
  -- [download 36% complete]
  -- [download 37% complete]
  -- [download 38% complete]
  -- [download 39% complete]
  -- [download 40% complete]
  -- [download 41% complete]
  -- [download 42% complete]
  -- [download 43% complete]
  -- [download 44% complete]
  -- [download 45% complete]
  -- [download 46% complete]
  -- [download 47% complete]
  -- [download 48% complete]
  -- [download 49% complete]
  -- [download 50% complete]
  -- [download 51% complete]
  -- [download 52% complete]
  -- [download 53% complete]
  -- [download 54% complete]
  -- [download 55% complete]
  -- [download 56% complete]
  -- [download 57% complete]
  -- [download 58% complete]
  -- [download 59% complete]
  -- [download 60% complete]
  -- [download 61% complete]
  -- [download 62% complete]
  -- [download 63% complete]
  -- [download 64% complete]
  -- [download 65% complete]
  -- [download 66% complete]
  -- [download 67% complete]
  -- [download 68% complete]
  -- [download 69% complete]
  -- [download 70% complete]
  -- [download 71% complete]
  -- [download 72% complete]
  -- [download 73% complete]
  -- [download 74% complete]
  -- [download 75% complete]
  -- [download 76% complete]
  -- [download 77% complete]
  -- [download 78% complete]
  -- [download 79% complete]
  -- [download 80% complete]
  -- [download 81% complete]
  -- [download 82% complete]
  -- [download 83% complete]
  -- [download 84% complete]
  -- [download 85% complete]
  -- [download 86% complete]
  -- [download 87% complete]
  -- [download 88% complete]
  -- [download 89% complete]
  -- [download 90% complete]
  -- [download 91% complete]
  -- [download 92% complete]
  -- [download 93% complete]
  -- [download 94% complete]
  -- [download 95% complete]
  -- [download 96% complete]
  -- [download 97% complete]
  -- [download 98% complete]
  -- [download 99% complete]
  -- [download 100% complete]
  -- verifying file...
         file='C:/REPOS/PERSONAL/CPR_TEST/build/_deps/curl-subbuild/curl-populate-prefix/src/curl-7.75.0.tar.xz'
  -- Downloading... done
  -- extracting...
       src='C:/REPOS/PERSONAL/CPR_TEST/build/_deps/curl-subbuild/curl-populate-prefix/src/curl-7.75.0.tar.xz'
       dst='C:/REPOS/PERSONAL/CPR_TEST/build/_deps/curl-src'
  -- extracting... [tar xfz]
  -- extracting... [analysis]
  -- extracting... [rename]
  -- extracting... [clean up]
  -- extracting... done
  No update step for 'curl-populate'
  No patch step for 'curl-populate'
  No configure step for 'curl-populate'
  No build step for 'curl-populate'
  No install step for 'curl-populate'
  No test step for 'curl-populate'
  Completed 'curl-populate'
  Building Custom Rule C:/REPOS/PERSONAL/CPR_TEST/build/_deps/curl-subbuild/CMakeLists.txt
-- curl version=[7.75.0]
-- Could NOT find Perl (missing: PERL_EXECUTABLE)
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Looking for getch in ws2_32;
-- Looking for getch in ws2_32; - found
-- Looking for getch in winmm;ws2_32
-- Looking for getch in winmm;ws2_32 - found
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find LibSSH2 (missing: LIBSSH2_LIBRARY LIBSSH2_INCLUDE_DIR)
-- Performing Test USE_UNIX_SOCKETS
-- Performing Test USE_UNIX_SOCKETS - Failed
-- Looking for include file windows.h
-- Looking for include file windows.h - found
-- Looking for include files windows.h, winsock.h
-- Looking for include files windows.h, winsock.h - found
-- Looking for 3 include files windows.h, ..., ws2tcpip.h
-- Looking for 3 include files windows.h, ..., ws2tcpip.h - found
-- Looking for 4 include files windows.h, ..., winsock2.h
-- Looking for 4 include files windows.h, ..., winsock2.h - found
-- Looking for 5 include files windows.h, ..., stdio.h
-- Looking for 5 include files windows.h, ..., stdio.h - found
-- Looking for 6 include files windows.h, ..., sys/filio.h
-- Looking for 6 include files windows.h, ..., sys/filio.h - not found
-- Looking for 6 include files windows.h, ..., sys/ioctl.h
-- Looking for 6 include files windows.h, ..., sys/ioctl.h - not found
-- Looking for 6 include files windows.h, ..., sys/resource.h
-- Looking for 6 include files windows.h, ..., sys/resource.h - not found
-- Looking for 8 include files windows.h, ..., sys/uio.h
-- Looking for 8 include files windows.h, ..., sys/uio.h - not found
-- Looking for 8 include files windows.h, ..., sys/un.h
-- Looking for 8 include files windows.h, ..., sys/un.h - not found
-- Looking for 9 include files windows.h, ..., sys/xattr.h
-- Looking for 9 include files windows.h, ..., sys/xattr.h - not found
-- Looking for 9 include files windows.h, ..., arpa/tftp.h
-- Looking for 9 include files windows.h, ..., arpa/tftp.h - not found
-- Looking for 9 include files windows.h, ..., assert.h
-- Looking for 9 include files windows.h, ..., assert.h - found
-- Looking for 10 include files windows.h, ..., crypto.h
-- Looking for 10 include files windows.h, ..., crypto.h - not found
-- Looking for 10 include files windows.h, ..., err.h
-- Looking for 10 include files windows.h, ..., err.h - not found
-- Looking for 10 include files windows.h, ..., errno.h
-- Looking for 10 include files windows.h, ..., errno.h - found
-- Looking for 12 include files windows.h, ..., idn2.h
-- Looking for 12 include files windows.h, ..., idn2.h - not found
-- Looking for 12 include files windows.h, ..., ifaddrs.h
-- Looking for 12 include files windows.h, ..., ifaddrs.h - not found
-- Looking for 13 include files windows.h, ..., krb.h
-- Looking for 13 include files windows.h, ..., krb.h - not found
-- Looking for 13 include files windows.h, ..., libgen.h
-- Looking for 13 include files windows.h, ..., libgen.h - not found
-- Looking for 13 include files windows.h, ..., locale.h
-- Looking for 13 include files windows.h, ..., locale.h - found
-- Looking for 14 include files windows.h, ..., netinet/tcp.h
-- Looking for 14 include files windows.h, ..., netinet/tcp.h - not found
-- Looking for linux/tcp.h
-- Looking for linux/tcp.h - not found
-- Looking for 14 include files windows.h, ..., pem.h
-- Looking for 14 include files windows.h, ..., pem.h - not found
-- Looking for 14 include files windows.h, ..., poll.h
-- Looking for 14 include files windows.h, ..., poll.h - not found
-- Looking for 14 include files windows.h, ..., rsa.h
-- Looking for 14 include files windows.h, ..., rsa.h - not found
-- Looking for 16 include files windows.h, ..., ssl.h
-- Looking for 16 include files windows.h, ..., ssl.h - not found
-- Looking for 16 include files windows.h, ..., stdbool.h
-- Looking for 16 include files windows.h, ..., stdbool.h - found
-- Looking for 20 include files windows.h, ..., stropts.h
-- Looking for 20 include files windows.h, ..., stropts.h - not found
-- Looking for 25 include files windows.h, ..., sys/utsname.h
-- Looking for 25 include files windows.h, ..., sys/utsname.h - not found
-- Check size of size_t
-- Check size of size_t - done
-- Check size of ssize_t
-- Check size of ssize_t - failed
-- Check size of long long
-- Check size of long long - done
-- Check size of long
-- Check size of long - done
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of __int64
-- Check size of __int64 - done
-- Check size of time_t
-- Check size of time_t - done
-- Looking for basename
-- Looking for basename - not found
-- Looking for strncmpi
-- Looking for strncmpi - not found
-- Looking for alarm
-- Looking for alarm - not found
-- Looking for getpwuid_r
-- Looking for getpwuid_r - not found
-- Looking for usleep
-- Looking for usleep - not found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for _strtoi64
-- Looking for _strtoi64 - found
-- Looking for strerror_r
-- Looking for strerror_r - not found
-- Looking for siginterrupt
-- Looking for siginterrupt - not found
-- Looking for fork
-- Looking for fork - not found
-- Looking for freeaddrinfo
-- Looking for freeaddrinfo - found
-- Looking for freeifaddrs
-- Looking for freeifaddrs - not found
-- Looking for pipe
-- Looking for pipe - not found
-- Looking for ftruncate
-- Looking for ftruncate - not found
-- Looking for getprotobyname
-- Looking for getprotobyname - found
-- Looking for getpeername
-- Looking for getpeername - found
-- Looking for getsockname
-- Looking for getsockname - found
-- Looking for if_nametoindex
-- Looking for if_nametoindex - not found
-- Looking for getrlimit
-- Looking for getrlimit - not found
-- Looking for setlocale
-- Looking for setlocale - found
-- Looking for setmode
-- Looking for setmode - found
-- Looking for setrlimit
-- Looking for setrlimit - not found
-- Looking for fcntl
-- Looking for fcntl - not found
-- Looking for ioctl
-- Looking for ioctl - not found
-- Looking for setsockopt
-- Looking for setsockopt - found
-- Looking for mach_absolute_time
-- Looking for mach_absolute_time - not found
-- Looking for inet_pton
-- Looking for inet_pton - found
-- Looking for fsetxattr
-- Looking for fsetxattr - not found
-- Performing Curl Test HAVE_FCNTL_O_NONBLOCK
-- Performing Curl Test HAVE_FCNTL_O_NONBLOCK - Failed
-- Performing Curl Test HAVE_IOCTLSOCKET
-- Performing Curl Test HAVE_IOCTLSOCKET - Success
-- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL
-- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL - Failed
-- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL_FIONBIO
-- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL_FIONBIO - Success
-- Performing Curl Test HAVE_IOCTLSOCKET_FIONBIO
-- Performing Curl Test HAVE_IOCTLSOCKET_FIONBIO - Success
-- Performing Curl Test HAVE_IOCTL_FIONBIO
-- Performing Curl Test HAVE_IOCTL_FIONBIO - Failed
-- Performing Curl Test HAVE_IOCTL_SIOCGIFADDR
-- Performing Curl Test HAVE_IOCTL_SIOCGIFADDR - Failed
-- Performing Curl Test HAVE_SETSOCKOPT_SO_NONBLOCK
-- Performing Curl Test HAVE_SETSOCKOPT_SO_NONBLOCK - Failed
-- Performing Curl Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
-- Performing Curl Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - Failed
-- Performing Curl Test HAVE_BOOL_T
-- Performing Curl Test HAVE_BOOL_T - Success
-- Performing Curl Test HAVE_FILE_OFFSET_BITS
-- Performing Curl Test HAVE_FILE_OFFSET_BITS - Failed
-- Performing Curl Test HAVE_VARIADIC_MACROS_C99
-- Performing Curl Test HAVE_VARIADIC_MACROS_C99 - Success
-- Performing Curl Test HAVE_VARIADIC_MACROS_GCC
-- Performing Curl Test HAVE_VARIADIC_MACROS_GCC - Failed
-- Check size of off_t
-- Check size of off_t - done
-- Check size of curl_off_t
-- Check size of curl_off_t - done
-- Performing Curl Test HAVE_GLIBC_STRERROR_R
-- Performing Curl Test HAVE_GLIBC_STRERROR_R - Failed
-- Performing Curl Test HAVE_POSIX_STRERROR_R
-- Performing Curl Test HAVE_POSIX_STRERROR_R - Failed
-- Performing Curl Test HAVE_CLOCK_GETTIME_MONOTONIC
-- Performing Curl Test HAVE_CLOCK_GETTIME_MONOTONIC - Failed
-- Performing Curl Test HAVE_BUILTIN_AVAILABLE
-- Performing Curl Test HAVE_BUILTIN_AVAILABLE - Failed
-- Performing Test curl_cv_recv
-- Performing Test curl_cv_recv - Success
-- Performing Test curl_cv_func_recv_test
-- Performing Test curl_cv_func_recv_test - Success
-- Tested: int recv(SOCKET, char *, int, int)
-- Performing Test curl_cv_send
-- Performing Test curl_cv_send - Success
-- Performing Test curl_cv_func_send_test
-- Performing Test curl_cv_func_send_test - Success
-- Tested: int send(SOCKET, const char *, int, int)
-- Performing Test HAVE_MSG_NOSIGNAL
-- Performing Test HAVE_MSG_NOSIGNAL - Failed
-- Performing Test HAVE_STRUCT_TIMEVAL
-- Performing Test HAVE_STRUCT_TIMEVAL - Success
-- Check size of sig_atomic_t
-- Check size of sig_atomic_t - done
-- Performing Test HAVE_SIG_ATOMIC_T_NOT_VOLATILE
-- Performing Test HAVE_SIG_ATOMIC_T_NOT_VOLATILE - Success
-- Check size of struct sockaddr_storage
-- Check size of struct sockaddr_storage - done
-- Performing Test HAVE_POLL_FINE
-- Performing Test HAVE_POLL_FINE - Failed
-- Enabled features: SSL IPv6 AsynchDNS SSPI alt-svc SPNEGO Kerberos NTLM
-- Enabled protocols: HTTP HTTPS
-- Enabled SSL backends: Schannel
-- Not using system gtest, using built-in googletest project instead.
-- Populating googletest
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/REPOS/PERSONAL/CPR_TEST/build/_deps/googletest-subbuild
Microsoft (R) Build Engine version 16.10.2+857e5a733 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Checking Build System
  Creating directories for 'googletest-populate'
  Building Custom Rule C:/REPOS/PERSONAL/CPR_TEST/build/_deps/googletest-subbuild/CMakeLists.txt
  Performing download step (download, verify and extract) for 'googletest-populate'
  -- Downloading...
     dst='C:/REPOS/PERSONAL/CPR_TEST/build/_deps/googletest-subbuild/googletest-populate-prefix/src/release-1.10.0.tar.gz'
     timeout='none'
     inactivity timeout='none'
  -- Using src='https://github.com/google/googletest/archive/release-1.10.0.tar.gz'
  -- [download 100% complete]
  -- [download 1% complete]
  -- [download 4% complete]
  -- [download 6% complete]
  -- [download 7% complete]
  -- [download 9% complete]
  -- [download 10% complete]
  -- [download 11% complete]
  -- [download 12% complete]
  -- [download 13% complete]
  -- [download 14% complete]
  -- [download 16% complete]
  -- [download 17% complete]
  -- [download 18% complete]
  -- [download 19% complete]
  -- [download 21% complete]
  -- [download 22% complete]
  -- [download 23% complete]
  -- [download 25% complete]
  -- [download 29% complete]
  -- [download 30% complete]
  -- [download 31% complete]
  -- [download 32% complete]
  -- [download 34% complete]
  -- [download 35% complete]
  -- [download 36% complete]
  -- [download 37% complete]
  -- [download 38% complete]
  -- [download 39% complete]
  -- [download 41% complete]
  -- [download 42% complete]
  -- [download 44% complete]
  -- [download 46% complete]
  -- [download 47% complete]
  -- [download 48% complete]
  -- [download 53% complete]
  -- [download 54% complete]
  -- [download 55% complete]
  -- [download 56% complete]
  -- [download 57% complete]
  -- [download 58% complete]
  -- [download 60% complete]
  -- [download 61% complete]
  -- [download 63% complete]
  -- [download 64% complete]
  -- [download 65% complete]
  -- [download 66% complete]
  -- [download 68% complete]
  -- [download 69% complete]
  -- [download 70% complete]
  -- [download 71% complete]
  -- [download 72% complete]
  -- [download 73% complete]
  -- [download 74% complete]
  -- [download 75% complete]
  -- [download 76% complete]
  -- [download 78% complete]
  -- [download 79% complete]
  -- [download 80% complete]
  -- [download 82% complete]
  -- [download 84% complete]
  -- [download 85% complete]
  -- [download 86% complete]
  -- [download 87% complete]
  -- [download 88% complete]
  -- [download 89% complete]
  -- [download 90% complete]
  -- [download 91% complete]
  -- [download 92% complete]
  -- [download 93% complete]
  -- [download 94% complete]
  -- [download 95% complete]
  -- [download 96% complete]
  -- [download 97% complete]
  -- [download 99% complete]
  -- [download 100% complete]
  -- verifying file...
         file='C:/REPOS/PERSONAL/CPR_TEST/build/_deps/googletest-subbuild/googletest-populate-prefix/src/release-1.10.0.tar.gz'
  -- Downloading... done
  -- extracting...
       src='C:/REPOS/PERSONAL/CPR_TEST/build/_deps/googletest-subbuild/googletest-populate-prefix/src/release-1.10.0.tar.gz'
       dst='C:/REPOS/PERSONAL/CPR_TEST/build/_deps/googletest-src'
  -- extracting... [tar xfz]
  -- extracting... [analysis]
  -- extracting... [rename]
  -- extracting... [clean up]
  -- extracting... done
  No update step for 'googletest-populate'
  No patch step for 'googletest-populate'
  No configure step for 'googletest-populate'
  No build step for 'googletest-populate'
  No install step for 'googletest-populate'
  No test step for 'googletest-populate'
  Completed 'googletest-populate'
  Building Custom Rule C:/REPOS/PERSONAL/CPR_TEST/build/_deps/googletest-subbuild/CMakeLists.txt
CMake Deprecation Warning at build/_deps/googletest-src/CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at build/_deps/googletest-src/googlemock/CMakeLists.txt:45 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at build/_deps/googletest-src/googletest/CMakeLists.txt:56 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Found PythonInterp: C:/Users/zagrizzl/AppData/Local/Programs/Python/Python39/python.exe (found version "3.9.6")
-- Building mongoose project for test support.
CMake Error at build/_deps/cpr-src/CMakeLists.txt:243 (message):
  OpenSSL is required for SSL test, but it seams like OpenSSL is not being
  used as SSL backend.  Either set CPR_BUILD_TESTS_SSL to OFF or set
  CPR_FORCE_OPENSSL_BACKEND to ON and try again.

-- Configuring incomplete, errors occurred!
See also "C:/REPOS/PERSONAL/CPR_TEST/build/CMakeFiles/CMakeOutput.log".
See also "C:/REPOS/PERSONAL/CPR_TEST/build/CMakeFiles/CMakeError.log".
`
KingKili commented 3 years ago

Regarding your Issue, your are definitely on the right track. OpenSSL with your configuration only required for testing. Therefore setting CPR_BUILD_TESTS_SSL=OFF should resolve this Issue. I would try removing the build directory, and then running

mkdir build
cd build
cmake .. -DCPR_BUILD_TESTS=OFF
cmake --build .

Usually this should resolve your Issue.

I totally agree that the Windows support of cpr and it's docs, is best described as lacking. Unfortunately I stopped using Windows about 6 years ago. I would pretty much consider myself clueless on Windows for development. Therefore, I do not see myself in the position, to improve those issues. That's why such changes must come from the community of cpr (Since it is having a pretty respectable size, I have sincere hope that this could happen). So I would conclude this issue with PRs from users welcome.