Commit ee933ef
authored
cmake: Check if C macros are correctly parse when building module info (#3191)
The macro **THIS_MODULE_KEYS** could be empty, but the other 4 macros must be non-empty:
- THIS_MODULE_CLASSIC_NAME
- THIS_MODULE_MODERN_NAME
- THIS_MODULE_LIB
- THIS_MODULE_PURPOSE
If any of the 4 macros are not given, given an empty string, or incorrectly parsed by our regex,
the CMake script will report warnings like:
```
CMake Warning at /Users/seisman/Gits/gmt/gmt/cmake/modules/GmtGenExtraHeaders.cmake:111 (message):
THIS_MODULE_PURPOSE is empty in seis/pssac.c
Call Stack (most recent call first):
/Users/seisman/Gits/gmt/gmt/cmake/modules/GmtGenExtraHeaders.cmake:130 (gen_gmt_moduleinfo_h)
```
Address #3180.1 parent 95f5c4a commit ee933ef
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
91 | 96 | | |
92 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
93 | 102 | | |
94 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
95 | 108 | | |
96 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
97 | 114 | | |
98 | 115 | | |
| 116 | + | |
99 | 117 | | |
100 | 118 | | |
101 | 119 | | |
| |||
0 commit comments