libftdi Archives

Subject: updating cmake and msvc compat

From: Shawn Hoffman <godisgovernment@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 9 Dec 2020 11:45:50 -0800
I've made some minor changes to libftdi to allow building with msvc
(cmake/ninja/msvc and the ms crt for example). During this, I noticed
that the cmake files of libftdi seem to be quite outdated. Would a
patch updating cmake files to use more modern features (and therefore
require a higher cmake version) be acceptable? Is there a specific
cmake version libftdi is trying to maintain compatibility with?

fwiw, the minimum code change required for msvc support is just
implementing gettimeofday() as a wrapper around the C-standard
timespec_get(). Unfortunately libftdi exposes `struct timeval` in it's
API as part of `FTDIProgressInfo`, so it probably doesn't make sense
to just migrate all uses of gettimeofday to timespec_get.

Additionally, the "deprecated #define" can be implemented as e.g.
#pragma deprecated("SIO_RESET_PURGE_RX")
for msvc.

Thanks,
-Shawn

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread
  • updating cmake and msvc compat, Shawn Hoffman <=