Как нужно оформить pro файл что бы использоывать CUDA в Qt Creatore с компилятором msvc2012? Пытаюсь сделать так Код | # Add more folders to ship with the application, here folder_01.source = qml/test1 folder_01.target = qml DEPLOYMENTFOLDERS = folder_01
# Additional import path used to resolve QML modules in Creator's code model QML_IMPORT_PATH =
# If your application uses the Qt Mobility libraries, uncomment the following # lines and add the respective components to the MOBILITY variable. # CONFIG += mobility # MOBILITY +=
# Define output directories DESTDIR = release OBJECTS_DIR = release/obj CUDA_OBJECTS_DIR = release/cuda
# The .cpp file which was generated for your project. Feel free to hack it. SOURCES += main.cpp
# This makes the .cu files appear in your project OTHER_FILES += vectorAddition.cu
# CUDA settings <-- may change depending on your system CUDA_SOURCES += vectorAddition.cu #CUDA_SDK = "C:/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK 4.2/C" # Path to cuda SDK install CUDA_DIR = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v5.5" # Path to cuda toolkit install SYSTEM_NAME = x64 # Depending on your system either 'Win32', 'x64', or 'Win64' SYSTEM_TYPE = 64 # '32' or '64', depending on your system CUDA_ARCH = sm_30 # Type of CUDA architecture, for example 'compute_10', 'compute_11', 'sm_10' NVCC_OPTIONS = --use_fast_math
# include paths INCLUDEPATH += $$CUDA_DIR/include #$$CUDA_SDK/common/inc/ \ #$$CUDA_SDK/../shared/inc/
# library directories QMAKE_LIBDIR += $$CUDA_DIR/lib/$$SYSTEM_NAME #$$CUDA_SDK/common/lib/$$SYSTEM_NAME \ #$$CUDA_SDK/../shared/lib/$$SYSTEM_NAME
# The following library conflicts with something in Cuda QMAKE_LFLAGS_RELEASE = /NODEFAULTLIB:msvcrt.lib QMAKE_LFLAGS_DEBUG = /NODEFAULTLIB:msvcrtd.lib
# Add the necessary libraries CUDA_LIBS = cuda cudart # The following makes sure all path names (which often include spaces) are put between quotation marks CUDA_INC = $$join(QMAKE_LIBDIR,'" -I"','-I"','"') NVCC_LIBS = $$join(CUDA_LIBS,' -l','-l', '') LIBS += $$join(CUDA_LIBS,'.lib ', '', '.lib')
# Configuration of the Cuda compiler CONFIG(debug, debug|release) { # Debug mode cuda_d.input = CUDA_SOURCES cuda_d.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}_cuda.o cuda_d.commands = $$CUDA_DIR/bin/nvcc.exe -D_DEBUG $$NVCC_OPTIONS $$CUDA_INC $$NVCC_LIBS --machine $$SYSTEM_TYPE -arch=$$CUDA_ARCH -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME} cuda_d.dependency_type = TYPE_C QMAKE_EXTRA_COMPILERS += cuda_d } else { # Release mode cuda.input = CUDA_SOURCES cuda.output = $$CUDA_BJECTS_DIR/${QMAKE_FILE_BASE}_cuda.o cuda.commands = $$CUDA_DIR/bin/nvcc.exe $$NVCC_OPTIONS $$CUDA_INC $$NVCC_LIBS --machine $$SYSTEM_TYPE -arch=$$CUDA_ARCH -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME} cuda.dependency_type = TYPE_C QMAKE_EXTRA_COMPILERS += cuda } # Installation path # target.path =
# Please do not modify the following two lines. Required for deployment.
include(qtquick2applicationviewer/qtquick2applicationviewer.pri) qtcAddDeployment()
|
|