diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 751cb5f..84896c2 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -1,8 +1,8 @@ # Build the command line interface -add_subdirectory(br) - if(NOT BR_PACKAGE_THIRDPARTY) if(NOT BR_EMBEDDED) + add_subdirectory(br) + # Build examples/tests add_subdirectory(examples) diff --git a/app/br/CMakeLists.txt b/app/br/CMakeLists.txt index c66c234..dfa60ed 100644 --- a/app/br/CMakeLists.txt +++ b/app/br/CMakeLists.txt @@ -2,10 +2,6 @@ if(UNIX) find_package(Threads REQUIRED) endif() -if(BR_DISABLE_ALGORITHMS) - add_definitions(-DBR_DISABLE_ALGORITHMS) -endif() - add_executable(br br.cpp ${BR_RESOURCES}) target_link_libraries(br openbr ${CMAKE_THREAD_LIBS_INIT}) qt5_use_modules(br ${QT_DEPENDENCIES}) diff --git a/app/br/br.cpp b/app/br/br.cpp index 199c21b..89cd232 100644 --- a/app/br/br.cpp +++ b/app/br/br.cpp @@ -90,7 +90,6 @@ public: argv = &argv[parc+1]; // Core Tasks -#ifndef BR_DISABLE_ALGORITHMS if (!strcmp(fun, "train")) { check(parc >= 1, "Insufficient parameter count for 'train'."); br_train_n(parc == 1 ? 1 : parc-1, parv, parc == 1 ? "" : parv[parc-1]); @@ -101,9 +100,7 @@ public: } else if (!strcmp(fun, "compare")) { check((parc >= 2) && (parc <= 3), "Incorrect parameter count for 'compare'."); br_compare(parv[0], parv[1], parc == 3 ? parv[2] : ""); - } else -#endif // !BR_DISABLE_ALGORITHMS - if (!strcmp(fun, "eval")) { + } else if (!strcmp(fun, "eval")) { check((parc >= 1) && (parc <= 4), "Incorrect parameter count for 'eval'."); if (parc == 1) { br_eval(parv[0], "", "", 0); @@ -195,9 +192,7 @@ public: } else if (!strcmp(fun, "plotKNN")) { check(parc >=2, "Incorrect parameter count for 'plotKNN'."); br_plot_knn(parc-1, parv, parv[parc-1], true); - } -#ifndef BR_DISABLE_ALGORITHMS - else if (!strcmp(fun, "project")) { + } else if (!strcmp(fun, "project")) { check(parc == 2, "Insufficient parameter count for 'project'."); br_project(parv[0], parv[1]); } else if (!strcmp(fun, "deduplicate")) { @@ -207,7 +202,6 @@ public: check(parc == 3, "Incorrect parameter count for 'likely'."); br_likely(parv[0], parv[1], parv[2]); } -#endif // !BR_DISABLE_ALGORITHMS // Miscellaneous else if (!strcmp(fun, "help")) { @@ -277,11 +271,9 @@ private: printf(" = Input; {arg} = Output; [arg] = Optional; (arg0|...|argN) = Choice\n" "\n" "==== Core Commands ====\n" -#ifndef BR_DISABLE_ALGORITHMS "-train ... [{model}]\n" "-enroll ... {output_gallery}\n" "-compare [{output}]\n" -#endif // !BR_DISABLE_ALGORITHMS "-eval [] [{csv}] [{matches}]\n" "-plot ... {destination}\n" "\n" @@ -306,11 +298,9 @@ private: "-plotLandmarking ... {destination}\n" "-plotMetadata ... \n" "-plotKNN ... {destination}\n" -#ifndef BR_DISABLE_ALGORITHMS "-project {output_gallery}\n" "-deduplicate \n" "-likely \n" -#endif // !BR_DISABLE_ALGORITHMS "-getHeader \n" "-setHeader {} \n" "- \n"