Mercurial > hg > GearsTemplate
changeset 486:da1dafcf1a45
Add cudaflag if Linux
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 29 Dec 2017 17:16:24 +0900 |
parents | 9098ec0a9e6b |
children | d6983ce1015d |
files | src/parallel_execution/CMakeLists.txt |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/CMakeLists.txt Fri Dec 29 11:07:18 2017 +0900 +++ b/src/parallel_execution/CMakeLists.txt Fri Dec 29 17:16:24 2017 +0900 @@ -13,12 +13,15 @@ if (${USE_CUDA}) include_directories("/usr/local/cuda/include") set(NVCCFLAG "-std=c++11" "-g" "-O0" ) - set(CUDA_LINK_FLAGS "-framework CUDA -lc++ -Wl,-search_paths_first -Wl,-headerpad_max_install_names /usr/local/cuda/lib/libcudart_static.a -Wl,-rpath,/usr/local/cuda/lib") + if (UNIX AND NOT APPLE) # LINUX + set(CUDA_LINK_FLAGS "-L/usr/local/cuda/lib64 -lcuda -lcudart") + elseif (APPLE) + set(CUDA_LINK_FLAGS "-framework CUDA -lc++ -Wl,-search_paths_first -Wl,-headerpad_max_install_names /usr/local/cuda/lib/libcudart_static.a -Wl,-rpath,/usr/local/cuda/lib") + endif() find_package(CUDA REQUIRED) SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CUDA_LINK_FLAGS}" ) endif() - macro( GearsCommand ) set( _OPTIONS_ARGS ) set( _ONE_VALUE_ARGS TARGET )