# CUDA configure <<
CUDA_SOURCES = pluralscatter.cu
cuda.input = CUDA_SOURCES
NVCC_FLAGS = -arch=sm_20 -c
CONFIG(debug, debug|release) {
DESTDIR = debug/
NVCC_FLAGS += -G -g
}
CONFIG(release, debug|release) {
DESTDIR = release/
NVCC_FLAGS += -O3
}
win32 {
QMAKE_LIBDIR += $(CUDA_PATH)/lib/Win32
LIBS += cuda.lib cudart.lib curand.lib
NVCC = $(CUDA_PATH)\\bin\\nvcc.exe
NVCC_FLAGS += -m32 --cl-version 2010 --use-local-env
CONFIG(debug, debug|release) {
NVCC_FLAGS += -Xcompiler \"/EHsc /nologo /Od /Zi /MDd\"
}
CONFIG(release, debug|release) {
NVCC_FLAGS += -Xcompiler \"/EHsc /nologo /O2 /Zi /MD\"
}
DESTDIR_TARGET = $$DESTDIR${QMAKE_FILE_BASE}_cuda.obj
}
unix {
QMAKE_LIBDIR += $(CUDA)/lib64
LIBS += -lcuda -lcudart -lcurand
NVCC = $(CUDA)/bin/nvcc
NVCC_FLAGS += -m64
DESTDIR_TARGET = ${QMAKE_FILE_BASE}_cuda.o
}
cuda.commands = $$NVCC $$NVCC_FLAGS ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
cuda.output = $$DESTDIR_TARGET
QMAKE_EXTRA_COMPILERS += cuda
# CUDA configure >>
댓글 없음:
댓글 쓰기