cmake_minimum_required(VERSION 3.10)
project(DSSApiTest)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_BUILD_TYPE Debug)
add_compile_options(-O0 -g3 -ggdb)
find_package(GTest REQUIRED)
get_filename_component(DSS_ROOT "${PROJECT_SOURCE_DIR}/../.." ABSOLUTE)
include_directories(${GTEST_INCLUDE_DIRS})
include_directories(${DSS_ROOT}/src/interface)
link_directories(${DSS_ROOT}/output/lib)
add_executable(test_dss_api_basic test_dss_api_basic.cc)
add_executable(test_dss_api_param test_dss_api_param.cc)
add_executable(test_dss_api_util test_dss_api_util.cc)
add_executable(test_dss_api_file test_dss_api_file.cc)
target_link_libraries(test_dss_api_basic ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} pthread dssapi)
target_link_libraries(test_dss_api_param ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} pthread dssapi)
target_link_libraries(test_dss_api_util ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} pthread dssapi)
target_link_libraries(test_dss_api_file ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} pthread dssapi)
enable_testing()
add_test(NAME DSSApiBasicTest COMMAND test_dss_api_basic)
add_test(NAME DSSApiParamTest COMMAND test_dss_api_param)
add_test(NAME DSSApiUtilityTest COMMAND test_dss_api_util)
add_test(NAME DSSApiFileTest COMMAND test_dss_api_file)