exiv2/unitTests/CMakeLists.txt
Luis Diaz Mas bf0b7affaa Add few basic unit tests for DateValue
I feel more confortable doing changes in a code that I do not know by
having some unit tests around it. These characterisation tests will
also be useful as documentation.
2018-04-08 10:10:12 +02:00

33 lines
683 B
CMake

add_executable(unit_tests mainTestRunner.cpp
gtestwrapper.h
test_types.cpp
test_tiffheader.cpp
test_futils.cpp
test_enforce.cpp
test_safe_op.cpp
test_XmpKey.cpp
test_DateValue.cpp
)
#TODO Use GTest::GTest once we upgrade the minimum CMake version required
target_link_libraries(unit_tests
PRIVATE
exiv2lib
${GTEST_BOTH_LIBRARIES}
)
target_include_directories(unit_tests
PRIVATE
${GTEST_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/src
)
target_compile_definitions(unit_tests
PRIVATE
GTEST_LINKED_AS_SHARED_LIBRARY=1
)
set_target_properties( unit_tests PROPERTIES
COMPILE_FLAGS ${EXTRA_COMPILE_FLAGS}
)