37 lines
926 B
CMake
37 lines
926 B
CMake
include(FetchContent)
|
|
|
|
## Project-wide setup
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
|
set(CMAKE_CXX_EXTENSIONS NO)
|
|
|
|
# Externally provided libraries
|
|
FetchContent_Declare(googletest
|
|
GIT_REPOSITORY https://github.com/google/googletest.git
|
|
GIT_TAG main
|
|
)
|
|
|
|
FetchContent_GetProperties(googletest)
|
|
if(NOT googletest_POPULATED)
|
|
FetchContent_Populate(googletest)
|
|
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} EXCLUDE_FROM_ALL)
|
|
endif()
|
|
|
|
add_executable(rublon-tests
|
|
./authentication_step_common_tests.cpp
|
|
./core_handler_tests.cpp
|
|
./init_test.cpp
|
|
./method_select_tests.cpp
|
|
./passcode_auth_tests.cpp
|
|
./sign_tests.cpp
|
|
./utils_tests.cpp
|
|
|
|
./core_handler_mock.hpp
|
|
./core_response_generator.hpp
|
|
./http_mock.hpp
|
|
)
|
|
|
|
target_link_libraries(rublon-tests rublon-ssh GTest::gmock_main -lssl -lcrypto)
|
|
|
|
add_test(rublon-tests rublon-unittests)
|