# HG changeset patch # User Shinji KONO # Date 1486688144 -32400 # Node ID f6770c0a24c25b3b2a5d1a9e7f8a5d30518611cb # Parent 198affea1be12e56af251c73b81bc8a54a362ef5 add framework diff -r 198affea1be1 -r f6770c0a24c2 src/test/CMakeLists.txt --- a/src/test/CMakeLists.txt Fri Feb 10 08:48:51 2017 +0900 +++ b/src/test/CMakeLists.txt Fri Feb 10 09:55:44 2017 +0900 @@ -3,7 +3,7 @@ # 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(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") SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CUDA_LINK_FLAGS}" ) cmake_minimum_required(VERSION 2.8) @@ -23,7 +23,10 @@ add_custom_command(OUTPUT multiply.o DEPENDS multiply.cu - COMMAND nvcc -O -c multiply.cu + COMMAND nvcc -std=c++11 -O -c multiply.cu ) -add_executable(twiceExmple twice.o multiply.o test.c) +add_executable(twiceExample twice.o multiply.o test.c) + +# target_link_libraries(twiceExample ${CUDA_LIBRARIES} ${MPI_LIBRARIES} ${OPENGL_LIBRARIES}) +