From 5dad959a02e1de53fd24352df23d9b46f51e39c4 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sat, 9 Apr 2016 23:10:27 -0400 Subject: [PATCH] Made the cuda test include some header files to make it a little more realistic. --- dlib/dnn/test_for_cuda/CMakeLists.txt | 21 ++++++++++++--------- dlib/dnn/test_for_cuda/cuda_test.cu | 3 ++- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/dlib/dnn/test_for_cuda/CMakeLists.txt b/dlib/dnn/test_for_cuda/CMakeLists.txt index 5264087ea..387c7117b 100644 --- a/dlib/dnn/test_for_cuda/CMakeLists.txt +++ b/dlib/dnn/test_for_cuda/CMakeLists.txt @@ -1,9 +1,12 @@ - -cmake_minimum_required(VERSION 2.8.4) -project(cuda_test) - -find_package(CUDA 7.0 REQUIRED) -set(CUDA_HOST_COMPILATION_CPP ON) -list(APPEND CUDA_NVCC_FLAGS "-arch=sm_30;-std=c++11;-D__STRICT_ANSI__") - -cuda_add_library(cuda_test STATIC cuda_test.cu ) + +cmake_minimum_required(VERSION 2.8.4) +project(cuda_test) + +include_directories(..) +add_definitions(-DDLIB_USE_CUDA) + +find_package(CUDA 7.0 REQUIRED) +set(CUDA_HOST_COMPILATION_CPP ON) +list(APPEND CUDA_NVCC_FLAGS "-arch=sm_30;-std=c++11;-D__STRICT_ANSI__") + +cuda_add_library(cuda_test STATIC cuda_test.cu ) diff --git a/dlib/dnn/test_for_cuda/cuda_test.cu b/dlib/dnn/test_for_cuda/cuda_test.cu index 1567f7972..fb1ffe0da 100644 --- a/dlib/dnn/test_for_cuda/cuda_test.cu +++ b/dlib/dnn/test_for_cuda/cuda_test.cu @@ -1,7 +1,8 @@ // Copyright (C) 2015 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. -#include +#include "cuda_utils.h" +#include "cuda_dlib.h" // ------------------------------------------------------------------------------------