Files
logging/tests/CMakeLists.txt
youmetme 3ef229ed65 Dev test on windows action (#9)
* #feat 增强Fatal级别的底色,修改logging类的方法

* 更新版本号

* 加入test脚本

* fix:conanfile

* test action

* 修复错别字

* add test on windows action

* fix test on windows action

* fix action on windows

* fix

* fix 内存分配错误

* fix msvc 不支持中文注释,删除中文注释
2024-11-02 20:26:04 +08:00

21 lines
695 B
CMake

project(test)
enable_testing()
#测试简单基本应用
add_executable(${PROJECT_NAME}simple test_simple.c)
target_link_libraries(${PROJECT_NAME}simple logging)
if(UNIX)
add_test(test_simple ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}simple)
elseif(WIN32)
add_test(test_simple ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}simple.exe)
endif()
#测试拦截器
add_executable(${PROJECT_NAME}interceptor test_interceptor.c)
target_link_libraries(${PROJECT_NAME}interceptor logging)
if(UNIX)
add_test(test_interceptor ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}interceptor)
elseif(WIN32)
add_test(test_interceptor ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}interceptor.exe)
endif()