Skip to content

Commit

Permalink
test/libicalvcard/CMakeLists.txt: add and use vctestme() macro
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmurchison committed Apr 25, 2024
1 parent ae3d48e commit c047e8b
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions src/test/libicalvcard/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,17 @@ include_directories(
${PROJECT_BINARY_DIR}
${PROJECT_SOURCE_DIR}/src
${PROJECT_BINARY_DIR}/src
${PROJECT_SOURCE_DIR}/src/libical
${PROJECT_BINARY_DIR}/src/libical
${PROJECT_SOURCE_DIR}/src/libicalvcard
${PROJECT_BINARY_DIR}/src/libicalvcard
)

add_executable(vcard_test vcard_test.c)
add_dependencies(vcard_test ical icalvcard)
target_link_libraries(vcard_test ical icalvcard)
macro(vctestme _name _srcs)
add_executable(${_name} ${_srcs})
add_dependencies(${_name} icalvcard)
target_link_libraries(${_name} icalvcard)
add_test(NAME ${_name} COMMAND ${_name})
setprops(${_name})
endmacro()

add_executable(vcard_test_encode vcard_test_encode.c)
add_dependencies(vcard_test_encode icalvcard)
target_link_libraries(vcard_test_encode icalvcard)

add_test(NAME vcard_construct COMMAND vcard_test)
setprops(vcard_construct)

add_test(NAME vcard_encode COMMAND vcard_test_encode)
setprops(vcard_encode)
vctestme(vcard_construct vcard_test.c)
vctestme(vcard_encode vcard_test_encode.c)

0 comments on commit c047e8b

Please sign in to comment.