Skip to content

Commit

Permalink
chore: add xxh3 to build.cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucy committed Nov 27, 2024
1 parent dcfb873 commit d9584dc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
14 changes: 14 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ^
Expand Down Expand Up @@ -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 ^
Expand Down
8 changes: 3 additions & 5 deletions src/xxh3.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cstddef>
#include <cstdint>
#include <iterator> // for std::data, std::size
#include <type_traits>
#include <utility>
import std;
import std.compat;

export module xxh3;

Expand Down

0 comments on commit d9584dc

Please sign in to comment.