用Makefile构建cuda和boost库

Building cuda and boost library with Makefile

本文关键字:boost cuda Makefile 构建      更新时间:2023-10-16

我有一个makefile:

projectx: component1.obj          
nvcc -O3 -arch=sm_20 -lcuda -o projectx component2.obj
component1.obj : component1.cu component1.h 
    nvcc -O3 -arch=sm_20 -c component1.cu
component2.obj : component2.cu cm.h component2.h
nvcc -O3 -arch=sm_20 -c component2.cu

component1.cu包含#include <boost/lambda/lambda.hpp>当我试图用nmake构建它时,它告诉我"无法打开包含文件:'boost/lambda/lambda.hpp'"

我该怎么做?如何告诉nvcc从哪里获取这个包含文件?

使用-I标志。例:-I/opt/cuda-toolkit/include

boost 'include'文件放入C:Program Files (x86)Microsoft Visual Studio 10.0VCinclude