diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
commit | ad547a6b5986815fda458221149728d9d9ab1d87 (patch) | |
tree | 16296910eb3eca724371474ea9aea3994dc69614 /Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake | |
parent | 947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff) |
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 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 | 17 |
1 files changed, 17 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 new file mode 100644 index 00000000000..963b4aeed59 --- /dev/null +++ b/Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake @@ -0,0 +1,17 @@ +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") + IF(WIN32) + target_link_libraries (${test_prog_name} gdTest ${ARGV0}) + ELSE(WIN32) + target_link_libraries (${test_prog_name} gdTest m ${ARGV0}) + ENDIF(WIN32) + add_test(NAME ${test_prog_name} COMMAND ${test_prog_name}) + ENDFOREACH(test_name) +ENDMACRO(ADD_GD_TESTS) |