diff options
author | David Cook <divergentdave@gmail.com> | 2022-04-12 21:51:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-12 19:51:09 -0700 |
commit | 39a5596ef4b79383cd642403a6cba91ae6f8049d (patch) | |
tree | 0f7e232990c1b97d26d6ec908de05d02c6d09ac5 /.gitignore | |
parent | 96cb4ad3257d4c3f2ce5f434d64b4d0ae33d4d71 (diff) |
Add CMake build system (with Windows support) (#253)
This adds a cross-platform CMake build system, which supports basic
building and testing on Linux, macOS and Windows. (It does not
yet have parity on Linux/macOS debug builds, sanitizer builds, or
running test harnesses, but those could be added in the future with
CMAKE_BUILD_TYPE conditionals and CTest. It also doesn't cover the
install step yet.) I also rewrote the bash test harnesses in Python,
as a cross-platform substitute, and fixed a couple portability issues
with the test programs.
* Added CMake projects.
* Added Python versions of shell scripts.
* Moved Windows compatibility defines to common.h, so common.c would
see them. (Prior to this, read_cb was checking `errno` rather than
`WSAGetLastError()`, failing to properly handle `WSAEWOULDBLOCK`,
and reporting an EOF too early.
* Added a forward declaration of `ws_strerror()`. Without this declaration,
the compiler would assume it returned an `int` rather than a pointer, which
resulted in the pointer getting truncated, and a later `fprintf` call performing
a wild read. (In retrospect, this was foretold in #235)
* Added CMake CI jobs on Windows, macOS, and Linux.
Fixes #192, fixes #121
Diffstat (limited to '.gitignore')
-rw-r--r-- | .gitignore | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1,2 +1,3 @@ target Cargo.lock +/build |