Initial commit
This commit is contained in:
27
tests/CMakeLists.txt
Normal file
27
tests/CMakeLists.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(adapter LANGUAGES CXX)
|
||||
|
||||
enable_testing()
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(googletest
|
||||
GIT_REPOSITORY https://github.com/google/googletest.git
|
||||
GIT_TAG main)
|
||||
|
||||
# For Windows: Prevent overriding the parent project's compiler/linker settings
|
||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
FetchContent_MakeAvailable(googletest)
|
||||
|
||||
enable_testing()
|
||||
|
||||
include_directories(..)
|
||||
|
||||
add_executable(adapter main.cpp tst_adapter.cpp
|
||||
mocks/usbdevicemock.h)
|
||||
add_test(NAME adapter COMMAND adapter)
|
||||
|
||||
target_link_libraries(adapter PRIVATE gmock gtest noolite)
|
||||
Reference in New Issue
Block a user