this doesn't actually do what I really want it to do (use c++ instead of
cc to link); for some reason it skips building the curl-impersonate
binary instead(?!)

however, that does allow linking just that one file in post-build.
horribly ugly, but nothing else I tried works:

- setting CMAKE_C_LINK_EXECUTABLE to c++ just runs "c++" rather than
adding the flags, list of files to link, output, etc to the command line.

- setting CMAKE_C_LINK_EXECUTABLE to "c++ <FLAGS> <OBJECTS> -o <TARGET>
<LINK_FLAGS> <LINK_LIBRARIES>" tries to run a command called "c++ [whatever]"
which obviously doesn't exist

if a better fix can be found, rather than this horrible patching-a-patch,
it might be possible to patch src/CMakeLists.txt and append to
_curl_platform_flags, e.g.

if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")'
       list(APPEND _curl_platform_flags "-DSOME_VAR=contents")
endif()


Index: patches/curl.patch
--- patches/curl.patch.orig
+++ patches/curl.patch
@@ -10714,6 +10714,14 @@ index 1f76839009..b5fc35f8a2 100644
  set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}")
  
  set(_curl_cfiles_gen "")
+@@ -102,6 +102,7 @@ add_executable(${EXE_NAME} ${CURL_CFILES} ${CURL_HFILE
+ target_compile_definitions(${EXE_NAME} PRIVATE ${_curl_definitions})
+ target_link_libraries(${EXE_NAME} ${LIB_SELECTED_FOR_EXE} ${CURL_LIBS})
+ set_property(TARGET ${EXE_NAME} APPEND PROPERTY COMPILE_OPTIONS "${CURL_CFLAGS}")
++set_property(TARGET ${EXE_NAME} APPEND PROPERTY LINKER_LANGUAGE CXX)
+ if(WIN32)
+   set_property(TARGET ${EXE_NAME} APPEND PROPERTY SOURCES ${CURL_RCFILES})
+ endif()
 diff --git a/src/Makefile.am b/src/Makefile.am
 index 69554ee490..d0052604bd 100644
 --- a/src/Makefile.am
