mirror of
https://github.com/TrustTunnel/TrustTunnelClient.git
synced 2026-05-22 19:41:36 +00:00
72461d0994
Merge in ADGUARD-CORE-LIBS/vpn-libs from feature/add_opensource_vpn_client to master Squashed commit of the following: commit 0b68e8bebcb5ab4ab76aa5d63267f224c5bd56f2 Author: Sergei Gunchenko <s.gunchenko@adguard.com> Date: Mon Aug 1 19:28:49 2022 +0300 common/src/utils.cpp edited online with Bitbucket commit 237afe76b1e03c8e95fd7564b100d72956598550 Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 16:58:00 2022 +0300 Maybe fix conan-upload-recipes commit 940c4abfc8808b7e464a37302d7eca5215eda14e Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 16:57:52 2022 +0300 Un-simplify conan export script commit c6ee05e3642d27daadf6b1d49374b187bdeec818 Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 16:51:12 2022 +0300 Debug commit b3956633a8ad4d6ada4559b2fc4fb0d4d09e97ea Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 16:49:27 2022 +0300 Maybe fix upload-conan-recipes 2 commit 447f05addd243bce179d99812309c3f9bb1b7412 Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 16:42:20 2022 +0300 Maybe fix upload-conan-recipes commit 8ff27ec486c4176676d3c186dfda13e652fb0344 Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 15:39:37 2022 +0300 Check subprocess return in conan_export.py commit 5652549b863232f573e18c71844323e3298bf080 Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 15:22:30 2022 +0300 Fix bamboo spec commit 28ae435a1500afd0e288c33695003f9feb59100f Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 15:20:16 2022 +0300 Get rid of version.h, use increment_version.sh from native_libs_common commit 01f4f4892d3718ee48e25192259239c6e95183cd Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 15:16:02 2022 +0300 Fix conandata.yml commit b4163a3dfdbdd5dc2817988a8325d21754165e83 Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 15:10:30 2022 +0300 Simplify conan export script commit 03343cd1ae47a1e60fddb09e58bacf498f765991 Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 14:57:26 2022 +0300 Fix bamboo spec commit 9ba118b74ddc41e1ccd3d7c754120e03e86699ee Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 14:56:19 2022 +0300 Update changelog commit ce1c14cdcf18ab1032d12555db1efaa177ef6101 Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 14:55:36 2022 +0300 Fix increment_version.sh and increment version commit 56186e50fd51925f6fb7dc17e9d1fc7a5831a2c8 Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 14:53:19 2022 +0300 Add versioning system from native_libs_common commit e6570a1afdda8da0afad51c94e8d1b7375739fea Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 14:20:13 2022 +0300 Add missing includes commit 5e708c71553f31e7998dcc5d310e1abecef44ab4 Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 14:17:52 2022 +0300 Add license commit 09ee4698adc2514a23962f0549f9a571d40f4f96 Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 13:30:12 2022 +0300 Pull variable out of namespace ag commit 7bfc263756c175c6ac85fd8310c387c666a5038b Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 12:25:21 2022 +0300 Update native_libs_common to 2.0.10 commit 68025494e7c781cdfd8ee1f4ef801014c8179d67 Author: Nikita Gorskikh <n.gorskikh@adguard.com> Date: Mon Aug 1 12:25:05 2022 +0300 Permanently add /Oy- and -fno-omit-frame-pointer compiler flags ... and 123 more commits
36 lines
1.1 KiB
CMake
36 lines
1.1 KiB
CMake
include(GoogleTest)
|
|
|
|
if(NOT TARGET tests)
|
|
add_custom_target(tests)
|
|
endif(NOT TARGET tests)
|
|
|
|
# `EXPAND_GTEST` is useful if the test has a parametrized gtest case, it often makes the report
|
|
# unreadable
|
|
function(add_unit_test TEST_NAME TEST_DIR EXTRA_INCLUDES IS_GTEST EXPAND_GTEST)
|
|
set(FILE_NO_EXT ${TEST_DIR}/${TEST_NAME})
|
|
if (EXISTS "${FILE_NO_EXT}.cpp")
|
|
set(FILE_PATH ${FILE_NO_EXT}.cpp)
|
|
elseif(EXISTS "${FILE_NO_EXT}.c")
|
|
set(FILE_PATH ${FILE_NO_EXT}.c)
|
|
else()
|
|
message(FATAL_ERROR "Cannot find source file for test: ${TEST_NAME} (directory=${TEST_DIR})")
|
|
endif()
|
|
|
|
add_executable(${TEST_NAME} EXCLUDE_FROM_ALL ${FILE_PATH})
|
|
foreach(INC ${EXTRA_INCLUDES})
|
|
target_include_directories(${TEST_NAME} PRIVATE ${INC})
|
|
endforeach()
|
|
|
|
add_dependencies(tests ${TEST_NAME})
|
|
|
|
if (${IS_GTEST})
|
|
target_link_libraries(${TEST_NAME} PRIVATE CONAN_PKG::gtest)
|
|
endif()
|
|
|
|
if (${EXPAND_GTEST})
|
|
gtest_discover_tests(${TEST_NAME})
|
|
else()
|
|
add_test(${TEST_NAME} ${TEST_NAME})
|
|
endif()
|
|
endfunction()
|