unix: Add build script for tests

This commit is contained in:
2021-09-12 18:49:49 +10:00
parent 3f7b586ca2
commit e5e83fff5c
4 changed files with 44 additions and 12 deletions
+8 -5
View File
@@ -9,15 +9,18 @@ where /q cl || (
)
REM MSVC cl build
echo [SCRIPT] Building tests via cl to build\intc_tests_msvc.exe
echo [SCRIPT] Building tests via cl to build\intc_tests_cpp_msvc.exe
pushd build
cl -nologo -O2 -D INTC_TESTS_WITH_MAIN -I %script_dir% -TP %script_dir%\intc_tests.h /Fe:intc_tests_msvc /link
popd build
cl -nologo -O2 -D INTC_TESTS_WITH_MAIN -I %script_dir% -TP %script_dir%\intc_tests.c /Fe:intc_tests_cpp_msvc /link
echo [SCRIPT] Building tests via cl to build\intc_tests_c_msvc.exe
cl -nologo -O2 -D INTC_TESTS_WITH_MAIN -I %script_dir% -TC %script_dir%\intc_tests.c /Fe:intc_tests_c_msvc /link
popd
REM Optional clang-cl build if we have the compiler on the path
where /q clang-cl || goto :eof
echo [SCRIPT] Building tests via clang-cl to build\intc_tests_clang.exe
echo [SCRIPT] Building tests via clang-cl to build\intc_tests_cpp_clang.exe
pushd build
clang-cl -nologo -O2 -D INTC_TESTS_WITH_MAIN -I %script_dir% -TP %script_dir%\intc_tests.h /Fe:intc_tests_clang /link
clang-cl -nologo -O2 -D INTC_TESTS_WITH_MAIN -I %script_dir% -TP %script_dir%\intc_tests.c /Fe:intc_tests_cpp_clang /link
popd build