MSVC support
This commit is contained in:
@@ -13,7 +13,12 @@ if (NOT DEFINED OPTCON_LOCAL_BUILD)
|
|||||||
FetchContent_MakeAvailable(fmt)
|
FetchContent_MakeAvailable(fmt)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_compile_options(-Wall -Wextra -Wpedantic)
|
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(src)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
|
|||||||
@@ -9,6 +9,11 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
// https://www.scivision.dev/ssize_t-platform-independent
|
||||||
|
#define ssize_t std::ptrdiff_t
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace ipc {
|
namespace ipc {
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -5,7 +5,10 @@
|
|||||||
#include <fmt/core.h>
|
#include <fmt/core.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
|
#if !defined(_MSC_VER)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "ipc.hpp"
|
#include "ipc.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,10 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <fmt/core.h>
|
#include <fmt/core.h>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
|
#if !defined(_MSC_VER)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "ipc/api.hpp"
|
#include "ipc/api.hpp"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user