From d9584dc6e81e3284528a9de26ac342a72dfc0192 Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Mon, 2 Sep 2024 09:03:04 -0700 Subject: [PATCH] chore: add xxh3 to build.cmd --- build.cmd | 14 ++++++++++++++ src/xxh3.cppm | 8 +++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/build.cmd b/build.cmd index d086bb4..889b26a 100644 --- a/build.cmd +++ b/build.cmd @@ -105,6 +105,19 @@ if %ERRORLEVEL% neq 0 ( exit %ERRORLEVEL% ) +echo INFO: compiling xxh3 module... +pushd %modules_dir% +cl /nologo ^ + /std:c++latest /W4 /MDd /EHsc ^ + /reference "%modules_dir%\std.ifc" ^ + /reference "%modules_dir%\std.compat.ifc" ^ + /c /interface /TP "%root_dir%src\xxh3.cppm" > NUL + +if %ERRORLEVEL% neq 0 ( + echo ERROR: failed to compile xxh3 module + exit %ERRORLEVEL% +) + echo INFO: compiling nlohmann.json module... pushd %modules_dir% cl /nologo ^ @@ -140,6 +153,7 @@ cl /nologo "%root_dir%.cache/cpp2/source/src/main.cpp" ^ /reference "%modules_dir%\std.compat.ifc" "%modules_dir%\std.compat.obj" ^ /reference "%modules_dir%\dylib.ifc" "%modules_dir%\dylib.obj" ^ /reference "%modules_dir%\nlohmann.json.ifc" "%modules_dir%\nlohmann.json.obj" ^ + /reference "%modules_dir%\xxh3.ifc" "%modules_dir%\xxh3.obj" ^ /reference "%modules_dir%\cpp2b.ifc" "%modules_dir%\cpp2b.obj" ^ /std:c++latest /W4 /MDd /EHsc ^ /DEBUG:FULL /Zi /FC ^ diff --git a/src/xxh3.cppm b/src/xxh3.cppm index ae82e94..4cb1a73 100644 --- a/src/xxh3.cppm +++ b/src/xxh3.cppm @@ -39,15 +39,13 @@ Copyright (C) 2012-2020 Yann Collet /* Modified by Ezekiel Warren - removed consteval and _const suffix +- using c++20 imports */ module; -#include -#include -#include // for std::data, std::size -#include -#include +import std; +import std.compat; export module xxh3;