mirror of https://github.com/google/gemma.cpp.git
It's not possible to build `gemma.cpp` with the standard MSVC front-end as it doesn't support arrays more than `0x7ffffffff` bytes (see Compiler Error C2148), however this isn't a problem with the optional Visual Studio Clang/LLVM frontend. This can be specified using the `-T` flag when running CMake: ``` $ cmake -B build -T ClangCL $ cmake --build build --config Release ``` Windows doesn't provide `pread`/`pwrite` so this must be emulated using the `ReadFile`/`WriteFile` Win32 APIs. `_CRT_SECURE_NO_WARNINGS` is defined to prevent a large number of warnings about using "depricated" function names (e.g. `close` instead of `_close`). `NOMINMAX` is defined to prevent the `min`/`max` macros from `windows.h` from conflicting with expressions like `std::min`. Generally libraries should avoid including `windows.h` in their public headers or define `WIN32_LEAN_AND_MEAN` before including the `windows.h` header, but this unfortunately isn't always the case. |
||
|---|---|---|
| .. | ||
| analyze.h | ||
| blob_store.cc | ||
| blob_store.h | ||
| compress-inl.h | ||
| compress.h | ||
| distortion.h | ||
| nuq-inl.h | ||
| nuq.h | ||
| nuq_test.cc | ||
| sfp-inl.h | ||
| sfp.h | ||
| sfp_test.cc | ||
| stats.cc | ||
| stats.h | ||