libftdi Archives

Subject: Re: updating cmake and msvc compat

From: Xiaofan Chen <xiaofanc@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 5 Feb 2021 09:51:51 +0800
On Thu, Dec 10, 2020 at 3:46 AM Shawn Hoffman <godisgovernment@xxxxxxxxx> wrote:
>
> 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.

This would be a nice addition.

One possibility is to create a github repo fork and then send the patch info
to the mailing list.
http://developer.intra2net.com/mailarchive/html/libftdi/2021/msg00000.html
https://github.com/planetmarshall/libftdi/tree/modernize_cmake

Or you can just send the patch series to the mailing list.

-- 
Xiaofan

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

Current Thread