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

config-gmt-unix.sh 1.3 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
52
53
  1. #!/usr/bin/env bash
  2. # Configure GMT setting under UNIX
  3. # To return a failure if any commands inside fail
  4. set -e
  5. cat > cmake/ConfigUser.cmake << 'EOF'
  6. set (CMAKE_INSTALL_PREFIX "$ENV{INSTALLDIR}")
  7. set (GSHHG_ROOT "$ENV{COASTLINEDIR}/gshhg")
  8. set (DCW_ROOT "$ENV{COASTLINEDIR}/dcw")
  9. set (GMT_USE_THREADS TRUE)
  10. set (GMT_ENABLE_OPENMP TRUE)
  11. # recommended even for release build
  12. set (CMAKE_C_FLAGS "-Wall -Wdeclaration-after-statement ${CMAKE_C_FLAGS}")
  13. # extra warnings
  14. set (CMAKE_C_FLAGS "-Wextra ${CMAKE_C_FLAGS}")
  15. EOF
  16. if [[ "$RUN_TESTS" == "true" ]]; then
  17. cat >> cmake/ConfigUser.cmake << 'EOF'
  18. set (CMAKE_BUILD_TYPE Debug)
  19. enable_testing()
  20. set (DO_EXAMPLES TRUE)
  21. set (DO_TESTS TRUE)
  22. set (DO_API_TESTS ON)
  23. set (SUPPORT_EXEC_IN_BINARY_DIR TRUE)
  24. # For code coverage
  25. set (CMAKE_C_FLAGS "-coverage -O0 ${CMAKE_C_FLAGS}")
  26. # Turn on testing of upcoming long-option syntax for common GMT options
  27. add_definitions(-DUSE_COMMON_LONG_OPTIONS)
  28. # Turn on testing of upcoming long-option syntax for module options
  29. add_definitions(-DUSE_MODULE_LONG_OPTIONS)
  30. EOF
  31. fi
  32. if [[ "$BUILD_DOCS" == "true" ]]; then
  33. cat >> cmake/ConfigUser.cmake << 'EOF'
  34. set (DO_ANIMATIONS TRUE)
  35. EOF
  36. fi
  37. echo ""
  38. echo "Using the following cmake configuration:"
  39. cat cmake/ConfigUser.cmake
  40. echo ""
  41. # Turn off exit on failure.
  42. set +e
Tip!

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

Comments

Loading...