Sie können den QT-Creator verwenden, der in Kombination mit cmake sehr gut funktioniert:
cmake_minimum_required(VERSION 2.6.2)
project(GPU_PROJECT)
#set(CMAKE_BUILD_TYPE Debug)
#In case findCUDA.cmake wasn't found, download it from here
# https://gforge.sci.utah.edu/gf/project/findcuda/scmsvn/?action=browse&path=%2F*checkout*%2Ftrunk%2FFindCuda.html
# and put it into SOURCE_DIR/CMake
#set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
#### Cuda
# find_package(CUDA)
find_package(CUDA 3 QUIET REQUIRED)
# find_package(CUDA 2.1)
# find_package(CUDA 2.2)
# find_package(CUDA 2.3)
# find_package(CUDA 2.1 REQUIRED)
# find_package(CUDA 2.2 REQUIRED)
# find_package(CUDA 2.3 REQUIRED)
# find_package(CUDA 2.1 EXACT)
# find_package(CUDA 2.2 EXACT)
# find_package(CUDA 2.3 EXACT)
# find_package(CUDA 2.1 EXACT REQUIRED)
# find_package(CUDA 2.2 EXACT REQUIRED)
# find_package(CUDA 2.3 EXACT REQUIRED)
# find_package(CUDA 2.2 EXACT QUIET REQUIRED)
if (CUDA_FOUND)
message(" * CUDA ${CUDA_VERSION} was found")
else(CUDA_FOUND)
message(" * CUDA is not found")
message(FATAL_ERROR "Not all CUDA libraries are found")
endif(CUDA_FOUND)
set(SRCS
src/main.cpp
src/cuda_core.cu
)
cuda_add_executable(GPU_PROJECT ${SRCS})
target_link_libraries(GPU_PRJECT ${SOME_LIBRARY})
Wenn Sie zusätzliche Debug-Funktionen haben wollen, ersetzen Sie gdb durch cuda-gdb in der QT-Creator-Konfiguration.