From 5931af6ce7af01abc8f88a49b53fa54916665acb Mon Sep 17 00:00:00 2001 From: Christopher Lee Date: Mon, 14 Oct 2024 12:39:28 -0700 Subject: [PATCH 1/3] add back integration targets --- CMakeLists.txt | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9688470e..3ce00a06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=1) # Disable in-source builds to prevent source tree corruption. if(" ${CMAKE_SOURCE_DIR}" STREQUAL " ${CMAKE_BINARY_DIR}") - message(FATAL_ERROR " + message(FATAL_ERROR " FATAL: In-source builds are not allowed. You should create a separate directory for build files. If you think this error is wrong, try clearing cache: @@ -57,7 +57,7 @@ project(obcpp VERSION 1.0) set(LOGURU_WITH_STREAMS TRUE) # ============================= -# Dependencies +# Dependencies set(FETCHCONTENT_QUIET FALSE) set(DEPS_DIRECTORY ${PROJECT_SOURCE_DIR}/deps) @@ -103,11 +103,11 @@ add_definitions( -DMAGICKCORE_HDRI_ENABLE=0 ) find_package(ImageMagick COMPONENTS Magick++ REQUIRED) # ============================= -# Build speed up +# Build speed up # function to enable unity build for a target function(set_unity_for_target target_name) - 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") + 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") endfunction() # ============================= @@ -120,6 +120,7 @@ add_subdirectory(src) # ============================= # Integration tests +add_subdirectory(tests/integration) # ============================= @@ -131,7 +132,7 @@ add_subdirectory(${DEPS_DIRECTORY}/google-test) # ============================= # Pull models -add_custom_target(pull_models +add_custom_target(pull_models DEPENDS pull_saliency pull_matching pull_segmentation ) @@ -141,7 +142,7 @@ add_custom_target(pull_saliency USES_TERMINAL ) -# Matching model +# Matching model add_custom_target(pull_matching COMMAND gdown 1NeFiAfSSLXAZWlehfd0ox7p_jFF4YdrO -O ${CMAKE_BINARY_DIR}/../models/target_siamese_1.pt USES_TERMINAL @@ -158,7 +159,7 @@ add_custom_target(pull_segmentation # ============================= # Pull testing images add_custom_target(pull_test_images - DEPENDS pull_matching_test_images pull_saliency_test_images + DEPENDS pull_matching_test_images pull_saliency_test_images ) # pull cropped images from fraternal_targets testing folder @@ -176,13 +177,13 @@ add_custom_target(pull_saliency_test_images # ============================= # ============================= -# Linting +# Linting # Adding lint target if cpplint executable is found find_program(CPPLINT "cpplint") if(CPPLINT) - # define lint target - add_custom_target(lint + # define lint target + add_custom_target(lint COMMAND cpplint # Do not require licenses, TODO assignment, Google versions of C++ libs # also don't check for runtime/references since Google's public style guidelines are behind https://github.com/cpplint/cpplint/issues/148 @@ -195,6 +196,6 @@ if(CPPLINT) ../include ) else() - message(FATAL_ERROR "cpplint executable not found. Check the README for steps to install it on your system") + message(FATAL_ERROR "cpplint executable not found. Check the README for steps to install it on your system") endif() # ============================= From 91b37b0b153c3d90957eecdd83651df1291591ba Mon Sep 17 00:00:00 2001 From: Christopher Lee Date: Mon, 14 Oct 2024 12:41:29 -0700 Subject: [PATCH 2/3] add code that was in a previous version of codebase --- CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ce00a06..716baba0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,6 +122,21 @@ add_subdirectory(src) add_subdirectory(tests/integration) +# cuda_check +add_executable(cuda_check ${SOURCES} tests/integration/cuda_check.cpp) +target_add_torch(cuda_check) +target_add_json(cuda_check) +target_add_httplib(cuda_check) +target_add_mavsdk(cuda_check) +target_add_matplot(cuda_check) +target_add_protobuf(cuda_check) +target_add_opencv(cuda_check) +target_add_loguru(cuda_check) +# for some reason calling target_add_imagemagick here conflicts with, so we are including/linking without the function call +# target_add_imagemagick(cuda_check) +target_include_directories(cuda_check PRIVATE ${ImageMagick_INCLUDE_DIRS}) +target_link_libraries(cuda_check PRIVATE -Wl,--copy-dt-needed-entries ${ImageMagick_LIBRARIES}) + # ============================= # ============================= From 4c3e97b91ec0c2965ff66c5f091ffe7417bb2f20 Mon Sep 17 00:00:00 2001 From: Christopher Lee Date: Mon, 14 Oct 2024 12:51:05 -0700 Subject: [PATCH 3/3] lint --- include/cv/classification.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/cv/classification.hpp b/include/cv/classification.hpp index ae9eb756..2bd46de4 100644 --- a/include/cv/classification.hpp +++ b/include/cv/classification.hpp @@ -1,11 +1,14 @@ #ifndef INCLUDE_CV_CLASSIFICATION_HPP_ #define INCLUDE_CV_CLASSIFICATION_HPP_ -#include "cv/utilities.hpp" #include -#include "cv/segmentation.hpp" #include +#include + +#include "cv/utilities.hpp" +#include "cv/segmentation.hpp" + struct ClassificationResults {