Add semi-test

This commit is contained in:
Václav Valíček 2020-05-17 10:11:58 +02:00
parent 524809f28f
commit 9227232eef

View File

@ -3,6 +3,7 @@ project(test_shared_library LANGUAGES C VERSION 1.0.2 DESCRIPTION "Shared C Libr
include(GNUInstallDirs) include(GNUInstallDirs)
add_library(test_shared_library SHARED test_shared_library.c test_shared_library.h) add_library(test_shared_library SHARED test_shared_library.c test_shared_library.h)
set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD 99)
enable_testing()
set_target_properties(test_shared_library PROPERTIES set_target_properties(test_shared_library PROPERTIES
VERSION ${PROJECT_VERSION} VERSION ${PROJECT_VERSION}
@ -22,5 +23,7 @@ install(FILES ${CMAKE_BINARY_DIR}/test_shared_library.pc
install(EXPORT test_shared_library_export DESTINATION share/test_shared_library/cmake) install(EXPORT test_shared_library_export DESTINATION share/test_shared_library/cmake)
add_executable(test test.c) add_executable(test_library test.c)
target_link_libraries(test test_shared_library) target_link_libraries(test_library test_shared_library)
add_test(test_shared_lib_dynamic test_library)