博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
qt ubuntu16.04下qmake备忘
阅读量:6342 次
发布时间:2019-06-22

本文共 2096 字,大约阅读时间需要 6 分钟。

#-------------------------------------------------## Project created by QtCreator 2014-04-03T18:12:01##-------------------------------------------------QT       += coreQT       -= guiTARGET = CUDA_helloworldCONFIG   += consoleCONFIG   -= app_bundleTEMPLATE = appSOURCES += main.cpp# GLMINCLUDEPATH += /usr/local/glm# C++ flagQMAKE_CXXFLAGS_RELEASE=-O3# CUDA stuffCUDA_SOURCES += kernel2.cu\# uncomment below to also import include CUDA SDK#CUDA_SDK = /contrib/projects/cuda-sdk/C#INCLUDEPATH += $$CUDA_SDK/common/inc/#INCLUDEPATH += $$CUDA_SDK/../shared/inc/#QMAKE_LIBDIR += $$CUDA_SDK/lib#QMAKE_LIBDIR += $$CUDA_SDK/common/libCUDA_DIR = /usr/local/cuda-8.0INCLUDEPATH += $$CUDA_DIR/includeQMAKE_LIBDIR += $$CUDA_DIR/lib64#LD_LIBRARY_PATH=$${LD_LIBRARY_PATH}:$$CUDA_DIR/lib64#message($${LD_LIBRARY_PATH})#$$(PATH) = $$(PATH):$$CUDA_DIR/bin#message($$(PATH))LIBS += -lcudart -lcudaOTHER_FILES += \    CUDA_notes.txt# GPU ARCH# this gets passed as the gpu-architecture flag to nvcc compiler# specifying particular architectures enable certain features, limited to the compute capability# of the GPU. compute capabilities listed here http://en.wikipedia.org/wiki/CUDA# MSLAB GeForce 460 seems to have compute capability 2.1CUDA_ARCH = sm_21# custom NVCC flagsNVCCFLAGS     = --compiler-options -fno-strict-aliasing -use_fast_math --ptxas-options=-v# Prepare the extra compiler configuration (taken from the nvidia forum - i'm not an expert in this part)CUDA_INC = $$join(INCLUDEPATH,' -I','-I',' ')# compile CUDA kernels using nvcccuda.commands = $$CUDA_DIR/bin/nvcc -m64 -g -G -arch=$$CUDA_ARCH -c $$NVCCFLAGS $$CUDA_INC $$LIBS  ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT} \    2>&1 | sed -r \"s/\\(([0-9]+)\\)/:\\1/g\" 1>&2# Prepare the extra compiler configuration (taken from the nvidia forum - i'm not an expert in this part)cuda.input = CUDA_SOURCEScuda.output = ${OBJECTS_DIR}${QMAKE_FILE_BASE}_cuda.o # suffix needed for this to work?# Tell Qt that we want add more stuff to the MakefileQMAKE_EXTRA_UNIX_COMPILERS += cudaDISTFILES +=HEADERS +=

 

转载于:https://www.cnblogs.com/wjx-zjut/p/7563290.html

你可能感兴趣的文章
数据对象映射模式(通过工厂模式和注册树模式)v2
查看>>
4939 欧拉函数[一中数论随堂练]
查看>>
MySQL笔记(一)
查看>>
spring boot 包jar运行
查看>>
通过VMWare安装Linux(Ubuntu) 虚拟机在Window10系统和问题解决方案
查看>>
18年秋季学习总结
查看>>
Effective前端1:能使用html/css解决的问题就不要使用JS
查看>>
网络攻防 实验一
查看>>
由莫名其妙的错误开始---浅谈jquery的dom节点创建
查看>>
磨刀-CodeWarrior11生成的Makefile解析
查看>>
String StringBuffer StringBuilder对比
查看>>
.NET与C#
查看>>
在uwp仿制WPF的Window
查看>>
bootstrap随笔点击增加
查看>>
oracle 中proc和oci操作对缓存不同处理
查看>>
[LeetCode] Spiral Matrix 解题报告
查看>>
60906磁悬浮动力系统应用研究与模型搭建
查看>>
指纹获取 Fingerprint2
查看>>
SB阿里云,windows2012r2无法安装.net3.5
查看>>
函数的继承
查看>>