Added the ability to compile in C++ (Makefile USE_CPP=1)

pull/4540/head
AlexeyAB 6 years ago
parent 1626f9d495
commit f4b2612b04
  1. 4
      .circleci/config.yml
  2. 6
      Makefile

@ -10,6 +10,8 @@ jobs:
- run: nvcc --version - run: nvcc --version
- run: make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 -j 8 - run: make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 -j 8
- run: make clean - run: make clean
- run: make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 DEBUG=1 -j 8
- run: make clean
- run: make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 AVX=1 -j 8 - run: make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 AVX=1 -j 8
- run: make clean - run: make clean
- run: make LIBSO=1 GPU=0 CUDNN=0 OPENCV=1 -j 8 - run: make LIBSO=1 GPU=0 CUDNN=0 OPENCV=1 -j 8
@ -19,3 +21,5 @@ jobs:
- run: make LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 -j 8 - run: make LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 -j 8
- run: make clean - run: make clean
- run: make LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 CUDNN_HALF=1 -j 8 - run: make LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 CUDNN_HALF=1 -j 8
- run: make clean
- run: make LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 CUDNN_HALF=1 USE_CPP=1 -j 8

@ -11,6 +11,7 @@ ZED_CAMERA=0
# set CUDNN_HALF=1 to further speedup 3 x times (Mixed-precision on Tensor Cores) GPU: Volta, Xavier, Turing and higher # set CUDNN_HALF=1 to further speedup 3 x times (Mixed-precision on Tensor Cores) GPU: Volta, Xavier, Turing and higher
# set AVX=1 and OPENMP=1 to speedup on CPU (if error occurs then set AVX=0) # set AVX=1 and OPENMP=1 to speedup on CPU (if error occurs then set AVX=0)
USE_CPP=0
DEBUG=0 DEBUG=0
ARCH= -gencode arch=compute_30,code=sm_30 \ ARCH= -gencode arch=compute_30,code=sm_30 \
@ -52,7 +53,12 @@ LIBNAMESO=libdarknet.so
APPNAMESO=uselib APPNAMESO=uselib
endif endif
ifeq ($(USE_CPP), 1)
CC=g++
else
CC=gcc CC=gcc
endif
CPP=g++ CPP=g++
NVCC=nvcc NVCC=nvcc
OPTS=-Ofast OPTS=-Ofast

Loading…
Cancel
Save