diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c2358ca..f6837d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,6 +76,7 @@ jobs: -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_COMPILE_WARNING_AS_ERROR=ON + -DFAIRYCAM_ENABLE_TESTING=ON ${{ matrix.os == 'windows-latest' && '-DOpenCV_DIR="C:/opencv/opencv/build/"' || '' }} - name: Build diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c406ba..ce1b460 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,10 +58,12 @@ target_sources(doctest PUBLIC add_subdirectory(src/) # tests -include(CTest) -enable_testing() if(FAIRYCAM_ENABLE_TESTING) + include(CTest) + enable_testing() + add_subdirectory(tests) + if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" AND NOT APPLE) add_subdirectory(fuzzer_example) endif() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5177c54..a02c68d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,4 +1,3 @@ - find_package(OpenCV REQUIRED) find_package(Poco REQUIRED Foundation Net)