-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
73e0908
commit 842ffa2
Showing
3 changed files
with
139 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/sh | ||
|
||
echo "Automatic build script of radarsimcpp/radarsimpy for Linux" | ||
echo "" | ||
echo "----------" | ||
echo "RadarSimPy - A Radar Simulator Built with Python" | ||
echo "Copyright (C) 2018 - PRESENT radarsimx.com" | ||
echo "E-mail: [email protected]" | ||
echo "Website: https://radarsimx.com" | ||
echo "" | ||
echo "██████╗ █████╗ ██████╗ █████╗ ██████╗ ███████╗██╗███╗ ███╗██╗ ██╗" | ||
echo "██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔════╝██║████╗ ████║╚██╗██╔╝" | ||
echo "██████╔╝███████║██║ ██║███████║██████╔╝███████╗██║██╔████╔██║ ╚███╔╝ " | ||
echo "██╔══██╗██╔══██║██║ ██║██╔══██║██╔══██╗╚════██║██║██║╚██╔╝██║ ██╔██╗ " | ||
echo "██║ ██║██║ ██║██████╔╝██║ ██║██║ ██║███████║██║██║ ╚═╝ ██║██╔╝ ██╗" | ||
echo "╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝" | ||
|
||
workpath=$(pwd) | ||
|
||
echo "## Clean old build files ##" | ||
rm -rf ./src/radarsimcpp/build | ||
rm -rf ./radarsimpy | ||
|
||
echo "## Building libradarsimcpp.so with GPU ##" | ||
mkdir ./src/radarsimcpp/build | ||
cd ./src/radarsimcpp/build | ||
|
||
cmake -DCMAKE_BUILD_TYPE=Release -DGPU_BUILD=ON -DGTEST=ON .. | ||
cmake --build . | ||
|
||
echo "## Building radarsimpy with Cython ##" | ||
cd $workpath | ||
python setup_cuda_freetier.py build_ext -b ./ | ||
|
||
echo "## Copying lib files to ./radarsimpy ##" | ||
# mkdir ./radarsimpy/lib | ||
cp ./src/radarsimpy/*.py ./radarsimpy | ||
cp ./src/radarsimpy/lib/__init__.py ./radarsimpy/lib | ||
cp ./src/radarsimcpp/build/*.so ./radarsimpy | ||
|
||
echo "## Cleaning radarsimpy builds ##" | ||
rm -rf build | ||
|
||
rm -f ./src/radarsimpy/*.c | ||
rm -f ./src/radarsimpy/*.cpp | ||
rm -f ./src/radarsimpy/*.html | ||
rm -f ./src/radarsimpy/raytracing/*.c | ||
rm -f ./src/radarsimpy/raytracing/*.cpp | ||
rm -f ./src/radarsimpy/raytracing/*.html | ||
rm -f ./src/radarsimpy/lib/*.cpp | ||
rm -f ./src/radarsimpy/lib/*.html | ||
rm -f ./src/*.cpp | ||
rm -f ./src/*.html | ||
|
||
echo "## Copying lib files to unit test folder ##" | ||
rm -rf ./tests/radarsimpy | ||
mkdir ./tests/radarsimpy | ||
cp -rf ./radarsimpy/* ./tests/radarsimpy | ||
|
||
echo "## Build completed ##" | ||
|
||
echo "## Run Google test ##" | ||
./src/radarsimcpp/build/radarsimcpp_test | ||
|
||
echo "## Pytest ##" | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
@ECHO OFF | ||
|
||
ECHO Automatic build script of radarsimcpp/radarsimpy for Windows | ||
ECHO: | ||
ECHO ---------- | ||
ECHO RadarSimPy - A Radar Simulator Built with Python | ||
ECHO Copyright (C) 2018 - PRESENT radarsimx.com | ||
ECHO E-mail: [email protected] | ||
ECHO Website: https://radarsimx.com | ||
ECHO: | ||
ECHO ******* ** ******** ** ** ** | ||
ECHO /**////** /** **////// // //** ** | ||
ECHO /** /** ****** /** ****** ******/** ** ********** //** ** | ||
ECHO /******* //////** ****** //////** //**//*/*********/**//**//**//** //*** | ||
ECHO /**///** ******* **///** ******* /** / ////////**/** /** /** /** **/** | ||
ECHO /** //** **////** /** /** **////** /** /**/** /** /** /** ** //** | ||
ECHO /** //**//********//******//********/*** ******** /** *** /** /** ** //** | ||
ECHO // // //////// ////// //////// /// //////// // /// // // // // | ||
ECHO: | ||
|
||
SET pwd=%cd% | ||
|
||
ECHO clean old build files | ||
RMDIR /Q/S .\src\radarsimcpp\build | ||
|
||
ECHO clean old radarsimpy module | ||
RMDIR /Q/S .\radarsimpy | ||
|
||
@REM go to the build folder | ||
MD ".\src\radarsimcpp\build" | ||
CD ".\src\radarsimcpp\build" | ||
|
||
ECHO ## Building radarsimcpp.dll with MSVC ## | ||
@REM MSVC needs to set the build type using '--config Relesae' | ||
cmake -DGPU_BUILD=ON -DGTEST=ON .. | ||
cmake --build . --config Release | ||
|
||
ECHO ## Building radarsimpy with Cython ## | ||
CD %pwd% | ||
python setup_cuda_freetier.py build_ext -b ./ | ||
|
||
ECHO ## Copying dll files to ./radarsimpy ## | ||
XCOPY ".\src\radarsimcpp\build\Release\radarsimcpp.dll" ".\radarsimpy\" | ||
XCOPY ".\src\radarsimpy\*.py" ".\radarsimpy\" | ||
XCOPY ".\src\radarsimpy\lib\__init__.py" ".\radarsimpy\lib\" | ||
|
||
ECHO ## Cleaning radarsimpy builds ## | ||
RMDIR build /s /q | ||
|
||
DEL ".\src\radarsimpy\*.c" | ||
DEL ".\src\radarsimpy\*.cpp" | ||
DEL ".\src\radarsimpy\*.html" | ||
DEL ".\src\radarsimpy\raytracing\*.c" | ||
DEL ".\src\radarsimpy\raytracing\*.cpp" | ||
DEL ".\src\radarsimpy\raytracing\*.html" | ||
DEL ".\src\radarsimpy\lib\*.cpp" | ||
DEL ".\src\radarsimpy\lib\*.html" | ||
DEL ".\src\*.cpp" | ||
DEL ".\src\*.html" | ||
|
||
ECHO ## Copying lib files to unit test folder ## | ||
|
||
RMDIR /Q/S .\tests\radarsimpy | ||
XCOPY /E /I .\radarsimpy .\tests\radarsimpy | ||
|
||
ECHO ## Build completed ## | ||
|
||
ECHO ## Run Google test ## | ||
.\src\radarsimcpp\build\Release\radarsimcpp_test.exe | ||
|
||
ECHO ## Pytest ## | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters