Fully inlined HandmadeMath.h (#139)

* Fully inlined HandmadeMath.h, renamed test.bat to run_test_msvc.bat, and introduced run_test_clang.bat

* General Cleanup
This commit is contained in:
Zak Strange
2021-08-31 17:10:46 -07:00
committed by GitHub
parent 8c18186b3b
commit d69a859d73
4 changed files with 438 additions and 522 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -10,6 +10,8 @@ To get started, go download [the latest release](https://github.com/HandmadeMath
Version | Changes | Version | Changes |
----------------|----------------| ----------------|----------------|
**1.13.0** | Fully inlined HandmadeMath.h. No need for HANDMADE_MATH_IMPLEMENTATION anymore |
**1.12.1** | Added extra parentheses around some macros | **1.12.1** | Added extra parentheses around some macros |
**1.12.0** | Added Unary Minus operator for `HMM_Vec2`, `HMM_Vec3`, and `HMM_Vec4`. | **1.12.0** | Added Unary Minus operator for `HMM_Vec2`, `HMM_Vec3`, and `HMM_Vec4`. |
**1.11.1** | Added HMM_PREFIX macro to a few functions that were missing it. | **1.11.1** | Added HMM_PREFIX macro to a few functions that were missing it. |

18
test/run_test_clang.bat Normal file
View File

@@ -0,0 +1,18 @@
@echo off
if not exist "build" mkdir build
pushd build
clang-cl /Fehmm_test_c.exe ..\HandmadeMath.c ..\hmm_test.c
hmm_test_c
clang-cl /Fehmm_test_c_no_sse.exe /DHANDMADE_MATH_NO_SSE ..\HandmadeMath.c ..\hmm_test.c
hmm_test_c_no_sse
clang-cl /Fehmm_test_cpp.exe ..\HandmadeMath.cpp ..\hmm_test.cpp
hmm_test_cpp
clang-cl /Fehmm_test_cpp_no_sse.exe /DHANDMADE_MATH_NO_SSE ..\HandmadeMath.cpp ..\hmm_test.cpp
hmm_test_cpp_no_sse
popd

View File

@@ -1,27 +1,27 @@
@echo off @echo off
if "%1%"=="travis" ( if "%1%"=="travis" (
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64 call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64
) else ( ) else (
where /q cl where /q cl
if ERRORLEVEL 1 ( if ERRORLEVEL 1 (
for /f "delims=" %%a in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -find VC\Auxiliary\Build\vcvarsall.bat') do (%%a x64) for /f "delims=" %%a in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -find VC\Auxiliary\Build\vcvarsall.bat') do (%%a x64)
) )
) )
if not exist "build" mkdir build if not exist "build" mkdir build
pushd build pushd build
cl /Fehmm_test_c.exe ..\HandmadeMath.c ..\hmm_test.c cl /Fehmm_test_c.exe ..\HandmadeMath.c ..\hmm_test.c
hmm_test_c hmm_test_c
cl /Fehmm_test_c_no_sse.exe /DHANDMADE_MATH_NO_SSE ..\HandmadeMath.c ..\hmm_test.c cl /Fehmm_test_c_no_sse.exe /DHANDMADE_MATH_NO_SSE ..\HandmadeMath.c ..\hmm_test.c
hmm_test_c_no_sse hmm_test_c_no_sse
cl /Fehmm_test_cpp.exe ..\HandmadeMath.cpp ..\hmm_test.cpp cl /Fehmm_test_cpp.exe ..\HandmadeMath.cpp ..\hmm_test.cpp
hmm_test_cpp hmm_test_cpp
cl /Fehmm_test_cpp_no_sse.exe /DHANDMADE_MATH_NO_SSE ..\HandmadeMath.cpp ..\hmm_test.cpp cl /Fehmm_test_cpp_no_sse.exe /DHANDMADE_MATH_NO_SSE ..\HandmadeMath.cpp ..\hmm_test.cpp
hmm_test_cpp_no_sse hmm_test_cpp_no_sse
popd popd