点击(此处)折叠或打开
- cmake_minimum_required(VERSION 3.5)
- PROJECT(vectorAdd)
- FIND_PACKAGE(CUDA REQUIRED)
- INCLUDE_DIRECTORIES(
- ./
- ${CUDA_INCLUDE_DIRS}
- ../../common/inc
- )
- add_compile_options(-std=c++11)
- SET(CUDA_PATH "/usr/local/cuda-9.1")
- link_directories(
- ${CUDA_PATH}/lib64
- ../../common/lib/linux/x86_64
- )
- set(SRC_LIST vectorAdd.cu)
- CUDA_ADD_EXECUTABLE(${PROJECT_NAME} ${SRC_LIST})
- target_link_libraries(${PROJECT_NAME} ${CUDA_LIBRARIES})