@@ -6,7 +6,7 @@ add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=1)
6
6
7
7
# Disable in-source builds to prevent source tree corruption.
8
8
if (" ${CMAKE_SOURCE_DIR} " STREQUAL " ${CMAKE_BINARY_DIR} " )
9
- message (FATAL_ERROR "
9
+ message (FATAL_ERROR "
10
10
FATAL: In-source builds are not allowed.
11
11
You should create a separate directory for build files.
12
12
If you think this error is wrong, try clearing cache:
@@ -57,7 +57,7 @@ project(obcpp VERSION 1.0)
57
57
set (LOGURU_WITH_STREAMS TRUE )
58
58
59
59
# =============================
60
- # Dependencies
60
+ # Dependencies
61
61
set (FETCHCONTENT_QUIET FALSE )
62
62
set (DEPS_DIRECTORY ${PROJECT_SOURCE_DIR} /deps)
63
63
@@ -103,11 +103,11 @@ add_definitions( -DMAGICKCORE_HDRI_ENABLE=0 )
103
103
104
104
find_package (ImageMagick COMPONENTS Magick++ REQUIRED)
105
105
# =============================
106
- # Build speed up
106
+ # Build speed up
107
107
108
108
# function to enable unity build for a target
109
109
function (set_unity_for_target target_name)
110
- set_target_properties (${target_name} PROPERTIES UNITY_BUILD ON UNITY_BUILD_MODE BATCH UNITY_BUILD_BATCH_SIZE 16 UNITY_BUILD_UNIQUE_ID "MY_UNITY_ID" )
110
+ set_target_properties (${target_name} PROPERTIES UNITY_BUILD ON UNITY_BUILD_MODE BATCH UNITY_BUILD_BATCH_SIZE 16 UNITY_BUILD_UNIQUE_ID "MY_UNITY_ID" )
111
111
endfunction ()
112
112
113
113
# =============================
@@ -120,6 +120,22 @@ add_subdirectory(src)
120
120
# =============================
121
121
# Integration tests
122
122
123
+ add_subdirectory (tests/integration)
124
+
125
+ # cuda_check
126
+ add_executable (cuda_check ${SOURCES} tests/integration/cuda_check.cpp)
127
+ target_add_torch(cuda_check)
128
+ target_add_json(cuda_check)
129
+ target_add_httplib(cuda_check)
130
+ target_add_mavsdk(cuda_check)
131
+ target_add_matplot(cuda_check)
132
+ target_add_protobuf(cuda_check)
133
+ target_add_opencv(cuda_check)
134
+ target_add_loguru(cuda_check)
135
+ # for some reason calling target_add_imagemagick here conflicts with, so we are including/linking without the function call
136
+ # target_add_imagemagick(cuda_check)
137
+ target_include_directories (cuda_check PRIVATE ${ImageMagick_INCLUDE_DIRS} )
138
+ target_link_libraries (cuda_check PRIVATE -Wl,--copy-dt-needed-entries ${ImageMagick_LIBRARIES} )
123
139
124
140
# =============================
125
141
@@ -131,7 +147,7 @@ add_subdirectory(${DEPS_DIRECTORY}/google-test)
131
147
132
148
# =============================
133
149
# Pull models
134
- add_custom_target (pull_models
150
+ add_custom_target (pull_models
135
151
DEPENDS pull_saliency pull_matching pull_segmentation
136
152
)
137
153
@@ -141,7 +157,7 @@ add_custom_target(pull_saliency
141
157
USES_TERMINAL
142
158
)
143
159
144
- # Matching model
160
+ # Matching model
145
161
add_custom_target (pull_matching
146
162
COMMAND gdown 1NeFiAfSSLXAZWlehfd0ox7p_jFF4YdrO -O ${CMAKE_BINARY_DIR} /../models/target_siamese_1.pt
147
163
USES_TERMINAL
@@ -158,7 +174,7 @@ add_custom_target(pull_segmentation
158
174
# =============================
159
175
# Pull testing images
160
176
add_custom_target (pull_test_images
161
- DEPENDS pull_matching_test_images pull_saliency_test_images
177
+ DEPENDS pull_matching_test_images pull_saliency_test_images
162
178
)
163
179
164
180
# pull cropped images from fraternal_targets testing folder
@@ -176,13 +192,13 @@ add_custom_target(pull_saliency_test_images
176
192
# =============================
177
193
178
194
# =============================
179
- # Linting
195
+ # Linting
180
196
181
197
# Adding lint target if cpplint executable is found
182
198
find_program (CPPLINT "cpplint" )
183
199
if (CPPLINT)
184
- # define lint target
185
- add_custom_target (lint
200
+ # define lint target
201
+ add_custom_target (lint
186
202
COMMAND cpplint
187
203
# Do not require licenses, TODO assignment, Google versions of C++ libs
188
204
# also don't check for runtime/references since Google's public style guidelines are behind https://github.com/cpplint/cpplint/issues/148
@@ -195,6 +211,6 @@ if(CPPLINT)
195
211
../include
196
212
)
197
213
else ()
198
- message (FATAL_ERROR "cpplint executable not found. Check the README for steps to install it on your system" )
214
+ message (FATAL_ERROR "cpplint executable not found. Check the README for steps to install it on your system" )
199
215
endif ()
200
216
# =============================
0 commit comments