Mercurial > hg > GearsTemplate
view src/test/CMakeLists.txt @ 292:2bc63a22dd21
add twice
author | ikkun |
---|---|
date | Thu, 09 Feb 2017 19:51:32 +0900 |
parents | 87128b876c63 |
children | f6770c0a24c2 |
line wrap: on
line source
cmake_minimum_required(VERSION 2.8) # add_definitions("-Wall -g -O0") set(CMAKE_C_COMPILER $ENV{CBC_COMPILER}) set(CUDA_LINK_FLAGS "-Wl,-search_paths_first -Wl,-headerpad_max_install_names /Developer/NVIDIA/CUDA-8.0/lib/libcudart_static.a -Wl,-rpath,/usr/local/cuda/lib") SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CUDA_LINK_FLAGS}" ) cmake_minimum_required(VERSION 2.8) find_package(CUDA REQUIRED) add_custom_command(OUTPUT main.o DEPENDS main.cu COMMAND nvcc -O -c main.cu ) add_executable(cudaExmple main.o test.c) add_custom_command(OUTPUT twice.o DEPENDS twice.cu COMMAND nvcc -O -c twice.cu ) add_custom_command(OUTPUT multiply.o DEPENDS multiply.cu COMMAND nvcc -O -c multiply.cu ) add_executable(twiceExmple twice.o multiply.o test.c)