Mercurial > hg > Members > Moririn
changeset 296:f16802b3b580
add comment on CMakeLists.txt for cuda test
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 10 Feb 2017 10:44:48 +0900 |
parents | 8236e4ca6983 |
children | b46398081fe4 |
files | src/test/CMakeLists.txt |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/test/CMakeLists.txt Fri Feb 10 10:08:06 2017 +0900 +++ b/src/test/CMakeLists.txt Fri Feb 10 10:44:48 2017 +0900 @@ -4,8 +4,11 @@ set(NVCCFLAG "-std=c++11" "-g" "-O0" ) -set(CMAKE_C_COMPILER $ENV{CBC_COMPILER}) +# set(CMAKE_C_COMPILER $ENV{CBC_COMPILER}) + set(CUDA_LINK_FLAGS "-framework CUDA -lc++ -Wl,-search_paths_first -Wl,-headerpad_max_install_names /Developer/NVIDIA/CUDA-8.0/lib/libcudart_static.a -Wl,-rpath,/usr/local/cuda/lib") +# for linux use -lcuda + SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CUDA_LINK_FLAGS}" ) cmake_minimum_required(VERSION 2.8) @@ -30,5 +33,9 @@ add_executable(twiceExample twice.o multiply.ptx test.c) +# to compile these, comment out CMAKE_C_COMPILER +# cuda_add_executable(Cudasample_gpu Cudasample_gpu.cu) +# cuda_add_executable(Cudasample_cpu Cudasample_cpu.cu) + # target_link_libraries(twiceExample ${CUDA_LIBRARIES} ${MPI_LIBRARIES} ${OPENGL_LIBRARIES})