Mercurial > hg > Gears > GearsAgda
comparison src/test/CMakeLists.txt @ 294:f6770c0a24c2
add framework
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 10 Feb 2017 09:55:44 +0900 |
parents | 2bc63a22dd21 |
children | 8236e4ca6983 |
comparison
equal
deleted
inserted
replaced
293:198affea1be1 | 294:f6770c0a24c2 |
---|---|
1 cmake_minimum_required(VERSION 2.8) | 1 cmake_minimum_required(VERSION 2.8) |
2 | 2 |
3 # add_definitions("-Wall -g -O0") | 3 # add_definitions("-Wall -g -O0") |
4 | 4 |
5 set(CMAKE_C_COMPILER $ENV{CBC_COMPILER}) | 5 set(CMAKE_C_COMPILER $ENV{CBC_COMPILER}) |
6 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") | 6 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") |
7 SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CUDA_LINK_FLAGS}" ) | 7 SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CUDA_LINK_FLAGS}" ) |
8 | 8 |
9 cmake_minimum_required(VERSION 2.8) | 9 cmake_minimum_required(VERSION 2.8) |
10 find_package(CUDA REQUIRED) | 10 find_package(CUDA REQUIRED) |
11 | 11 |
21 COMMAND nvcc -O -c twice.cu | 21 COMMAND nvcc -O -c twice.cu |
22 ) | 22 ) |
23 | 23 |
24 add_custom_command(OUTPUT multiply.o | 24 add_custom_command(OUTPUT multiply.o |
25 DEPENDS multiply.cu | 25 DEPENDS multiply.cu |
26 COMMAND nvcc -O -c multiply.cu | 26 COMMAND nvcc -std=c++11 -O -c multiply.cu |
27 ) | 27 ) |
28 | 28 |
29 add_executable(twiceExmple twice.o multiply.o test.c) | 29 add_executable(twiceExample twice.o multiply.o test.c) |
30 | |
31 # target_link_libraries(twiceExample ${CUDA_LIBRARIES} ${MPI_LIBRARIES} ${OPENGL_LIBRARIES}) | |
32 |