Made the cuda test include some header files to make it a little more

realistic.
This commit is contained in:
Davis King 2016-04-09 23:10:27 -04:00
parent c81825c3c2
commit 5dad959a02
2 changed files with 14 additions and 10 deletions

View File

@ -1,9 +1,12 @@
cmake_minimum_required(VERSION 2.8.4) cmake_minimum_required(VERSION 2.8.4)
project(cuda_test) project(cuda_test)
find_package(CUDA 7.0 REQUIRED) include_directories(..)
set(CUDA_HOST_COMPILATION_CPP ON) add_definitions(-DDLIB_USE_CUDA)
list(APPEND CUDA_NVCC_FLAGS "-arch=sm_30;-std=c++11;-D__STRICT_ANSI__")
find_package(CUDA 7.0 REQUIRED)
cuda_add_library(cuda_test STATIC cuda_test.cu ) 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 )

View File

@ -1,7 +1,8 @@
// Copyright (C) 2015 Davis E. King (davis@dlib.net) // Copyright (C) 2015 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license. // License: Boost Software License See LICENSE.txt for the full license.
#include <cuda_runtime.h> #include "cuda_utils.h"
#include "cuda_dlib.h"
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------