Files
openappsec/unit_test.cmake
Daniel-Eisenberg e7b6e51b31 Jan 06 2026 dev (#387)
* sync code

* update code to support brotli

* update code to support brotli

* update code to support brotli

* sync code

* fix findBrotli

* sync code

* sync code

* sync code

* sync code

---------

Co-authored-by: Ned Wright <nedwright@proton.me>
Co-authored-by: Daniel Eisenberg <danielei@checkpoint.com>
2026-01-13 17:17:52 +02:00

12 lines
619 B
CMake

enable_testing()
function(add_unit_test ut_name ut_sources use_libs)
add_executable(${ut_name} ${ut_sources})
target_link_libraries(${ut_name} -Wl,--start-group ${use_libs} version debug_is report cptest pthread packet singleton environment metric event_is buffers rest config compression_utils z ${GTEST_BOTH_LIBRARIES} gmock boost_regex pthread dl ${Brotli_LIBRARIES} -Wl,--end-group)
add_test(NAME ${ut_name}
COMMAND ${ut_name}
)
set_tests_properties(${ut_name} PROPERTIES ENVIRONMENT "CURR_SRC_DIR=${CMAKE_CURRENT_SOURCE_DIR};CI_BUILD_REF_NAME=open-source")
endfunction(add_unit_test)