diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-12-23 16:27:24 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-12-23 16:27:24 +0000 |
commit | d1cfc0855275b55794810162e7ce04a1e16d5188 (patch) | |
tree | 2e2626ee0e4738e8d6b6624c2d7fafe506b3dbfb /Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake | |
parent | 932a0f6f62cb2f33be1bade4059504d9c2749f9c (diff) |
libgd 2.2.3
git-svn-id: svn://tug.org/texlive/trunk@42778 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake')
-rw-r--r-- | Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake index 1e846dd855d..bef21f94f36 100644 --- a/Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake +++ b/Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake @@ -1 +1,13 @@ option(BUILD_TEST "Compile examples in the build tree and enable ctest" OFF) + +# This expects TESTS_FILES to already be defined to the lists of tests. +# Extra libs can be passed in as the 1st argument. +MACRO(ADD_GD_TESTS) + GET_FILENAME_COMPONENT(TEST_PREFIX ${CMAKE_CURRENT_SOURCE_DIR} NAME_WE) + FOREACH(test_name ${TESTS_FILES}) + SET(test_prog_name "test_${TEST_PREFIX}_${test_name}") + add_executable(${test_prog_name} "${test_name}.c") + target_link_libraries (${test_prog_name} gdTest ${ARGV0}) + add_test(NAME ${test_prog_name} COMMAND ${test_prog_name}) + ENDFOREACH(test_name) +ENDMACRO(ADD_GD_TESTS) |