Skip to content

Commit

Permalink
Update build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
DefTruth authored Jul 18, 2024
1 parent acb73d1 commit c832625
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ else
fi

cd "${BUILD_DIR}" && pwd
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=./install
if [ $1 == "tensorrt" ]; then
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=./install \
-DENABLE_TENSORRT=ON \
-DCUDA_DIR=/usr/local/cuda \
-DTensorRT_DIR=/usr/local/tensorrt \
-DENABLE_TEST=ON

else
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=./install \
-DENABLE_TEST=ON
fi

make -j8
make install

# bash ./build.sh
# bash ./build.sh tensorrt

0 comments on commit c832625

Please sign in to comment.