Commit af34864c authored by jeremad's avatar jeremad Committed by jeremad

chore(test): refactor options to disable the compilation of unit tests

parent 9a632037
...@@ -13,7 +13,7 @@ jobs: ...@@ -13,7 +13,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: CMake - name: CMake
run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DRTMP_NVENC=OFF -DGPU_BACKEND_CUDA=ON -DGPU_BACKEND_OPENCL=OFF -DLIB_TESTS=OFF -DBUILD_APPS_TESTS=OFF -G Ninja .. run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DRTMP_NVENC=OFF -DGPU_BACKEND_CUDA=ON -DGPU_BACKEND_OPENCL=OFF -DBUILD_LIB_TESTS=OFF -DBUILD_IO_TESTS=OFF -DBUILD_APPS_TESTS=OFF -G Ninja ..
- name: Build - name: Build
run: cd build && ninja run: cd build && ninja
- name: Upload CUDA build - name: Upload CUDA build
...@@ -28,7 +28,7 @@ jobs: ...@@ -28,7 +28,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: CMake - name: CMake
run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DGPU_BACKEND_CUDA=OFF -DGPU_BACKEND_OPENCL=ON -DDISABLE_OPENCL_SPIR=ON -DLIB_TESTS=OFF -DBUILD_APPS_TESTS=OFF -G Ninja .. run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DGPU_BACKEND_CUDA=OFF -DGPU_BACKEND_OPENCL=ON -DDISABLE_OPENCL_SPIR=ON -DBUILD_LIB_TESTS=OFF -DBUILD_IO_TESTS=OFF -DBUILD_APPS_TESTS=OFF -G Ninja ..
- name: Build - name: Build
run: cd build && ninja run: cd build && ninja
- name: Upload OpenCL build - name: Upload OpenCL build
......
...@@ -5,6 +5,8 @@ if(NOT VIDEOSTITCH_CMAKE) ...@@ -5,6 +5,8 @@ if(NOT VIDEOSTITCH_CMAKE)
message(FATAL_ERROR "Please configure CMake from the root folder!") message(FATAL_ERROR "Please configure CMake from the root folder!")
endif(NOT VIDEOSTITCH_CMAKE) endif(NOT VIDEOSTITCH_CMAKE)
option(BUILD_IO_TESTS "Build plugins unit tests" ON)
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Helper macro to create a list of all I/O plugins # Helper macro to create a list of all I/O plugins
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
...@@ -64,9 +66,9 @@ option(DISABLE_JPEG "Create JPEG I/O plugin" ${ANDROID}) ...@@ -64,9 +66,9 @@ option(DISABLE_JPEG "Create JPEG I/O plugin" ${ANDROID})
option(DISABLE_TIFF "Create TIFF Output plugin" ${ANDROID}) option(DISABLE_TIFF "Create TIFF Output plugin" ${ANDROID})
option(DISABLE_MP4 "Create MP4 Input plugin" ${NANDROID}) option(DISABLE_MP4 "Create MP4 Input plugin" ${NANDROID})
if(${GPU_BACKEND_DEFAULT} STREQUAL CUDA OR NOT WINDOWS) if(BUILD_IO_TESTS AND (${GPU_BACKEND_DEFAULT} STREQUAL CUDA OR NOT WINDOWS))
add_subdirectory(src/test) add_subdirectory(src/test)
endif(${GPU_BACKEND_DEFAULT} STREQUAL CUDA OR NOT WINDOWS) endif()
add_subdirectory(src/common) add_subdirectory(src/common)
add_subdirectory(src/av) add_subdirectory(src/av)
......
...@@ -11,7 +11,7 @@ if((VS_LIB_UNIT_TEST EQUAL VS_LIB_STATIC) AND (NOT BUILD_STATIC_LIB)) ...@@ -11,7 +11,7 @@ if((VS_LIB_UNIT_TEST EQUAL VS_LIB_STATIC) AND (NOT BUILD_STATIC_LIB))
message(FATAL_ERROR "Static libvideostitch (BUILD_STATIC_LIB) needed for unit tests") message(FATAL_ERROR "Static libvideostitch (BUILD_STATIC_LIB) needed for unit tests")
endif() endif()
option(LIB_TESTS "Build libvideostitch unit tests" ON) option(BUILD_LIB_TESTS "Build libvideostitch unit tests" ON)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Python bindings # Python bindings
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment