From 9a85bde56e6c07b8bca136a873139ea76d199b7b Mon Sep 17 00:00:00 2001 From: Christian Sarofeen Date: Mon, 2 Oct 2017 16:22:10 -0700 Subject: [PATCH] Couple quick build fixes Couple quick changes that may be needed --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cdb4b3e..ab5bb49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ ENDIF() project(ctc_release) IF (NOT APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp -O2") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp -O2 -lrt") ENDIF() IF (APPLE) @@ -40,6 +40,10 @@ IF (CUDA_VERSION GREATER 7.6) set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_62,code=sm_62") ENDIF() +IF (CUDA_VERSION GREATER_EQUAL 9.0) + set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_70,code=sm_70") +ENDIF() + if (NOT APPLE) set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} --std=c++11") set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -Xcompiler -fopenmp")