From 148dba9733856bec769e776f882818ad21fe4a4e Mon Sep 17 00:00:00 2001 From: Davis King Date: Thu, 23 Aug 2018 08:00:03 -0400 Subject: [PATCH] Fixed include order issue. The cuda utils headers weren't including dlib/config.h before the asserts that DLIB_USE_CUDA must be defined. This only matters for users who try to install dlib and use some build system that doesn't define DLIB_USE_CUDA, and so therefore need dlib/config.h to define it for them. --- dlib/cuda/cuda_data_ptr.h | 3 ++- dlib/cuda/cuda_utils.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlib/cuda/cuda_data_ptr.h b/dlib/cuda/cuda_data_ptr.h index 61882b5f8..f8a48751d 100644 --- a/dlib/cuda/cuda_data_ptr.h +++ b/dlib/cuda/cuda_data_ptr.h @@ -3,11 +3,12 @@ #ifndef DLIB_DNN_CuDA_DATA_PTR_H_ #define DLIB_DNN_CuDA_DATA_PTR_H_ +#include "../assert.h" + #ifdef DLIB_USE_CUDA #include #include -#include "../assert.h" namespace dlib { diff --git a/dlib/cuda/cuda_utils.h b/dlib/cuda/cuda_utils.h index 673a4e8ad..27131dd0f 100644 --- a/dlib/cuda/cuda_utils.h +++ b/dlib/cuda/cuda_utils.h @@ -3,12 +3,13 @@ #ifndef DLIB_CUDA_UtILS_H_ #define DLIB_CUDA_UtILS_H_ +#include "../algs.h" + #ifndef DLIB_USE_CUDA #error "This file shouldn't be #included unless DLIB_USE_CUDA is #defined" #endif #include "cuda_errors.h" -#include "../algs.h" #include #include