Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

CMakeLists.txt 1.9 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
  1. #
  2. #
  3. # Copyright (c) 1991-2020 by the GMT Team (https://www.generic-mapping-tools.org/team.html)
  4. # See LICENSE.TXT file for copying and redistribution conditions.
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU Lesser General Public License as published by
  8. # the Free Software Foundation; version 3 or any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU Lesser General Public License for more details.
  14. #
  15. # Contact info: www.generic-mapping-tools.org
  16. #-------------------------------------------------------------------------------
  17. # run tests
  18. if (DO_TESTS)
  19. # Automatically detect all subdirectories for testing
  20. include (GmtHelperMacros)
  21. get_subdir_list (GMT_TEST_DIRS ${CMAKE_CURRENT_SOURCE_DIR})
  22. list (REMOVE_ITEM GMT_TEST_DIRS animation)
  23. if (NOT DO_API_TESTS)
  24. list (REMOVE_ITEM GMT_TEST_DIRS api)
  25. endif (NOT DO_API_TESTS)
  26. # export HAVE_GMT_DEBUG_SYMBOLS
  27. get_directory_property (_dir_defs COMPILE_DEFINITIONS)
  28. list (FIND _dir_defs DEBUG HAVE_GMT_DEBUG_SYMBOLS)
  29. if (HAVE_GMT_DEBUG_SYMBOLS EQUAL -1)
  30. set (HAVE_GMT_DEBUG_SYMBOLS)
  31. else (HAVE_GMT_DEBUG_SYMBOLS EQUAL -1)
  32. set (HAVE_GMT_DEBUG_SYMBOLS TRUE)
  33. endif (HAVE_GMT_DEBUG_SYMBOLS EQUAL -1)
  34. configure_file (gmtest.in gmtest @ONLY)
  35. # add tests
  36. foreach (_test_dir ${GMT_TEST_DIRS})
  37. # find files RELATIVE so that test NAMEs are not absolute paths
  38. file (GLOB _test_scripts RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
  39. "${CMAKE_CURRENT_SOURCE_DIR}/${_test_dir}/*.sh")
  40. foreach (_test ${_test_scripts})
  41. add_test (NAME ${_test}
  42. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  43. COMMAND ${BASH} gmtest ${_test})
  44. endforeach (_test ${_test_scripts})
  45. endforeach (_test_dir ${GMT_TEST_DIRS})
  46. endif (DO_TESTS)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...