aboutsummaryrefslogtreecommitdiffstats
path: root/libtests
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-03-05 14:24:51 +0100
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-03-19 00:53:18 +0100
commitb8aff90997116a84350018f88f1eabdaa368d11b (patch)
tree5ee781b03d3ffa81bfdd813e91f6324a75b266e6 /libtests
parent105862da3ea72c6763c26038d2e02cf243eb0798 (diff)
downloadqpdf-b8aff90997116a84350018f88f1eabdaa368d11b.tar.zst
Add cmake configuration files
Diffstat (limited to 'libtests')
-rw-r--r--libtests/CMakeLists.txt53
1 files changed, 53 insertions, 0 deletions
diff --git a/libtests/CMakeLists.txt b/libtests/CMakeLists.txt
new file mode 100644
index 00000000..96f93482
--- /dev/null
+++ b/libtests/CMakeLists.txt
@@ -0,0 +1,53 @@
+set(TEST_PROGRAMS
+ cxx11
+ aes
+ arg_parser
+ ascii85
+ bits
+ buffer
+ closed_file_input_source
+ concatenate
+ dct_compress
+ dct_uncompress
+ flate
+ hex
+ input_source
+ json
+ json_handler
+ json_parse
+ lzw
+ main_from_wmain
+ matrix
+ md5
+ nntree
+ numrange
+ pdf_version
+ pointer_holder
+ predictors
+ qintc
+ qutil
+ random
+ rc4
+ runlength
+ sha2
+ sparse_array)
+foreach(PROG ${TEST_PROGRAMS})
+ add_executable(${PROG} ${PROG}.cc)
+ target_link_libraries(${PROG} libqpdf_object)
+endforeach()
+
+# Since libtests link with the object library and don't use the DLL,
+# we don't need to (and shouldn't) add the libqpdf target directory to
+# the path for libtests.
+add_test(
+ NAME libtests
+ COMMAND ${RUN_QTEST}
+ --top ${qpdf_SOURCE_DIR}
+ --bin $<TARGET_FILE_DIR:qutil>
+ --bin $<TARGET_FILE_DIR:qpdf>
+ --code ${qpdf_SOURCE_DIR}/libtests
+ --color ${QTEST_COLOR}
+ --show-on-failure ${SHOW_FAILED_TEST_OUTPUT}
+ --tc "${qpdf_SOURCE_DIR}/libtests/*.cc"
+ --tc "${qpdf_SOURCE_DIR}/libqpdf/*.cc"
+ --tc "${qpdf_SOURCE_DIR}/libqpdf/qpdf/bits_functions.hh")