summaryrefslogtreecommitdiffstats
path: root/ml/dlib/dlib/cmake_utils/test_for_cuda/CMakeLists.txt
blob: 5f6af245ecc736e3487a8a3f2f49e8b381cb8cc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
cmake_minimum_required(VERSION 2.8.12)
project(cuda_test)

include_directories(../../dnn)
add_definitions(-DDLIB_USE_CUDA)

# Override the FindCUDA.cmake setting to avoid duplication of host flags if using a toolchain:
option(CUDA_PROPAGATE_HOST_FLAGS "Propage C/CXX_FLAGS and friends to the host compiler via -Xcompile" OFF)
find_package(CUDA 7.5 REQUIRED)
set(CUDA_HOST_COMPILATION_CPP ON)
list(APPEND CUDA_NVCC_FLAGS "-arch=sm_30;-std=c++11;-D__STRICT_ANSI__;-D_MWAITXINTRIN_H_INCLUDED;-D_FORCE_INLINES")

cuda_add_library(cuda_test STATIC cuda_test.cu )