MSVC support
This commit is contained in:
@@ -13,7 +13,12 @@ if (NOT DEFINED OPTCON_LOCAL_BUILD)
|
||||
FetchContent_MakeAvailable(fmt)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
# https://learn.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level?view=msvc-170
|
||||
add_compile_options(/Wall)
|
||||
else()
|
||||
add_compile_options(-Wall -Wextra -Wpedantic)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(test)
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
// https://www.scivision.dev/ssize_t-platform-independent
|
||||
#define ssize_t std::ptrdiff_t
|
||||
#endif
|
||||
|
||||
namespace ipc {
|
||||
|
||||
void
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
#include <fmt/core.h>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "ipc.hpp"
|
||||
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
#include <cmath>
|
||||
#include <fmt/core.h>
|
||||
#include <thread>
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "ipc/api.hpp"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user