This is an automated email from the ASF dual-hosted git repository.

fgerlits pushed a commit to branch szaszm_compile-time
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 6066ea86dbcddfa6ea2d98f9eb254ada309341c1
Author: Marton Szasz <[email protected]>
AuthorDate: Thu Aug 19 17:08:23 2021 +0200

    MINIFICPP-1638 Optimize catch and cmake usage
    
    - remove seemingly unnecessary build dependencies
    
    add_dependencies(A B) will wait for B to be built before starting to
    build A. In most cases, we only want to link them together, but we can
    build them in parallel.
    
    - reduce the number of catch main instances
    
    Because it takes around 30-40 seconds to compile on a modern CPU core.
    
    Signed-off-by: Ferenc Gerlits <[email protected]>
    
    This closes #1171
---
 CMakeLists.txt                                                     | 5 -----
 cmake/BuildTests.cmake                                             | 4 ----
 cmake/BundledCivetWeb.cmake                                        | 4 ++--
 cmake/BundledOpenCV.cmake                                          | 7 +++----
 cmake/WholeArchive.cmake                                           | 3 ---
 extensions/expression-language/impl/expression/Expression.h        | 2 +-
 extensions/standard-processors/tests/unit/RetryFlowFileTests.cpp   | 2 --
 libminifi/include/core/repository/AtomicRepoEntries.h              | 2 +-
 libminifi/test/{CatchMain.cpp => Catch.h}                          | 5 +++--
 libminifi/test/CatchMain.cpp                                       | 2 +-
 libminifi/test/TestBase.h                                          | 2 +-
 libminifi/test/gps-tests/CMakeLists.txt                            | 1 +
 libminifi/test/gps-tests/GPSTests.cpp                              | 3 ---
 .../test/keyvalue-tests/PersistableKeyValueStoreServiceTest.cpp    | 2 +-
 .../test/keyvalue-tests/UnorderedMapKeyValueStoreServiceTest.cpp   | 2 +-
 libminifi/test/script-tests/CMakeLists.txt                         | 3 +++
 libminifi/test/script-tests/ExecutePythonProcessorTests.cpp        | 2 --
 .../test/script-tests/TestExecuteScriptProcessorWithLuaScript.cpp  | 2 --
 .../script-tests/TestExecuteScriptProcessorWithPythonScript.cpp    | 2 --
 libminifi/test/tensorflow-tests/CMakeLists.txt                     | 1 +
 libminifi/test/tensorflow-tests/TensorFlowTests.cpp                | 2 --
 libminifi/test/unit/EnumTests.cpp                                  | 2 +-
 libminifi/test/unit/PathUtilsTests.cpp                             | 2 +-
 libminifi/test/unit/ProcessSessionTests.cpp                        | 1 -
 libminifi/test/unit/RelationshipTests.cpp                          | 2 +-
 nanofi/tests/CLogAggregatorTests.cpp                               | 2 +-
 nanofi/tests/CTailFileChunkTests.cpp                               | 2 +-
 nanofi/tests/CTailFileDelimitedTests.cpp                           | 2 +-
 28 files changed, 25 insertions(+), 46 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2ccce55..8f22f03 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -456,9 +456,6 @@ if (ENABLE_ALL OR ENABLE_COAP STREQUAL "ON")
        include(BundledLibCoAP)
        use_bundled_libcoap(${CMAKE_CURRENT_SOURCE_DIR} 
${CMAKE_CURRENT_BINARY_DIR})
        createExtension(COAP-EXTENSION "COAP EXTENSIONS" "Enables LibCOAP 
Functionality." "extensions/coap" "extensions/coap/tests/")
-       if( NOT DISABLE_CURL)
-               add_dependencies(minifi-coap minifi-http-curl)
-       endif()
 endif()
 
 if (WIN32 AND (ENABLE_ALL OR ENABLE_WEL))
@@ -596,7 +593,6 @@ add_subdirectory(main)
 
 if (ENABLE_NANOFI)
        add_subdirectory(nanofi)
-       add_dependencies(nanofi minifiexe)
 endif()
 
 if (ENABLE_ENCRYPT_CONFIG)
@@ -605,7 +601,6 @@ endif()
 
 if (NOT DISABLE_CURL AND NOT DISABLE_CONTROLLER)
        add_subdirectory(controller)
-       add_dependencies(minificontroller minifiexe)
 endif()
 
 
diff --git a/cmake/BuildTests.cmake b/cmake/BuildTests.cmake
index c8bc3be..17aa08f 100644
--- a/cmake/BuildTests.cmake
+++ b/cmake/BuildTests.cmake
@@ -72,10 +72,6 @@ function(createTests testName)
   endif()
   target_link_libraries(${testName} ${CMAKE_DL_LIBS} ${TEST_BASE_LIB})
   target_link_libraries(${testName} core-minifi yaml-cpp spdlog 
Threads::Threads)
-  add_dependencies(${testName} minifiexe)
-  if (ENABLE_NANOFI)
-    add_dependencies(${testName} nanofi)
-  endif()
   if (Boost_FOUND)
       target_link_libraries(${testName} ${Boost_SYSTEM_LIBRARY})
       target_link_libraries(${testName} ${Boost_FILESYSTEM_LIBRARY})
diff --git a/cmake/BundledCivetWeb.cmake b/cmake/BundledCivetWeb.cmake
index 38c9163..c030ce7 100644
--- a/cmake/BundledCivetWeb.cmake
+++ b/cmake/BundledCivetWeb.cmake
@@ -95,11 +95,11 @@ function(use_bundled_civetweb SOURCE_DIR BINARY_DIR)
     set_property(TARGET CIVETWEB::c-library APPEND PROPERTY 
INTERFACE_INCLUDE_DIRECTORIES ${CIVETWEB_INCLUDE_DIR})
     add_dependencies(CIVETWEB::c-library civetweb-external)
     if (NOT OPENSSL_OFF)
-        set_property(TARGET CIVETWEB::c-library APPEND PROPERTY 
INTERFACE_LINK_LIBRARIES OpenSSL::SSL OpenSSL::Crypto Threads::Threads)
+        target_link_libraries(CIVETWEB::c-library INTERFACE OpenSSL::SSL 
OpenSSL::Crypto Threads::Threads)
     endif()
 
     add_library(CIVETWEB::civetweb-cpp STATIC IMPORTED)
     set_target_properties(CIVETWEB::civetweb-cpp PROPERTIES IMPORTED_LOCATION 
"${CIVETWEB_BIN_DIR}/${LIBDIR}/${PREFIX}civetweb-cpp.${SUFFIX}")
-    set_property(TARGET CIVETWEB::civetweb-cpp APPEND PROPERTY 
INTERFACE_LINK_LIBRARIES CIVETWEB::c-library)
+    target_link_libraries(CIVETWEB::civetweb-cpp INTERFACE CIVETWEB::c-library)
     add_dependencies(CIVETWEB::civetweb-cpp civetweb-external)
 endfunction(use_bundled_civetweb)
diff --git a/cmake/BundledOpenCV.cmake b/cmake/BundledOpenCV.cmake
index b0cd109..01773b2 100644
--- a/cmake/BundledOpenCV.cmake
+++ b/cmake/BundledOpenCV.cmake
@@ -165,7 +165,7 @@ function(use_bundled_opencv SOURCE_DIR BINARY_DIR)
 
     add_library(OPENCV::libopencv-imgcodecs STATIC IMPORTED)
     set_target_properties(OPENCV::libopencv-imgcodecs PROPERTIES 
IMPORTED_LOCATION 
"${OPENCV_BYPRODUCT_DIR}/${CMAKE_INSTALL_LIBDIR}/${PREFIX}opencv_imgcodecs${SUFFIX}")
-    add_dependencies(OPENCV::libopencv-imgcodecs opencv-external 
OPENCV::libopencv-core OPENCV::libjpeg-turbo OPENCV::libpng)
+    add_dependencies(OPENCV::libopencv-imgcodecs opencv-external)
     target_include_directories(OPENCV::libopencv-imgcodecs INTERFACE 
${OPENCV_INCLUDE_DIR})
     target_link_libraries(OPENCV::libopencv-imgcodecs INTERFACE 
OPENCV::libopencv-core OPENCV::libjpeg-turbo OPENCV::libpng)
 
@@ -176,7 +176,7 @@ function(use_bundled_opencv SOURCE_DIR BINARY_DIR)
 
     add_library(OPENCV::libopencv-imgproc STATIC IMPORTED)
     set_target_properties(OPENCV::libopencv-imgproc PROPERTIES 
IMPORTED_LOCATION 
"${OPENCV_BYPRODUCT_DIR}/${CMAKE_INSTALL_LIBDIR}/${PREFIX}opencv_imgproc${SUFFIX}")
-    add_dependencies(OPENCV::libopencv-imgproc opencv-external 
OPENCV::libopencv-core)
+    add_dependencies(OPENCV::libopencv-imgproc opencv-external)
     target_include_directories(OPENCV::libopencv-imgproc INTERFACE 
${OPENCV_INCLUDE_DIR})
     target_link_libraries(OPENCV::libopencv-imgproc INTERFACE 
OPENCV::libopencv-core)
 
@@ -187,7 +187,7 @@ function(use_bundled_opencv SOURCE_DIR BINARY_DIR)
 
     add_library(OPENCV::libopencv-videoio STATIC IMPORTED)
     set_target_properties(OPENCV::libopencv-videoio PROPERTIES 
IMPORTED_LOCATION 
"${OPENCV_BYPRODUCT_DIR}/${CMAKE_INSTALL_LIBDIR}/${PREFIX}opencv_videoio${SUFFIX}")
-    add_dependencies(OPENCV::libopencv-videoio opencv-external 
OPENCV::libopencv-core)
+    add_dependencies(OPENCV::libopencv-videoio opencv-external)
     target_include_directories(OPENCV::libopencv-videoio INTERFACE 
${OPENCV_INCLUDE_DIR})
     target_link_libraries(OPENCV::libopencv-videoio INTERFACE 
OPENCV::libopencv-core)
 
@@ -207,7 +207,6 @@ function(use_bundled_opencv SOURCE_DIR BINARY_DIR)
     target_include_directories(OPENCV::libopencv-features2d INTERFACE 
${OPENCV_INCLUDE_DIR})
 
     add_library(OPENCV::libopencv INTERFACE IMPORTED)
-    add_dependencies(OPENCV::libopencv OPENCV::libopencv-flann 
OPENCV::libopencv-dnn OPENCV::libopencv-objdetect OPENCV::libopencv-core 
OPENCV::libopencv-gapi OPENCV::libopencv-imgcodecs OPENCV::libopencv-calib3d 
OPENCV::libopencv-imgproc OPENCV::libopencv-photo OPENCV::libopencv-videoio 
OPENCV::libopencv-video OPENCV::libopencv-stitching 
OPENCV::libopencv-features2d)
     target_link_libraries(OPENCV::libopencv INTERFACE OPENCV::libopencv-flann 
OPENCV::libopencv-dnn OPENCV::libopencv-objdetect OPENCV::libopencv-core 
OPENCV::libopencv-gapi OPENCV::libopencv-imgcodecs OPENCV::libopencv-calib3d 
OPENCV::libopencv-imgproc OPENCV::libopencv-photo OPENCV::libopencv-videoio 
OPENCV::libopencv-video OPENCV::libopencv-stitching 
OPENCV::libopencv-features2d)
 
 endfunction(use_bundled_opencv)
diff --git a/cmake/WholeArchive.cmake b/cmake/WholeArchive.cmake
index 837bb05..bb18c25 100644
--- a/cmake/WholeArchive.cmake
+++ b/cmake/WholeArchive.cmake
@@ -19,7 +19,6 @@ function(target_wholearchive_library TARGET ITEM)
     if (APPLE)
         target_link_libraries(${TARGET} ${ITEM})
         target_link_libraries(${TARGET} -Wl,-force_load,$<TARGET_FILE:${ITEM}>)
-        add_dependencies(${TARGET} ${ITEM})
     elseif(WIN32)
         target_link_libraries(${TARGET} ${ITEM})
         if(${CMAKE_VERSION} VERSION_LESS "3.13.0")
@@ -27,10 +26,8 @@ function(target_wholearchive_library TARGET ITEM)
         else()
             target_link_options(${TARGET} PRIVATE "/WHOLEARCHIVE:${ITEM}")
         endif()
-        add_dependencies(${TARGET} ${ITEM})
     else()
         target_link_libraries(${TARGET} -Wl,--whole-archive ${ITEM} 
-Wl,--no-whole-archive)
-        add_dependencies(${TARGET} ${ITEM})
     endif()
 endfunction(target_wholearchive_library)
 
diff --git a/extensions/expression-language/impl/expression/Expression.h 
b/extensions/expression-language/impl/expression/Expression.h
index 93a2cf8..8e89608 100644
--- a/extensions/expression-language/impl/expression/Expression.h
+++ b/extensions/expression-language/impl/expression/Expression.h
@@ -126,7 +126,7 @@ class Expression {
    * @param args function arguments
    * @return composed multi-expression
    */
-  Expression compose_multi(const std::function<Value(const std::vector<Value> 
&)> fn, const std::vector<Expression> &args) const;
+  Expression compose_multi(std::function<Value(const std::vector<Value> &)> 
fn, const std::vector<Expression> &args) const;
 
   Expression make_aggregate(std::function<Value(const Parameters &params, 
const std::vector<Expression> &sub_exprs)> val_fn) const;
 
diff --git a/extensions/standard-processors/tests/unit/RetryFlowFileTests.cpp 
b/extensions/standard-processors/tests/unit/RetryFlowFileTests.cpp
index 1a8de33..c4595cb 100644
--- a/extensions/standard-processors/tests/unit/RetryFlowFileTests.cpp
+++ b/extensions/standard-processors/tests/unit/RetryFlowFileTests.cpp
@@ -16,8 +16,6 @@
  * limitations under the License.
  */
 
-#define CATCH_CONFIG_MAIN
-
 #include <memory>
 #include <optional>
 #include <string>
diff --git a/libminifi/include/core/repository/AtomicRepoEntries.h 
b/libminifi/include/core/repository/AtomicRepoEntries.h
index 93f3537..75c04af 100644
--- a/libminifi/include/core/repository/AtomicRepoEntries.h
+++ b/libminifi/include/core/repository/AtomicRepoEntries.h
@@ -21,7 +21,7 @@
 #include <string>
 #include <utility>
 
-#include  <cstddef>
+#include <cstddef>
 #include <cstring>
 #include <iostream>
 #include <chrono>
diff --git a/libminifi/test/CatchMain.cpp b/libminifi/test/Catch.h
similarity index 94%
copy from libminifi/test/CatchMain.cpp
copy to libminifi/test/Catch.h
index a029a9d..7bc2baf 100644
--- a/libminifi/test/CatchMain.cpp
+++ b/libminifi/test/Catch.h
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -16,5 +15,7 @@
  * limitations under the License.
  */
 
-#define CATCH_CONFIG_MAIN
+#pragma once
+
+#define CATCH_CONFIG_FAST_COMPILE
 #include "catch.hpp"
diff --git a/libminifi/test/CatchMain.cpp b/libminifi/test/CatchMain.cpp
index a029a9d..18e5243 100644
--- a/libminifi/test/CatchMain.cpp
+++ b/libminifi/test/CatchMain.cpp
@@ -17,4 +17,4 @@
  */
 
 #define CATCH_CONFIG_MAIN
-#include "catch.hpp"
+#include "Catch.h"
diff --git a/libminifi/test/TestBase.h b/libminifi/test/TestBase.h
index 5a5f949..9293d6d 100644
--- a/libminifi/test/TestBase.h
+++ b/libminifi/test/TestBase.h
@@ -31,7 +31,7 @@
 
 #include "ResourceClaim.h"
 #include "utils/file/FileUtils.h"
-#include "catch.hpp"
+#include "Catch.h"
 #include "core/logging/Logger.h"
 #include "core/Core.h"
 #include "properties/Configure.h"
diff --git a/libminifi/test/gps-tests/CMakeLists.txt 
b/libminifi/test/gps-tests/CMakeLists.txt
index 4d577eb..2e529fc 100644
--- a/libminifi/test/gps-tests/CMakeLists.txt
+++ b/libminifi/test/gps-tests/CMakeLists.txt
@@ -27,6 +27,7 @@ FOREACH(testfile ${GPS_INTEGRATION_TESTS})
        createTests("${testfilename}")
        target_link_libraries(${testfilename} minifi-gps)
        target_link_libraries(${testfilename} minifi-standard-processors)
+       target_link_libraries(${testfilename} ${CATCH_MAIN_LIB})
        MATH(EXPR GPS_TEST_COUNT "${GPS_TEST_COUNT}+1")
        add_test(NAME "${testfilename}" COMMAND "${testfilename}" 
WORKING_DIRECTORY ${TEST_DIR})
 ENDFOREACH()
diff --git a/libminifi/test/gps-tests/GPSTests.cpp 
b/libminifi/test/gps-tests/GPSTests.cpp
index dad0965..a4a73e1 100644
--- a/libminifi/test/gps-tests/GPSTests.cpp
+++ b/libminifi/test/gps-tests/GPSTests.cpp
@@ -16,8 +16,6 @@
  * limitations under the License.
  */
 
-#define CATCH_CONFIG_MAIN  // This tells Catch to provide a main() - only do 
this in one cpp file
-
 #include <fstream>
 #include <iostream>
 #include <map>
@@ -38,7 +36,6 @@
 #include "../TestBase.h"
 #include "../unit/ProvenanceTestHelper.h"
 
-
 TEST_CASE("GPSD Create", "[gpsdtest1]") {
   TestController testController;
 
diff --git 
a/libminifi/test/keyvalue-tests/PersistableKeyValueStoreServiceTest.cpp 
b/libminifi/test/keyvalue-tests/PersistableKeyValueStoreServiceTest.cpp
index 62f2113..36132b3 100644
--- a/libminifi/test/keyvalue-tests/PersistableKeyValueStoreServiceTest.cpp
+++ b/libminifi/test/keyvalue-tests/PersistableKeyValueStoreServiceTest.cpp
@@ -21,7 +21,7 @@
 #include <memory>
 #include <string>
 
-#include "catch.hpp"
+#include "Catch.h"
 
 #include "../TestBase.h"
 #include "core/controller/ControllerService.h"
diff --git 
a/libminifi/test/keyvalue-tests/UnorderedMapKeyValueStoreServiceTest.cpp 
b/libminifi/test/keyvalue-tests/UnorderedMapKeyValueStoreServiceTest.cpp
index 08d6026..b61de2f 100644
--- a/libminifi/test/keyvalue-tests/UnorderedMapKeyValueStoreServiceTest.cpp
+++ b/libminifi/test/keyvalue-tests/UnorderedMapKeyValueStoreServiceTest.cpp
@@ -24,7 +24,7 @@
 #include "core/ProcessGroup.h"
 #include "core/yaml/YamlConfiguration.h"
 
-#include "catch.hpp"
+#include "Catch.h"
 
 namespace {
   std::string config_yaml; // NOLINT
diff --git a/libminifi/test/script-tests/CMakeLists.txt 
b/libminifi/test/script-tests/CMakeLists.txt
index 1a50041..b616ae6 100644
--- a/libminifi/test/script-tests/CMakeLists.txt
+++ b/libminifi/test/script-tests/CMakeLists.txt
@@ -44,6 +44,7 @@ FOREACH(testfile ${EXECUTESCRIPT_PYTHON_INTEGRATION_TESTS})
        add_definitions(-DPYTHON_SUPPORT)
        target_link_libraries(${testfilename} minifi-script-extensions)
        target_link_libraries(${testfilename} minifi-standard-processors)
+       target_link_libraries(${testfilename} ${CATCH_MAIN_LIB})
        createTests("${testfilename}")
        MATH(EXPR EXTENSIONS_TEST_COUNT "${EXTENSIONS_TEST_COUNT}+1")
        add_test(NAME "${testfilename}" COMMAND "${testfilename}" 
WORKING_DIRECTORY ${TEST_DIR})
@@ -65,6 +66,7 @@ FOREACH(testfile ${EXECUTEPYTHONPROCESSOR_UNIT_TESTS})
 
        target_link_libraries(${testfilename} minifi-script-extensions)
        target_link_libraries(${testfilename} minifi-standard-processors)
+       target_link_libraries(${testfilename} ${CATCH_MAIN_LIB})
 
        createTests("${testfilename}")
        add_test(NAME "${testfilename}" COMMAND "${testfilename}"  
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
@@ -81,6 +83,7 @@ FOREACH(testfile ${EXECUTESCRIPT_LUA_INTEGRATION_TESTS})
        add_definitions(-DLUA_SUPPORT)
        target_link_libraries(${testfilename} minifi-script-extensions)
        target_link_libraries(${testfilename} minifi-standard-processors)
+       target_link_libraries(${testfilename} ${CATCH_MAIN_LIB})
        createTests("${testfilename}")
        MATH(EXPR EXTENSIONS_TEST_COUNT "${EXTENSIONS_TEST_COUNT}+1")
        add_test(NAME "${testfilename}" COMMAND "${testfilename}" 
WORKING_DIRECTORY ${TEST_DIR})
diff --git a/libminifi/test/script-tests/ExecutePythonProcessorTests.cpp 
b/libminifi/test/script-tests/ExecutePythonProcessorTests.cpp
index 049723b..130f5a9 100644
--- a/libminifi/test/script-tests/ExecutePythonProcessorTests.cpp
+++ b/libminifi/test/script-tests/ExecutePythonProcessorTests.cpp
@@ -16,8 +16,6 @@
  * limitations under the License.
  */
 
-#define CATCH_CONFIG_MAIN
-
 #include <memory>
 #include <string>
 #include <set>
diff --git 
a/libminifi/test/script-tests/TestExecuteScriptProcessorWithLuaScript.cpp 
b/libminifi/test/script-tests/TestExecuteScriptProcessorWithLuaScript.cpp
index c1a536d..99971eb 100644
--- a/libminifi/test/script-tests/TestExecuteScriptProcessorWithLuaScript.cpp
+++ b/libminifi/test/script-tests/TestExecuteScriptProcessorWithLuaScript.cpp
@@ -16,8 +16,6 @@
  * limitations under the License.
  */
 
-#define CATCH_CONFIG_MAIN
-
 #include <memory>
 #include <string>
 #include <set>
diff --git 
a/libminifi/test/script-tests/TestExecuteScriptProcessorWithPythonScript.cpp 
b/libminifi/test/script-tests/TestExecuteScriptProcessorWithPythonScript.cpp
index afc4dcb..45474a9 100644
--- a/libminifi/test/script-tests/TestExecuteScriptProcessorWithPythonScript.cpp
+++ b/libminifi/test/script-tests/TestExecuteScriptProcessorWithPythonScript.cpp
@@ -16,8 +16,6 @@
  * limitations under the License.
  */
 
-#define CATCH_CONFIG_MAIN
-
 #include <memory>
 #include <string>
 #include <set>
diff --git a/libminifi/test/tensorflow-tests/CMakeLists.txt 
b/libminifi/test/tensorflow-tests/CMakeLists.txt
index a0d6e06..6c5b678 100644
--- a/libminifi/test/tensorflow-tests/CMakeLists.txt
+++ b/libminifi/test/tensorflow-tests/CMakeLists.txt
@@ -31,6 +31,7 @@ FOREACH(testfile ${TENSORFLOW_INTEGRATION_TESTS})
        createTests("${testfilename}")
        target_link_libraries(${testfilename} minifi-tensorflow-extensions)
        target_link_libraries(${testfilename} minifi-standard-processors)
+       target_link_libraries(${testfilename} ${CATCH_MAIN_LIB})
        MATH(EXPR EXTENSIONS_TEST_COUNT "${EXTENSIONS_TEST_COUNT}+1")
        add_test(NAME "${testfilename}" COMMAND "${testfilename}" 
WORKING_DIRECTORY ${TEST_DIR})
 ENDFOREACH()
diff --git a/libminifi/test/tensorflow-tests/TensorFlowTests.cpp 
b/libminifi/test/tensorflow-tests/TensorFlowTests.cpp
index 1587df4..254b1d5 100644
--- a/libminifi/test/tensorflow-tests/TensorFlowTests.cpp
+++ b/libminifi/test/tensorflow-tests/TensorFlowTests.cpp
@@ -28,8 +28,6 @@
 #include <TFConvertImageToTensor.h>
 #include <TFExtractTopLabels.h>
 
-#define CATCH_CONFIG_MAIN
-
 #include "../TestBase.h"
 
 TEST_CASE("TensorFlow: Apply Graph", "[tfApplyGraph]") { // NOLINT
diff --git a/libminifi/test/unit/EnumTests.cpp 
b/libminifi/test/unit/EnumTests.cpp
index 1d0c7be..2c5703b 100644
--- a/libminifi/test/unit/EnumTests.cpp
+++ b/libminifi/test/unit/EnumTests.cpp
@@ -20,7 +20,7 @@
 #include <string>
 #include <type_traits>
 #include "utils/Enum.h"
-#include "catch.hpp"
+#include "../Catch.h"
 
 // we need this instead of void_t in GeneralUtils because of GCC4.8
 template<typename ...>
diff --git a/libminifi/test/unit/PathUtilsTests.cpp 
b/libminifi/test/unit/PathUtilsTests.cpp
index b907e1f..9153201 100644
--- a/libminifi/test/unit/PathUtilsTests.cpp
+++ b/libminifi/test/unit/PathUtilsTests.cpp
@@ -16,7 +16,7 @@
  */
 
 #include <string>
-#include <catch.hpp>
+#include "../Catch.h"
 #include "utils/file/PathUtils.h"
 
 namespace fs = org::apache::nifi::minifi::utils::file;
diff --git a/libminifi/test/unit/ProcessSessionTests.cpp 
b/libminifi/test/unit/ProcessSessionTests.cpp
index 135d4f5..2a40519 100644
--- a/libminifi/test/unit/ProcessSessionTests.cpp
+++ b/libminifi/test/unit/ProcessSessionTests.cpp
@@ -18,7 +18,6 @@
 #include <memory>
 #include <string>
 
-#include <catch.hpp>
 #include "core/ProcessSession.h"
 #include "core/Resource.h"
 #include "../TestBase.h"
diff --git a/libminifi/test/unit/RelationshipTests.cpp 
b/libminifi/test/unit/RelationshipTests.cpp
index a44f00d..f983447 100644
--- a/libminifi/test/unit/RelationshipTests.cpp
+++ b/libminifi/test/unit/RelationshipTests.cpp
@@ -17,7 +17,7 @@
 
 #include <string>
 
-#include <catch.hpp>
+#include "../Catch.h"
 #include "core/Relationship.h"
 
 using org::apache::nifi::minifi::core::Relationship;
diff --git a/nanofi/tests/CLogAggregatorTests.cpp 
b/nanofi/tests/CLogAggregatorTests.cpp
index 2786310..f491e68 100644
--- a/nanofi/tests/CLogAggregatorTests.cpp
+++ b/nanofi/tests/CLogAggregatorTests.cpp
@@ -17,7 +17,7 @@
  */
 
 #ifndef _WIN32
-#include "catch.hpp"
+#include "Catch.h"
 
 #include <vector>
 #include <string>
diff --git a/nanofi/tests/CTailFileChunkTests.cpp 
b/nanofi/tests/CTailFileChunkTests.cpp
index 937851c..7baa030 100644
--- a/nanofi/tests/CTailFileChunkTests.cpp
+++ b/nanofi/tests/CTailFileChunkTests.cpp
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 #ifndef _WIN32
-#include "catch.hpp"
+#include "Catch.h"
 
 #include <dirent.h>
 #include <stdio.h>
diff --git a/nanofi/tests/CTailFileDelimitedTests.cpp 
b/nanofi/tests/CTailFileDelimitedTests.cpp
index ab641a6..f6e58b5 100644
--- a/nanofi/tests/CTailFileDelimitedTests.cpp
+++ b/nanofi/tests/CTailFileDelimitedTests.cpp
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-#include "catch.hpp"
+#include "Catch.h"
 
 #include "CTestsBase.h"
 

Reply via email to