Compare commits
1168 Commits
vms_last_s
...
inactive/p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
557a3972ac | ||
|
|
25f271d84b | ||
|
|
c8a6c6030a | ||
|
|
4da0790886 | ||
|
|
745513e2b0 | ||
|
|
be36958b77 | ||
|
|
1a4e315a5d | ||
|
|
f1283d59b0 | ||
|
|
c418bc964d | ||
|
|
0461830ee3 | ||
|
|
48bebcc39e | ||
|
|
6694764120 | ||
|
|
57da3b7db6 | ||
|
|
c746447b0d | ||
|
|
e9139733f2 | ||
|
|
2b2b95814e | ||
|
|
28b16f19b2 | ||
|
|
e25aa5f97d | ||
|
|
2fb4f0b35e | ||
|
|
6a566cdc84 | ||
|
|
6dc56e664b | ||
|
|
a969fbf604 | ||
|
|
a6da81e49b | ||
|
|
72bc67f464 | ||
|
|
1454a45826 | ||
|
|
7afa7bb6af | ||
|
|
7abd70b809 | ||
|
|
5c276d9dfc | ||
|
|
ad617b9bfc | ||
|
|
20a3462089 | ||
|
|
8bbdc947c4 | ||
|
|
8aa7c27fb7 | ||
|
|
0d714830a8 | ||
|
|
c3f08947c1 | ||
|
|
43b96df2a4 | ||
|
|
91aeb766fa | ||
|
|
8ca4c2f44b | ||
|
|
8a60e4f1a4 | ||
|
|
d543f12473 | ||
|
|
b9763eee6d | ||
|
|
8db3728779 | ||
|
|
b10dd41aef | ||
|
|
a7ef06d593 | ||
|
|
0d68aa89ce | ||
|
|
c09393ed0a | ||
|
|
06547eb4dd | ||
|
|
bd44db8a3c | ||
|
|
94d03fd874 | ||
|
|
b29d6174e1 | ||
|
|
1617502f5e | ||
|
|
0115366eee | ||
|
|
af88e57c26 | ||
|
|
24443da316 | ||
|
|
2396a172ad | ||
|
|
67570ce476 | ||
|
|
5dbc03ac86 | ||
|
|
887cf130ff | ||
|
|
74fbe507ae | ||
|
|
ed380746fe | ||
|
|
dc63336a4a | ||
|
|
e9a63d30df | ||
|
|
971af2d733 | ||
|
|
b834ac3653 | ||
|
|
06da6031a5 | ||
|
|
4bf63f78e7 | ||
|
|
48f7ad2df1 | ||
|
|
fb1525c2b2 | ||
|
|
6310259957 | ||
|
|
4b90bb3317 | ||
|
|
4c5bb2b8db | ||
|
|
3e0e79aa6e | ||
|
|
1cbc72e1ef | ||
|
|
cdc21e0cb2 | ||
|
|
064b2f6dd8 | ||
|
|
f017eb6fc0 | ||
|
|
f8465bd124 | ||
|
|
d4f3d93b8d | ||
|
|
42bf0e2136 | ||
|
|
f60170dac7 | ||
|
|
8d8d56d7d1 | ||
|
|
528ab9b810 | ||
|
|
c6949efd4f | ||
|
|
b5504be6cc | ||
|
|
6d8b831b31 | ||
|
|
6f83966fb9 | ||
|
|
4a25e5b788 | ||
|
|
9ceca0f89a | ||
|
|
2c55e17cfb | ||
|
|
0a00732c4d | ||
|
|
1ab7e61c39 | ||
|
|
b3426914a8 | ||
|
|
410d8365d0 | ||
|
|
ae8e3348cf | ||
|
|
2824e6bef0 | ||
|
|
61cee5f91a | ||
|
|
ddd91a7b19 | ||
|
|
322816c966 | ||
|
|
7a0cdfbbac | ||
|
|
2cb441c507 | ||
|
|
7e4fb72913 | ||
|
|
f6c7631b3c | ||
|
|
59c2f32bc7 | ||
|
|
3cdcdbc03e | ||
|
|
91f01bd702 | ||
|
|
abf03a6c65 | ||
|
|
e78db67c62 | ||
|
|
aa4fc58ac9 | ||
|
|
f53c939bd0 | ||
|
|
1b62a22e0c | ||
|
|
1dae74395b | ||
|
|
7822924da9 | ||
|
|
84d9914a13 | ||
|
|
308426c6e3 | ||
|
|
fe938a0d71 | ||
|
|
bb2cdb9283 | ||
|
|
46aa3ded7c | ||
|
|
5855f5d431 | ||
|
|
af371007e8 | ||
|
|
015d8047fb | ||
|
|
dc4a9970ec | ||
|
|
ab1c4e6ba2 | ||
|
|
8552007518 | ||
|
|
68e2b78957 | ||
|
|
8de50ab664 | ||
|
|
e3c415fe5a | ||
|
|
8830acb2cb | ||
|
|
5c6f1819d5 | ||
|
|
54aa68df1a | ||
|
|
2e9220b8e6 | ||
|
|
9de281111f | ||
|
|
9d72e487e3 | ||
|
|
71ee2155d4 | ||
|
|
bbfd8a30aa | ||
|
|
893d5a4e7a | ||
|
|
5f6e580533 | ||
|
|
3bdc5d7aa4 | ||
|
|
b7240446da | ||
|
|
59ba9f2bc5 | ||
|
|
f7b73969f3 | ||
|
|
7426415d95 | ||
|
|
401f0c181e | ||
|
|
45aa5c30c3 | ||
|
|
3537b69b5b | ||
|
|
8e179b17aa | ||
|
|
b7310b0d1f | ||
|
|
00aaf8e6f4 | ||
|
|
acbb71201b | ||
|
|
62563badd8 | ||
|
|
543ec79118 | ||
|
|
7791549252 | ||
|
|
37ed7e8b5f | ||
|
|
3edabec156 | ||
|
|
aa4284b2a3 | ||
|
|
9f702766f8 | ||
|
|
dec18189f4 | ||
|
|
7d34c32445 | ||
|
|
78c820b1ee | ||
|
|
83d7feb63c | ||
|
|
6a6e921d2f | ||
|
|
7ad885febc | ||
|
|
01a198ac1b | ||
|
|
84c4dc0039 | ||
|
|
1bf086b080 | ||
|
|
2094d86461 | ||
|
|
2af0d74216 | ||
|
|
a9da5b8cc5 | ||
|
|
eca1bd1d8b | ||
|
|
cd4b835614 | ||
|
|
d1139d78d6 | ||
|
|
d72281dff4 | ||
|
|
0be7b0d524 | ||
|
|
60cdc22cd3 | ||
|
|
86f450c240 | ||
|
|
5464277d0c | ||
|
|
3d8b36f6d1 | ||
|
|
05233bfc73 | ||
|
|
2abe5da201 | ||
|
|
2c9b575d38 | ||
|
|
7c4e5533fb | ||
|
|
bd995868ee | ||
|
|
3aee46a956 | ||
|
|
8c789704da | ||
|
|
fc84edb7e3 | ||
|
|
cd49e8a2ab | ||
|
|
877dfaaad7 | ||
|
|
59c79aec2c | ||
|
|
cfe6d9a8da | ||
|
|
3444e46ea0 | ||
|
|
0facbc77c3 | ||
|
|
8edfabd297 | ||
|
|
ad29dac64a | ||
|
|
8e9b142d9c | ||
|
|
22f78e766c | ||
|
|
58db7babe4 | ||
|
|
16e7b241d0 | ||
|
|
6f04c0f89d | ||
|
|
086904a50d | ||
|
|
d0babe88da | ||
|
|
db00c23829 | ||
|
|
f416522d56 | ||
|
|
f17eb1e610 | ||
|
|
0fb60ee7ae | ||
|
|
81c4e2133a | ||
|
|
c7c6623f28 | ||
|
|
914643490a | ||
|
|
888a002cdd | ||
|
|
0ee053bb95 | ||
|
|
0ef29b550b | ||
|
|
87cc068ccb | ||
|
|
b991b71176 | ||
|
|
f0adeb1cdd | ||
|
|
47c5bc7d61 | ||
|
|
af5c2697a1 | ||
|
|
b9d27c0ed3 | ||
|
|
8d131aca15 | ||
|
|
4dc2218ab5 | ||
|
|
152cc9e143 | ||
|
|
5548799289 | ||
|
|
a89b064e2b | ||
|
|
32ee0d816f | ||
|
|
5c0a8cc86e | ||
|
|
cc8ed681b0 | ||
|
|
e8073c0d80 | ||
|
|
ea70d11227 | ||
|
|
ef2885c5ca | ||
|
|
2557782f24 | ||
|
|
7b7649aa81 | ||
|
|
179d122d59 | ||
|
|
431c69474c | ||
|
|
11201a24ef | ||
|
|
510936d915 | ||
|
|
a4e6d0c7e1 | ||
|
|
e188268610 | ||
|
|
e688c682c3 | ||
|
|
6272555394 | ||
|
|
ccd6248532 | ||
|
|
68962cb2fa | ||
|
|
5422acf9b2 | ||
|
|
fbd659fe6f | ||
|
|
0704819592 | ||
|
|
f45d7b4b7a | ||
|
|
2fbf60fb90 | ||
|
|
6f1dda474c | ||
|
|
574ff3980a | ||
|
|
8186a5cee1 | ||
|
|
aec3e1242d | ||
|
|
dbdc9c1e2b | ||
|
|
04289b3e2a | ||
|
|
10837a2a28 | ||
|
|
2c99d728f0 | ||
|
|
5430c32938 | ||
|
|
a1df19353d | ||
|
|
e732b8073b | ||
|
|
d99143e25b | ||
|
|
6a2195507d | ||
|
|
0d752fc354 | ||
|
|
718b311c11 | ||
|
|
342ab3ccbf | ||
|
|
1cd606b5e0 | ||
|
|
8572b0db32 | ||
|
|
af25c747ad | ||
|
|
4ad84456b3 | ||
|
|
fb238c24a5 | ||
|
|
d3c6b4ad72 | ||
|
|
0be8c16879 | ||
|
|
9edd184ae9 | ||
|
|
fd90a6f5c4 | ||
|
|
209df7c3b0 | ||
|
|
0e4ee6d829 | ||
|
|
0695d6366a | ||
|
|
8fc9a9ba25 | ||
|
|
502dd5500b | ||
|
|
809dcb5c8e | ||
|
|
e78fa78f07 | ||
|
|
132ab9c2f3 | ||
|
|
967dad8cf8 | ||
|
|
87005a24ba | ||
|
|
7c1c3734f3 | ||
|
|
944e42d5ea | ||
|
|
2ddf84b036 | ||
|
|
a8bd6fa91e | ||
|
|
ee7612be44 | ||
|
|
222e7186ea | ||
|
|
78848c63b7 | ||
|
|
12d5f2bb3c | ||
|
|
81b5e1c51f | ||
|
|
d23cc2da70 | ||
|
|
52ac462e7c | ||
|
|
36869656f5 | ||
|
|
92dc665301 | ||
|
|
d90e4acfa7 | ||
|
|
2385b2b0ad | ||
|
|
cc0165a973 | ||
|
|
183ba43b41 | ||
|
|
058ec37559 | ||
|
|
9af344117c | ||
|
|
14e3550348 | ||
|
|
ef8c73ecc3 | ||
|
|
1177e64925 | ||
|
|
2416d5e8ce | ||
|
|
b5eaacb911 | ||
|
|
b2f94f9faf | ||
|
|
43443b2208 | ||
|
|
02ce7e7386 | ||
|
|
050dd02387 | ||
|
|
68659dd411 | ||
|
|
1023374492 | ||
|
|
f16361d5f1 | ||
|
|
122bf84bb3 | ||
|
|
1ac1dfb40f | ||
|
|
672e6bd8a9 | ||
|
|
54d0a36947 | ||
|
|
95e0bd109f | ||
|
|
4b748365df | ||
|
|
8e3464d2d0 | ||
|
|
10da31a926 | ||
|
|
27f9e67d1e | ||
|
|
897b7308f5 | ||
|
|
1dc01a33b2 | ||
|
|
08ce739cda | ||
|
|
531eb2b050 | ||
|
|
e040db8331 | ||
|
|
9ac201d01a | ||
|
|
d9d02bf847 | ||
|
|
129334f04b | ||
|
|
26baf1a805 | ||
|
|
2132f54459 | ||
|
|
776b41a62a | ||
|
|
61090f2cc3 | ||
|
|
f3da956441 | ||
|
|
fadb57f704 | ||
|
|
4c8902cdf0 | ||
|
|
34be1d1aed | ||
|
|
5903fc723b | ||
|
|
c6ed371d19 | ||
|
|
b106502c57 | ||
|
|
210b5d8441 | ||
|
|
9711495437 | ||
|
|
4906383c0f | ||
|
|
bea85e0705 | ||
|
|
cbf5bb6b78 | ||
|
|
dceb3f1818 | ||
|
|
6b1b8869d1 | ||
|
|
0cca701dc2 | ||
|
|
7860f3f5b6 | ||
|
|
33a2e52c6e | ||
|
|
5d311b35ba | ||
|
|
e5dbc90ad2 | ||
|
|
77525ea95d | ||
|
|
099618ad48 | ||
|
|
d2cbacb945 | ||
|
|
f72ed2d8dc | ||
|
|
17f5ee3624 | ||
|
|
c839ed3383 | ||
|
|
4b36ffe0e2 | ||
|
|
bb8c64169b | ||
|
|
137f153ba2 | ||
|
|
1177a5cbbc | ||
|
|
59aa015d9f | ||
|
|
3b5a4a0648 | ||
|
|
db8e289abe | ||
|
|
a90e09889d | ||
|
|
2c91cbecc6 | ||
|
|
81ca9e4c79 | ||
|
|
c226e58005 | ||
|
|
e6f9fc5f7f | ||
|
|
de1bafd1d8 | ||
|
|
b920ee876e | ||
|
|
74792949c9 | ||
|
|
ed50605883 | ||
|
|
a26683076f | ||
|
|
097d2de6f8 | ||
|
|
1103585dc1 | ||
|
|
d001bbde04 | ||
|
|
b68b9d8786 | ||
|
|
a31524e4ae | ||
|
|
1d3a7ec651 | ||
|
|
1847391fc5 | ||
|
|
1252bc4e66 | ||
|
|
05bf2c042c | ||
|
|
c2ce904d5d | ||
|
|
ccf2bcc636 | ||
|
|
c365b9a59f | ||
|
|
a9c28bac4e | ||
|
|
01a1e8f1ca | ||
|
|
c491cf01bf | ||
|
|
606c16e111 | ||
|
|
6635d4c003 | ||
|
|
2faae30c8d | ||
|
|
767585b70f | ||
|
|
4939ee2419 | ||
|
|
0286bb12de | ||
|
|
8aef26f785 | ||
|
|
e8dc2c232d | ||
|
|
2e6100fb23 | ||
|
|
76d7d3cb97 | ||
|
|
071fb9393e | ||
|
|
47d97ed2c0 | ||
|
|
9d625c0580 | ||
|
|
49a27febbc | ||
|
|
abdb2a6456 | ||
|
|
de324a50f8 | ||
|
|
ab7d724ffd | ||
|
|
3c5a088df0 | ||
|
|
32bf83f1cf | ||
|
|
7ce2d52cf6 | ||
|
|
1821b64d49 | ||
|
|
1b2b0bd5a3 | ||
|
|
e3bea91686 | ||
|
|
1436a07905 | ||
|
|
b1dcfc7a84 | ||
|
|
6909d2033f | ||
|
|
8db36cc766 | ||
|
|
2b4038e5e7 | ||
|
|
6e0edba918 | ||
|
|
69e2f53edb | ||
|
|
d06fee7bd2 | ||
|
|
72ae17138b | ||
|
|
68347a67ef | ||
|
|
b79070ac8d | ||
|
|
dc13fabc14 | ||
|
|
c27d180848 | ||
|
|
1eff550df3 | ||
|
|
cefda2ef0c | ||
|
|
51e16157c2 | ||
|
|
07106823b4 | ||
|
|
d3e931c772 | ||
|
|
91ec943123 | ||
|
|
1ba3706640 | ||
|
|
48c429d4a3 | ||
|
|
c98d072e69 | ||
|
|
53d53ee0ee | ||
|
|
555a29e896 | ||
|
|
caf0e7692a | ||
|
|
3b4696ccd1 | ||
|
|
415eb5512b | ||
|
|
1900d6a65d | ||
|
|
0c4ec00cba | ||
|
|
98f947ceae | ||
|
|
786acbcd90 | ||
|
|
9ed36ea1f7 | ||
|
|
2bed6a9a48 | ||
|
|
a9bef45c75 | ||
|
|
9e2434625d | ||
|
|
1efa2d7395 | ||
|
|
f0c47dd142 | ||
|
|
173829075c | ||
|
|
4d0187a483 | ||
|
|
ec5d13d65b | ||
|
|
117b936032 | ||
|
|
bfd13897f6 | ||
|
|
679a25a7c4 | ||
|
|
0b4b73331d | ||
|
|
fa52a5a44a | ||
|
|
c6ccc94574 | ||
|
|
e3ac5f3651 | ||
|
|
54497d2b53 | ||
|
|
f56de26444 | ||
|
|
ac5a796db2 | ||
|
|
81d3377737 | ||
|
|
ed0bae78a0 | ||
|
|
49076d6d22 | ||
|
|
6bb109bf6d | ||
|
|
479bd3c800 | ||
|
|
e796ff45c7 | ||
|
|
a8fc7eeaec | ||
|
|
99a90f7fd6 | ||
|
|
0040ee0c99 | ||
|
|
940da78df9 | ||
|
|
f550bc0cea | ||
|
|
74e4cd4d21 | ||
|
|
94a6e02b3d | ||
|
|
a539386a87 | ||
|
|
2edc6a97db | ||
|
|
a41f88bc3e | ||
|
|
bf8fea70bd | ||
|
|
93161fa55c | ||
|
|
53b3d666e5 | ||
|
|
bd28a396d0 | ||
|
|
5065c139c7 | ||
|
|
08244fb237 | ||
|
|
df50addca1 | ||
|
|
8617384653 | ||
|
|
f63785a1ab | ||
|
|
4667abe8a5 | ||
|
|
b1800ed767 | ||
|
|
ea73fae0fb | ||
|
|
03ad911d3d | ||
|
|
72484f3a56 | ||
|
|
e076946256 | ||
|
|
f76d1ca08b | ||
|
|
0e102fb1cd | ||
|
|
a3de9abcbf | ||
|
|
6ed616cd99 | ||
|
|
1e147f4442 | ||
|
|
6334416852 | ||
|
|
2c897f41c0 | ||
|
|
50c000fb49 | ||
|
|
f50c602b01 | ||
|
|
838755cf71 | ||
|
|
c90d6ad286 | ||
|
|
717609a674 | ||
|
|
12b86abf18 | ||
|
|
b7dc32b0a0 | ||
|
|
f71a46a99c | ||
|
|
0a8317aab7 | ||
|
|
8bbe712961 | ||
|
|
3653d2ad01 | ||
|
|
b67a6727cf | ||
|
|
fc42b3efaa | ||
|
|
2b7f0d4780 | ||
|
|
b0afa2ab61 | ||
|
|
5ed3e8a4a7 | ||
|
|
93eaaed722 | ||
|
|
f4dbade233 | ||
|
|
7a72d82cda | ||
|
|
f37ae9d9f9 | ||
|
|
b3b02d5112 | ||
|
|
29bdf0884a | ||
|
|
3f866f18ec | ||
|
|
4e25ab6ebd | ||
|
|
549cc2e1c3 | ||
|
|
985e8d02a4 | ||
|
|
2a567e8155 | ||
|
|
1ed71c5037 | ||
|
|
3c4dd5fa53 | ||
|
|
364c193744 | ||
|
|
9804fed58f | ||
|
|
02d0de0452 | ||
|
|
e2bbdddff7 | ||
|
|
980db9e85b | ||
|
|
3dec75308a | ||
|
|
513d039f08 | ||
|
|
0f9d534bc2 | ||
|
|
5af1fa67c4 | ||
|
|
5b2117ebc7 | ||
|
|
1a5c36ce7e | ||
|
|
4b51823ed4 | ||
|
|
ad37464819 | ||
|
|
89115b11b0 | ||
|
|
8e94745298 | ||
|
|
58a95d0d4a | ||
|
|
44718454ca | ||
|
|
2522e278a8 | ||
|
|
df8bd7ccd6 | ||
|
|
5dac57c5c4 | ||
|
|
e030fe2751 | ||
|
|
a07297e90d | ||
|
|
37b14fd3ed | ||
|
|
86d1946424 | ||
|
|
224c6cbe59 | ||
|
|
5a1be8e235 | ||
|
|
f56008e0fe | ||
|
|
53930f6671 | ||
|
|
cf07aa6803 | ||
|
|
6063aa87e1 | ||
|
|
48e1bbb0f8 | ||
|
|
3b1acf484e | ||
|
|
1e7ab81ff2 | ||
|
|
7cf40ce5e4 | ||
|
|
b32c1bc3ff | ||
|
|
c614e178e3 | ||
|
|
7fdb38eb6f | ||
|
|
cf7c5123cb | ||
|
|
f30ab55f41 | ||
|
|
4878a00ac2 | ||
|
|
202fd2b6c1 | ||
|
|
bea58674e9 | ||
|
|
5ae9dc0369 | ||
|
|
8353d79d26 | ||
|
|
c986d41406 | ||
|
|
0cf5413849 | ||
|
|
5b4b4650c6 | ||
|
|
3256437a00 | ||
|
|
2962171a1c | ||
|
|
3bf582bae9 | ||
|
|
f51fcf3ffa | ||
|
|
17078f2b9d | ||
|
|
1ea6564419 | ||
|
|
fb27787c2a | ||
|
|
85bcb77904 | ||
|
|
fc0fba145e | ||
|
|
616106ade3 | ||
|
|
3d5c3851a3 | ||
|
|
6e9e9e0dd2 | ||
|
|
91eb17db8e | ||
|
|
4f231ddc9b | ||
|
|
48086667b5 | ||
|
|
afb85e30e5 | ||
|
|
f34bdad87c | ||
|
|
adbb64c6cd | ||
|
|
b5a6740703 | ||
|
|
83208611cb | ||
|
|
65e76690fd | ||
|
|
e29904660a | ||
|
|
4117cfe2b9 | ||
|
|
d92c74b4aa | ||
|
|
78e128c544 | ||
|
|
9786fe2f61 | ||
|
|
aa4e3e3985 | ||
|
|
133a5c3681 | ||
|
|
6c4e3759f5 | ||
|
|
f2d14c76b8 | ||
|
|
b9f2a18b5a | ||
|
|
202ea3747e | ||
|
|
7a49603732 | ||
|
|
48741994ac | ||
|
|
625fc9db69 | ||
|
|
bf8942c7e9 | ||
|
|
0f4e97907c | ||
|
|
84311eb701 | ||
|
|
5097bd4429 | ||
|
|
62401ac7c6 | ||
|
|
349ad0d74d | ||
|
|
32703c9fc5 | ||
|
|
bf3b382df7 | ||
|
|
929e8ce128 | ||
|
|
6c81df0a27 | ||
|
|
a6442037e4 | ||
|
|
02e9a43900 | ||
|
|
4a2bee5cd8 | ||
|
|
5eae97bca6 | ||
|
|
8641814c4e | ||
|
|
c27904bc5f | ||
|
|
8f74cc85d8 | ||
|
|
043173a689 | ||
|
|
fad77fd2c2 | ||
|
|
5d12a79db2 | ||
|
|
235b3b86c1 | ||
|
|
e2fa1a7555 | ||
|
|
4d500d4902 | ||
|
|
f486fe1a49 | ||
|
|
17a9efa359 | ||
|
|
2069dbf25e | ||
|
|
fc45d5fcb0 | ||
|
|
92e3188ff3 | ||
|
|
1ac9bcaaa6 | ||
|
|
9ff4558203 | ||
|
|
78c4a8f4c6 | ||
|
|
52e5579fba | ||
|
|
0560c11c20 | ||
|
|
d1feb5307d | ||
|
|
b1cf507c6d | ||
|
|
244784ab2c | ||
|
|
ae82b5232a | ||
|
|
cea93c4a37 | ||
|
|
965e459a98 | ||
|
|
9a8c664ff0 | ||
|
|
948722cde8 | ||
|
|
194d647721 | ||
|
|
ab80cbadfd | ||
|
|
bf53b8c95c | ||
|
|
8060c37ef4 | ||
|
|
8be8a708a3 | ||
|
|
20aa560825 | ||
|
|
197fa23dae | ||
|
|
2e9d48a551 | ||
|
|
8cc79c0825 | ||
|
|
5c437fa51f | ||
|
|
8fd9d6b53f | ||
|
|
cd1620238c | ||
|
|
71bc00a0b5 | ||
|
|
668be45b56 | ||
|
|
d0de32fc3a | ||
|
|
9c9ac47ceb | ||
|
|
7206d78c52 | ||
|
|
775a54c19a | ||
|
|
acdef5f665 | ||
|
|
3d5e75b093 | ||
|
|
e81f0ade77 | ||
|
|
37a07df7b4 | ||
|
|
a86910deac | ||
|
|
7e231953a2 | ||
|
|
f7e10b55ab | ||
|
|
5b92a99024 | ||
|
|
67ba6cb57d | ||
|
|
83d37604d3 | ||
|
|
984ecb72c2 | ||
|
|
674e9f842c | ||
|
|
9dc86e2cde | ||
|
|
8f82c9b8be | ||
|
|
5c8ecdd14a | ||
|
|
0c49a918c4 | ||
|
|
bc6873d3bd | ||
|
|
eda6bf097a | ||
|
|
b15fc6e4a0 | ||
|
|
8fe3dfbf94 | ||
|
|
aa403a1a5d | ||
|
|
5ffdaa87fc | ||
|
|
ad71dbe12c | ||
|
|
8ba06cb15e | ||
|
|
95b63ae685 | ||
|
|
24ef4efe9a | ||
|
|
6ba4fd8694 | ||
|
|
1166efe131 | ||
|
|
98bf03bf1d | ||
|
|
e9735c156a | ||
|
|
6e10ade5ee | ||
|
|
39e0b31a24 | ||
|
|
64466cf833 | ||
|
|
5cb629e6dd | ||
|
|
f77bb92cc1 | ||
|
|
60960ec8a7 | ||
|
|
2c575bb79a | ||
|
|
d52e65a95f | ||
|
|
bfa5786184 | ||
|
|
c1e74850e7 | ||
|
|
82c1ce78d5 | ||
|
|
315c1f9eb0 | ||
|
|
213aa4d060 | ||
|
|
29f4e85094 | ||
|
|
0e742cb8d0 | ||
|
|
ecae912a96 | ||
|
|
d59229751a | ||
|
|
eee4741a2f | ||
|
|
68e4b6ef39 | ||
|
|
2fe77fad31 | ||
|
|
fe7877677a | ||
|
|
f395c2bb03 | ||
|
|
056ffa6341 | ||
|
|
a9b2e36065 | ||
|
|
65ba755e8a | ||
|
|
f3f7473161 | ||
|
|
1c30759aae | ||
|
|
6709dd28f2 | ||
|
|
515d59fd50 | ||
|
|
5a8114a2a9 | ||
|
|
834fab687f | ||
|
|
3939163f49 | ||
|
|
4fc9a3885d | ||
|
|
e13e226bfe | ||
|
|
241bbc426c | ||
|
|
ea6364e818 | ||
|
|
4e50ee0096 | ||
|
|
2417fd7b63 | ||
|
|
cec6cbe9cc | ||
|
|
9fc7e89a09 | ||
|
|
ceff4fe58f | ||
|
|
28f355e81e | ||
|
|
188936ac03 | ||
|
|
7d692f042b | ||
|
|
b8b7d33f41 | ||
|
|
0f453502b9 | ||
|
|
fbf21b18ee | ||
|
|
47f189a194 | ||
|
|
07a1ffde2c | ||
|
|
d4ef2d9b24 | ||
|
|
35a297b461 | ||
|
|
d292908e6f | ||
|
|
80f27eb1f4 | ||
|
|
f0c4d55f91 | ||
|
|
aa2f93cdf6 | ||
|
|
dcb31a0e00 | ||
|
|
0137743470 | ||
|
|
1c2136ee49 | ||
|
|
05a320e9eb | ||
|
|
36eec4b620 | ||
|
|
00dfc443c6 | ||
|
|
5b7398b41d | ||
|
|
f1d1d415af | ||
|
|
8884dc49af | ||
|
|
0cb2e26f5a | ||
|
|
bf47c596a5 | ||
|
|
ab5e55bbf2 | ||
|
|
0a5ca8ad05 | ||
|
|
0308a17597 | ||
|
|
aad4f74fa9 | ||
|
|
cfeb1509c2 | ||
|
|
7b4a24f2f8 | ||
|
|
a2475e33a2 | ||
|
|
0a3151792f | ||
|
|
fd6ce02c92 | ||
|
|
f981d2e11e | ||
|
|
1ba402214d | ||
|
|
68ad830cd9 | ||
|
|
c7529c3d83 | ||
|
|
0d94750391 | ||
|
|
5e6d18e5be | ||
|
|
a3a1f37446 | ||
|
|
11b19627b9 | ||
|
|
6813b25007 | ||
|
|
b32caab787 | ||
|
|
b31103b332 | ||
|
|
c88f2abea5 | ||
|
|
34a1da1731 | ||
|
|
aff66a3790 | ||
|
|
0b0d31e520 | ||
|
|
50db0eed22 | ||
|
|
5fd5aa58ca | ||
|
|
a58b2dbb7e | ||
|
|
baa46f9e43 | ||
|
|
371a27f01e | ||
|
|
1eaaae9821 | ||
|
|
524bfed32e | ||
|
|
cf98752566 | ||
|
|
50db6abee7 | ||
|
|
7bf3a426e8 | ||
|
|
8bdafb38d7 | ||
|
|
c632be5d7b | ||
|
|
75ff45add3 | ||
|
|
7caca66dd0 | ||
|
|
ec2327200d | ||
|
|
d7fd1ed9c7 | ||
|
|
b8c6d8191c | ||
|
|
f53cfbe9d6 | ||
|
|
bd0aaf89e2 | ||
|
|
fa26809cdf | ||
|
|
0cc9b0c79f | ||
|
|
c6717e8134 | ||
|
|
7984de553e | ||
|
|
c04b083b60 | ||
|
|
9f4ed2197a | ||
|
|
1644eda6de | ||
|
|
d7fbbda1a0 | ||
|
|
38f5b52ea4 | ||
|
|
74e0d6d697 | ||
|
|
f8b34b0ff8 | ||
|
|
41302a1ea6 | ||
|
|
11efaf4ff7 | ||
|
|
26e709edc6 | ||
|
|
573365e3a0 | ||
|
|
27313306f8 | ||
|
|
6c0fcb84a8 | ||
|
|
6a27582a44 | ||
|
|
3875cc6960 | ||
|
|
3b72762036 | ||
|
|
b452fc97e6 | ||
|
|
7a4b02567e | ||
|
|
5619a9a119 | ||
|
|
7f06904d28 | ||
|
|
1215ef0370 | ||
|
|
4662835250 | ||
|
|
dd32c639c6 | ||
|
|
5cc53e3ba2 | ||
|
|
6fa9f61ae5 | ||
|
|
4275900a7b | ||
|
|
b9e5e2af4e | ||
|
|
09784944d2 | ||
|
|
abad30a44d | ||
|
|
3032f3adf3 | ||
|
|
33c8035f0e | ||
|
|
99baa66184 | ||
|
|
f6d9d1fdc8 | ||
|
|
6f03b60c61 | ||
|
|
7e183071a5 | ||
|
|
b31a086f3e | ||
|
|
d28652dacf | ||
|
|
db2e8ff371 | ||
|
|
e9db2519b5 | ||
|
|
95983cbdfe | ||
|
|
ccdcbec635 | ||
|
|
cf11eef385 | ||
|
|
6c04e6b03c | ||
|
|
f207efd6f3 | ||
|
|
306775bc98 | ||
|
|
11413003c2 | ||
|
|
904c84b2a2 | ||
|
|
ea029945f5 | ||
|
|
d2c5e2bf57 | ||
|
|
88f8a3c11f | ||
|
|
45577d5693 | ||
|
|
13980cd69a | ||
|
|
98d1c2d9a9 | ||
|
|
d0cea60466 | ||
|
|
3d1f7a21b3 | ||
|
|
3dd38a29b1 | ||
|
|
01093ad350 | ||
|
|
bf7c3fb670 | ||
|
|
56fe37c8e6 | ||
|
|
f617eeb78f | ||
|
|
39fb0401a0 | ||
|
|
8e5a71c716 | ||
|
|
ed599421c5 | ||
|
|
72d896f709 | ||
|
|
2845400b6d | ||
|
|
6f75afd15e | ||
|
|
68decbbc42 | ||
|
|
1756ca5c13 | ||
|
|
50d7a32330 | ||
|
|
ff1c86df14 | ||
|
|
d494d7b3b9 | ||
|
|
b96e13a7e3 | ||
|
|
c2472b4d00 | ||
|
|
79f59eaf4d | ||
|
|
f7386e173c | ||
|
|
463be445ed | ||
|
|
e30b4b17cf | ||
|
|
037f8104e8 | ||
|
|
538be8f847 | ||
|
|
e270981617 | ||
|
|
e26999516d | ||
|
|
eafd204b2d | ||
|
|
c4ec20a6de | ||
|
|
39373fbabb | ||
|
|
f3dd294ff2 | ||
|
|
c8a5172968 | ||
|
|
90cc5df290 | ||
|
|
27dd4e0f05 | ||
|
|
b03d04742d | ||
|
|
c622cc7b38 | ||
|
|
451a91e53b | ||
|
|
d3114a96da | ||
|
|
597c3c089b | ||
|
|
e89290b777 | ||
|
|
299deb64fb | ||
|
|
1180e6f96d | ||
|
|
1f9bf8d63b | ||
|
|
dd0e7540b6 | ||
|
|
1583b1b729 | ||
|
|
b8551d25cc | ||
|
|
dd5a137083 | ||
|
|
1df431a1f4 | ||
|
|
f7c38d0a2d | ||
|
|
460b629e03 | ||
|
|
e0db90bcc4 | ||
|
|
13299383ea | ||
|
|
61b5fa8e2d | ||
|
|
b424ce1b3f | ||
|
|
9c07c94448 | ||
|
|
51fd9e31a6 | ||
|
|
96690845c1 | ||
|
|
fe435e3dd4 | ||
|
|
92b1916151 | ||
|
|
25aa1845e6 | ||
|
|
410e8fe31a | ||
|
|
5f7e9fcf3b | ||
|
|
1180b57990 | ||
|
|
7bfec19a02 | ||
|
|
245f874eb1 | ||
|
|
2db29f6013 | ||
|
|
4de770788f | ||
|
|
105b8b93a0 | ||
|
|
23afd10544 | ||
|
|
4f18b095d8 | ||
|
|
1cd7c16a9d | ||
|
|
57393bc048 | ||
|
|
69ba270936 | ||
|
|
b184d919a6 | ||
|
|
8a1d1b24cf | ||
|
|
aad3aa7856 | ||
|
|
7dae7ce0b9 | ||
|
|
54ce768076 | ||
|
|
3344302a1e | ||
|
|
b08160e38b | ||
|
|
44c8f498e5 | ||
|
|
851a0dcfaf | ||
|
|
9fb399b3d2 | ||
|
|
54e68fe689 | ||
|
|
d63acf93b9 | ||
|
|
5329a7d6f1 | ||
|
|
9501c16857 | ||
|
|
cea7454bef | ||
|
|
d75a6763ec | ||
|
|
74dc896691 | ||
|
|
cac405283f | ||
|
|
43dec53436 | ||
|
|
c26d21bb63 | ||
|
|
db64e76056 | ||
|
|
8f8cbb6225 | ||
|
|
c2c3294c21 | ||
|
|
4cfe53284b | ||
|
|
83beaf7e76 | ||
|
|
5c32711280 | ||
|
|
424826d0dd | ||
|
|
e5d4692a97 | ||
|
|
17f78f8469 | ||
|
|
96c424d8bc | ||
|
|
ead7273c2c | ||
|
|
3b90bca561 | ||
|
|
a382658282 | ||
|
|
66a7cc1289 | ||
|
|
f9fe5b4c32 | ||
|
|
447d7ebae9 | ||
|
|
2d6a979b25 | ||
|
|
66a9948e65 | ||
|
|
4edde43ae5 | ||
|
|
ae9069e469 | ||
|
|
7659506fa8 | ||
|
|
5fcf92e006 | ||
|
|
a7dcecd46c | ||
|
|
9379314551 | ||
|
|
9eeb037725 | ||
|
|
e1fed18477 | ||
|
|
77f1054b3d | ||
|
|
88ac8e8929 | ||
|
|
52607ae900 | ||
|
|
3ed20376e0 | ||
|
|
52896a9f01 | ||
|
|
9afdf275f8 | ||
|
|
bdb7ec3497 | ||
|
|
2c365915e1 | ||
|
|
ca2a0b80c5 | ||
|
|
92d7b82d61 | ||
|
|
04a3b2a458 | ||
|
|
89da5458b6 | ||
|
|
47bb12bc82 | ||
|
|
bfc69905ac | ||
|
|
50f6da2062 | ||
|
|
5aa5ed84da | ||
|
|
31ffa03914 | ||
|
|
64f65d96d9 | ||
|
|
1f4f709e8c | ||
|
|
2f77d8c5ea | ||
|
|
42eee37a26 | ||
|
|
ce19753d87 | ||
|
|
2a4ea9b24e | ||
|
|
63bd09ec8b | ||
|
|
89ffc9f2d7 | ||
|
|
9cdf806eec | ||
|
|
84f0d4735a | ||
|
|
ec2e071c00 | ||
|
|
802fac804d | ||
|
|
19fa03d5a8 | ||
|
|
967c265541 | ||
|
|
ca0a4d24b6 | ||
|
|
61dcc807af | ||
|
|
63e3db6497 | ||
|
|
5be5a4d832 | ||
|
|
da1bfda645 | ||
|
|
b3c3c8ea72 | ||
|
|
e2175fd0ca | ||
|
|
3c9c263e5a | ||
|
|
026cf21de8 | ||
|
|
1aa5cd4fa5 | ||
|
|
f1c4d0ff3f | ||
|
|
86d1ef2096 | ||
|
|
5b294640c0 | ||
|
|
6ee9ea656f | ||
|
|
f56cb6a8f0 | ||
|
|
79771d3fac | ||
|
|
56f7406671 | ||
|
|
a726992cd8 | ||
|
|
6c7aa17753 | ||
|
|
d8e3d8e908 | ||
|
|
dc059968de | ||
|
|
ac290b5e45 | ||
|
|
7462a7ef1c | ||
|
|
7b7f0eafc5 | ||
|
|
c16d230101 | ||
|
|
4c2749fb1d | ||
|
|
2048e0bff9 | ||
|
|
61f0497572 | ||
|
|
45df14138d | ||
|
|
a83b6d6651 | ||
|
|
952d00e7f0 | ||
|
|
aad4250bd6 | ||
|
|
c4044e0c85 | ||
|
|
3550004b20 | ||
|
|
0ce8fddc73 | ||
|
|
2dae075569 | ||
|
|
99a3f4d8d4 | ||
|
|
2ca5b16a9f | ||
|
|
3f72ec11cd | ||
|
|
48d9c30923 | ||
|
|
2811133914 | ||
|
|
80e77e7d77 | ||
|
|
d3728f8d64 | ||
|
|
bc888966a9 | ||
|
|
b1251c915e | ||
|
|
a0ead57cad | ||
|
|
cd9b96a887 | ||
|
|
46074defaa | ||
|
|
8e48921d90 | ||
|
|
c5da9e3270 | ||
|
|
e171ee01f1 | ||
|
|
0c29ac42cd | ||
|
|
f175fd25c8 | ||
|
|
7e220930da | ||
|
|
7c13406814 | ||
|
|
c07d803659 | ||
|
|
bfc0395507 | ||
|
|
f634105bdb | ||
|
|
179f3b7879 | ||
|
|
7556f179c3 | ||
|
|
7881deb15e | ||
|
|
2d760d9de6 | ||
|
|
cec02b0b3e | ||
|
|
a93751a342 | ||
|
|
a5e2167b3e | ||
|
|
88b7d8d34c | ||
|
|
fcd77ffe7e | ||
|
|
734f168225 | ||
|
|
c52835f4c1 | ||
|
|
707965be8a | ||
|
|
fef1ffe690 | ||
|
|
42a97ddeff | ||
|
|
57a1c0b93b | ||
|
|
f679b9006d | ||
|
|
54a36600c0 | ||
|
|
6ce3158da7 | ||
|
|
5867b6db9e | ||
|
|
9d993c5b76 | ||
|
|
3eeed2f1d5 | ||
|
|
fc082e60f3 | ||
|
|
9ecbdc858c | ||
|
|
3a03c275e9 | ||
|
|
a8a9b47170 | ||
|
|
ec90898719 | ||
|
|
14664baf4f | ||
|
|
265782d3eb | ||
|
|
a2b08b6e27 | ||
|
|
a5460b731d | ||
|
|
1199ab1f48 | ||
|
|
d38f3d888d | ||
|
|
8b98b9ee92 | ||
|
|
e9144293c1 | ||
|
|
df7c8f6bc9 | ||
|
|
6b01332709 | ||
|
|
0829df23e5 | ||
|
|
d273b2a2f8 | ||
|
|
14200fef67 | ||
|
|
99c4ec387c | ||
|
|
dcd8c9f487 | ||
|
|
7590687d4b | ||
|
|
a7def93aa3 | ||
|
|
d63cdb36cf | ||
|
|
eea4f45172 | ||
|
|
167619a75d | ||
|
|
e8013712b2 | ||
|
|
ba739af91f | ||
|
|
01c7b17dac | ||
|
|
46d39603ad | ||
|
|
8a528170ec | ||
|
|
cbf280a22d | ||
|
|
473feff3c6 | ||
|
|
68631b6e95 | ||
|
|
51de1ce902 | ||
|
|
a36942f59f | ||
|
|
010c3e7e39 | ||
|
|
e2240d544e | ||
|
|
cd1d1d41df | ||
|
|
45eefdbdea | ||
|
|
0af31e6938 | ||
|
|
8387b3fdfa | ||
|
|
46ea85c6cb | ||
|
|
ba002bcc8f | ||
|
|
8cb70b47cb | ||
|
|
21a38c4e67 | ||
|
|
ec45cabfc7 | ||
|
|
37d1800ec0 | ||
|
|
adc1845b48 | ||
|
|
190ff778af | ||
|
|
da2a2d9400 | ||
|
|
5bf140387f | ||
|
|
edc8d356f3 | ||
|
|
f44d493a4b | ||
|
|
a3eb3ac333 | ||
|
|
682dcf403a | ||
|
|
aea0b5b46e | ||
|
|
fec3d82085 | ||
|
|
45aece2434 | ||
|
|
cc7cdaac59 | ||
|
|
052638dbc8 | ||
|
|
bc0d6a1500 | ||
|
|
7046addd0b | ||
|
|
f142970ac2 | ||
|
|
06587c6e91 | ||
|
|
4a10dbe011 | ||
|
|
b2516b909a | ||
|
|
f1da79edff | ||
|
|
d29c5a6e6a | ||
|
|
4d34a0c6ad | ||
|
|
1e85e7ca52 | ||
|
|
b10f26ab18 | ||
|
|
4e37d30dba | ||
|
|
699b27ee4e | ||
|
|
c5741c15d2 | ||
|
|
8249ada359 |
15
BRANCH.txt
Normal file
15
BRANCH.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
autotools_rework
|
||||
|
||||
The purpose of this branch is to make changes to the autotools files,
|
||||
particularly configure.ac. This will remove a lot of old cruft and update
|
||||
the input files. This effort was started in January 2015 and should be
|
||||
completed within the year.
|
||||
|
||||
This branch tracks the trunk.
|
||||
|
||||
Dana Robinson and Allen Byrne are the owners of this branch.
|
||||
|
||||
This branch should be closed when the bulk of the autotools work is
|
||||
complete and has been merged into the trunk and 1.8 branch. This
|
||||
work should be completed by mid-2015.
|
||||
|
||||
@@ -1,21 +1,4 @@
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Options for HDF5 Filters
|
||||
#-----------------------------------------------------------------------------
|
||||
MACRO (HDF5_SETUP_FILTERS FILTER)
|
||||
option (HDF5_USE_FILTER_${FILTER} "Use the ${FILTER} Filter" ON)
|
||||
if (HDF5_USE_FILTER_${FILTER})
|
||||
set (H5_HAVE_FILTER_${FILTER} 1)
|
||||
set (FILTERS "${FILTERS} ${FILTER}")
|
||||
endif (HDF5_USE_FILTER_${FILTER})
|
||||
# message (STATUS "Filter ${FILTER} is ${HDF5_USE_FILTER_${FILTER}}")
|
||||
ENDMACRO (HDF5_SETUP_FILTERS)
|
||||
|
||||
HDF5_SETUP_FILTERS (SHUFFLE)
|
||||
HDF5_SETUP_FILTERS (FLETCHER32)
|
||||
HDF5_SETUP_FILTERS (NBIT)
|
||||
HDF5_SETUP_FILTERS (SCALEOFFSET)
|
||||
|
||||
include (ExternalProject)
|
||||
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO")
|
||||
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)")
|
||||
@@ -24,8 +7,8 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT
|
||||
option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
|
||||
option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
|
||||
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
|
||||
set (ZLIB_URL ${ZLIB_SVN_URL})
|
||||
set (SZIP_URL ${SZIP_SVN_URL})
|
||||
set (ZLIB_URL ${ZLIB_SVN_URL} CACHE STRING "Path to zlib Subversion repository")
|
||||
set (SZIP_URL ${SZIP_SVN_URL} CACHE STRING "Path to szip Subversion repository")
|
||||
elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
if (NOT TGZPATH)
|
||||
set (TGZPATH ${HDF5_SOURCE_DIR})
|
||||
@@ -45,9 +28,13 @@ option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF)
|
||||
if (HDF5_ENABLE_Z_LIB_SUPPORT)
|
||||
if (NOT H5_ZLIB_HEADER)
|
||||
if (NOT ZLIB_USE_EXTERNAL)
|
||||
find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT})
|
||||
find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
|
||||
if (NOT ZLIB_FOUND)
|
||||
find_package (ZLIB) # Legacy find
|
||||
if (ZLIB_FOUND)
|
||||
set (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES})
|
||||
set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${ZLIB_LIBRARIES})
|
||||
endif (ZLIB_FOUND)
|
||||
endif (NOT ZLIB_FOUND)
|
||||
endif (NOT ZLIB_USE_EXTERNAL)
|
||||
if (ZLIB_FOUND)
|
||||
@@ -56,10 +43,10 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
|
||||
set (H5_HAVE_LIBZ 1)
|
||||
set (H5_ZLIB_HEADER "zlib.h")
|
||||
set (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
|
||||
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
|
||||
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
|
||||
else (ZLIB_FOUND)
|
||||
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE})
|
||||
EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
|
||||
set (H5_HAVE_FILTER_DEFLATE 1)
|
||||
set (H5_HAVE_ZLIB_H 1)
|
||||
set (H5_HAVE_LIBZ 1)
|
||||
@@ -77,7 +64,10 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
|
||||
if (H5_HAVE_FILTER_DEFLATE)
|
||||
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
|
||||
endif (H5_HAVE_FILTER_DEFLATE)
|
||||
set (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES})
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${ZLIB_SHARED_LIBRARY})
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
set (LINK_LIBS ${LINK_LIBS} ${ZLIB_STATIC_LIBRARY})
|
||||
INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
|
||||
message (STATUS "Filter ZLIB is ON")
|
||||
endif (HDF5_ENABLE_Z_LIB_SUPPORT)
|
||||
@@ -89,9 +79,13 @@ option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
|
||||
if (HDF5_ENABLE_SZIP_SUPPORT)
|
||||
option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
|
||||
if (NOT SZIP_USE_EXTERNAL)
|
||||
find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT})
|
||||
find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
|
||||
if (NOT SZIP_FOUND)
|
||||
find_package (SZIP) # Legacy find
|
||||
if (SZIP_FOUND)
|
||||
set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
|
||||
set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${SZIP_LIBRARIES})
|
||||
endif (SZIP_FOUND)
|
||||
endif (NOT SZIP_FOUND)
|
||||
endif (NOT SZIP_USE_EXTERNAL)
|
||||
if (SZIP_FOUND)
|
||||
@@ -99,10 +93,10 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
|
||||
set (H5_HAVE_SZLIB_H 1)
|
||||
set (H5_HAVE_LIBSZ 1)
|
||||
set (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
|
||||
set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
|
||||
set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR})
|
||||
else (SZIP_FOUND)
|
||||
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE} ${HDF5_ENABLE_SZIP_ENCODING})
|
||||
EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING})
|
||||
set (H5_HAVE_FILTER_SZIP 1)
|
||||
set (H5_HAVE_SZLIB_H 1)
|
||||
set (H5_HAVE_LIBSZ 1)
|
||||
@@ -111,7 +105,10 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
|
||||
message (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
|
||||
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
endif (SZIP_FOUND)
|
||||
set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${SZIP_SHARED_LIBRARY})
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
set (LINK_LIBS ${LINK_LIBS} ${SZIP_STATIC_LIBRARY})
|
||||
INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
|
||||
message (STATUS "Filter SZIP is ON")
|
||||
if (H5_HAVE_FILTER_SZIP)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include (${HDF_RESOURCES_DIR}/CMakePackageConfigHelpers.cmake)
|
||||
include (CMakePackageConfigHelpers)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Check for Installation Utilities
|
||||
@@ -79,11 +79,11 @@ configure_package_config_file (
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
configure_file (
|
||||
${HDF_RESOURCES_DIR}/FindHDF5.cmake.in
|
||||
${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake @ONLY
|
||||
${HDF_RESOURCES_DIR}/FindHDF5.cmake.in
|
||||
${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindHDF5${HDF_PACKAGE_EXT}.cmake @ONLY
|
||||
)
|
||||
install (
|
||||
FILES ${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake
|
||||
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindHDF5${HDF_PACKAGE_EXT}.cmake
|
||||
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
|
||||
COMPONENT configinstall
|
||||
)
|
||||
@@ -97,14 +97,14 @@ set (SHARE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${HDF5_INSTALL_CMAKE_DIR}" )
|
||||
set (CURRENT_BUILD_DIR "${CMAKE_INSTALL_PREFIX}" )
|
||||
configure_package_config_file (
|
||||
${HDF_RESOURCES_DIR}/hdf5-config.cmake.in
|
||||
"${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake"
|
||||
"${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake"
|
||||
INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}"
|
||||
PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
|
||||
)
|
||||
|
||||
if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
install (
|
||||
FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake
|
||||
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake
|
||||
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
|
||||
COMPONENT configinstall
|
||||
)
|
||||
@@ -116,10 +116,10 @@ endif (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
configure_file (
|
||||
${HDF_RESOURCES_DIR}/hdf5-config-version.cmake.in
|
||||
${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY
|
||||
${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY
|
||||
)
|
||||
install (
|
||||
FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
|
||||
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
|
||||
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
|
||||
COMPONENT configinstall
|
||||
)
|
||||
@@ -134,12 +134,12 @@ else (H5_WORDS_BIGENDIAN)
|
||||
set (BYTESEX little-endian)
|
||||
endif (H5_WORDS_BIGENDIAN)
|
||||
configure_file (
|
||||
${HDF_RESOURCES_DIR}/libhdf5.settings.cmake.in
|
||||
${HDF_RESOURCES_DIR}/libhdf5.settings.cmake.in
|
||||
${HDF5_BINARY_DIR}/libhdf5.settings @ONLY
|
||||
)
|
||||
install (
|
||||
FILES ${HDF5_BINARY_DIR}/libhdf5.settings
|
||||
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
|
||||
DESTINATION ${HDF5_INSTALL_LIB_DIR}
|
||||
COMPONENT libraries
|
||||
)
|
||||
|
||||
@@ -167,18 +167,26 @@ install (
|
||||
option (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF)
|
||||
if (HDF5_PACK_EXAMPLES)
|
||||
configure_file (
|
||||
${HDF_RESOURCES_DIR}/HDF518_Examples.cmake.in
|
||||
${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY
|
||||
${HDF_RESOURCES_DIR}/HDF5_Examples.cmake.in
|
||||
${HDF5_BINARY_DIR}/HDF5_Examples.cmake @ONLY
|
||||
)
|
||||
install (
|
||||
FILES ${HDF5_BINARY_DIR}/HDF518_Examples.cmake
|
||||
FILES ${HDF5_BINARY_DIR}/HDF5_Examples.cmake
|
||||
DESTINATION ${HDF5_INSTALL_DATA_DIR}
|
||||
COMPONENT hdfdocuments
|
||||
)
|
||||
if (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xzf ${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}
|
||||
)
|
||||
install (
|
||||
DIRECTORY ${HDF5_BINARY_DIR}/HDF5Examples
|
||||
DESTINATION ${HDF5_INSTALL_DATA_DIR}
|
||||
USE_SOURCE_PERMISSIONS
|
||||
COMPONENT hdfdocuments
|
||||
)
|
||||
install (
|
||||
FILES
|
||||
${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}
|
||||
${HDF5_SOURCE_DIR}/release_docs/USING_CMake_Examples.txt
|
||||
DESTINATION ${HDF5_INSTALL_DATA_DIR}
|
||||
COMPONENT hdfdocuments
|
||||
@@ -287,16 +295,20 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
|
||||
set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
|
||||
endif (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
|
||||
set (CPACK_PACKAGE_RELOCATABLE TRUE)
|
||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
|
||||
if (OVERRIDE_INSTALL_VERSION)
|
||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${OVERRIDE_INSTALL_VERSION}")
|
||||
else (OVERRIDE_INSTALL_VERSION)
|
||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
|
||||
endif (OVERRIDE_INSTALL_VERSION)
|
||||
set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.bmp")
|
||||
|
||||
set (CPACK_GENERATOR "TGZ")
|
||||
set (CPACK_GENERATOR "TGZ")
|
||||
if (WIN32)
|
||||
set (CPACK_GENERATOR "ZIP")
|
||||
set (CPACK_GENERATOR "ZIP")
|
||||
|
||||
if (NSIS_EXECUTABLE)
|
||||
list (APPEND CPACK_GENERATOR "NSIS")
|
||||
endif (NSIS_EXECUTABLE)
|
||||
if (NSIS_EXECUTABLE)
|
||||
list (APPEND CPACK_GENERATOR "NSIS")
|
||||
endif (NSIS_EXECUTABLE)
|
||||
# Installers for 32- vs. 64-bit CMake:
|
||||
# - Root install directory (displayed to end user at installer-run time)
|
||||
# - "NSIS package/display name" (text used in the installer GUI)
|
||||
@@ -316,14 +328,17 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
|
||||
# set the package header icon for MUI
|
||||
set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.bmp")
|
||||
set (CPACK_NSIS_DISPLAY_NAME "${CPACK_NSIS_PACKAGE_NAME}")
|
||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}")
|
||||
set (CPACK_MONOLITHIC_INSTALL ON)
|
||||
if (OVERRIDE_INSTALL_VERSION)
|
||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${OVERRIDE_INSTALL_VERSION}")
|
||||
else (OVERRIDE_INSTALL_VERSION)
|
||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}")
|
||||
endif (OVERRIDE_INSTALL_VERSION)
|
||||
set (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}")
|
||||
set (CPACK_NSIS_MODIFY_PATH ON)
|
||||
|
||||
if (WIX_EXECUTABLE)
|
||||
list (APPEND CPACK_GENERATOR "WIX")
|
||||
endif (WIX_EXECUTABLE)
|
||||
|
||||
if (WIX_EXECUTABLE)
|
||||
list (APPEND CPACK_GENERATOR "WIX")
|
||||
endif (WIX_EXECUTABLE)
|
||||
#WiX variables
|
||||
set (CPACK_WIX_UNINSTALL "1")
|
||||
# .. variable:: CPACK_WIX_LICENSE_RTF
|
||||
@@ -361,30 +376,31 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
|
||||
#
|
||||
# This image must be 493 by 312 pixels.
|
||||
#
|
||||
set(CPACK_WIX_PROPERTY_ARPCOMMENTS "HDF5 (Hierarchical Data Format 5) Software Library and Utilities")
|
||||
set(CPACK_WIX_PROPERTY_ARPURLINFOABOUT "${HDF5_PACKAGE_URL}")
|
||||
set(CPACK_WIX_PROPERTY_ARPHELPLINK "${HDF5_PACKAGE_BUGREPORT}")
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set(CPACK_WIX_PATCH_FILE "${HDF_RESOURCES_DIR}/patch.xml")
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
elseif (APPLE)
|
||||
list (APPEND CPACK_GENERATOR "DragNDrop")
|
||||
list (APPEND CPACK_GENERATOR "DragNDrop")
|
||||
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
|
||||
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
||||
set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns")
|
||||
|
||||
if (HDF5_PACK_MACOSX_BUNDLE)
|
||||
list (APPEND CPACK_GENERATOR "Bundle")
|
||||
option (HDF5_PACK_MACOSX_FRAMEWORK "Package the HDF5 Library in a Frameworks" OFF)
|
||||
if (HDF5_PACK_MACOSX_FRAMEWORK AND HDF5_BUILD_FRAMEWORKS)
|
||||
set (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
|
||||
set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in /
|
||||
set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/")
|
||||
set (CPACK_BUNDLE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns")
|
||||
set (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist")
|
||||
set (CPACK_APPLE_GUI_INFO_STRING "HDF5 (Hierarchical Data Format 5) Software Library and Utilities")
|
||||
set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © 2006-2014 by The HDF Group. All rights reserved.")
|
||||
set (CPACK_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}")
|
||||
set (CPACK_APPLE_GUI_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
|
||||
set (CPACK_APPLE_GUI_VERSION_STRING "${CPACK_PACKAGE_VERSION_STRING}")
|
||||
set (CPACK_APPLE_GUI_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}")
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the Info.plist file for the install bundle
|
||||
#-----------------------------------------------------------------------------
|
||||
configure_file (
|
||||
${HDF_RESOURCES_EXT_DIR}/CPack.Info.plist.in
|
||||
${HDF_RESOURCES_DIR}/CPack.Info.plist.in
|
||||
${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY
|
||||
)
|
||||
configure_file (
|
||||
@@ -397,19 +413,18 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
|
||||
)
|
||||
install (
|
||||
FILES ${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo
|
||||
${HDF5_BINARY_DIR}/CMakeFiles/version.plist
|
||||
DESTINATION ..
|
||||
)
|
||||
endif (HDF5_PACK_MACOSX_BUNDLE)
|
||||
endif (HDF5_PACK_MACOSX_FRAMEWORK AND HDF5_BUILD_FRAMEWORKS)
|
||||
else (WIN32)
|
||||
list (APPEND CPACK_GENERATOR "STGZ")
|
||||
list (APPEND CPACK_GENERATOR "STGZ")
|
||||
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
||||
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
|
||||
|
||||
set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries")
|
||||
set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}")
|
||||
|
||||
# list (APPEND CPACK_GENERATOR "RPM")
|
||||
# list (APPEND CPACK_GENERATOR "RPM")
|
||||
set (CPACK_RPM_PACKAGE_RELEASE "1")
|
||||
set (CPACK_RPM_COMPONENT_INSTALL ON)
|
||||
set (CPACK_RPM_PACKAGE_RELOCATABLE ON)
|
||||
@@ -417,7 +432,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
|
||||
set (CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
|
||||
set (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}")
|
||||
set (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.")
|
||||
set (CPACK_RPM_PACKAGE_DESCRIPTION
|
||||
set (CPACK_RPM_PACKAGE_DESCRIPTION
|
||||
"The HDF5 technology suite includes:
|
||||
|
||||
* A versatile data model that can represent very complex data objects and a wide variety of metadata.
|
||||
@@ -433,14 +448,14 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
|
||||
The HDF5 data model, file format, API, library, and tools are open and distributed without charge.
|
||||
"
|
||||
)
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the spec file for the install RPM
|
||||
#-----------------------------------------------------------------------------
|
||||
# configure_file ("${HDF5_RESOURCES_DIR}/hdf5.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec" @ONLY IMMEDIATE)
|
||||
# set (CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec")
|
||||
endif (WIN32)
|
||||
|
||||
|
||||
# By default, do not warn when built on machines using only VS Express:
|
||||
if (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
|
||||
set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
|
||||
@@ -448,126 +463,170 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
|
||||
include (InstallRequiredSystemLibraries)
|
||||
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${HDF5_BINARY_DIR};HDF5;ALL;/")
|
||||
|
||||
|
||||
if (HDF5_PACKAGE_EXTLIBS)
|
||||
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/")
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;headers;/")
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;configinstall;/")
|
||||
if (WIN32)
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;ALL;/")
|
||||
else (WIN32)
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/")
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;headers;/")
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;configinstall;/")
|
||||
endif (WIN32)
|
||||
endif (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
|
||||
if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/")
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;headers;/")
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/")
|
||||
if (WIN32)
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;ALL;/")
|
||||
else (WIN32)
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/")
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;headers;/")
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/")
|
||||
endif (WIN32)
|
||||
endif (SZIP_FOUND AND SZIP_USE_EXTERNAL)
|
||||
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
endif (HDF5_PACKAGE_EXTLIBS)
|
||||
|
||||
|
||||
include (CPack)
|
||||
|
||||
cpack_add_install_type(Full DISPLAY_NAME "Everything")
|
||||
cpack_add_install_type(Developer)
|
||||
|
||||
cpack_add_component_group(Runtime)
|
||||
|
||||
cpack_add_component_group(Documents
|
||||
EXPANDED
|
||||
DESCRIPTION "Release notes for developing HDF5 applications"
|
||||
)
|
||||
|
||||
cpack_add_component_group(Development
|
||||
EXPANDED
|
||||
DESCRIPTION "All of the tools you'll need to develop HDF5 applications"
|
||||
)
|
||||
|
||||
cpack_add_component_group(Applications
|
||||
EXPANDED
|
||||
DESCRIPTION "Tools for HDF5 files"
|
||||
)
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Now list the cpack commands
|
||||
#---------------------------------------------------------------------------
|
||||
CPACK_ADD_COMPONENT (hdfapplications
|
||||
DISPLAY_NAME "HDF5 Applications"
|
||||
DEPENDS libraries
|
||||
GROUP Applications
|
||||
)
|
||||
CPACK_ADD_COMPONENT (libraries
|
||||
cpack_add_component (libraries
|
||||
DISPLAY_NAME "HDF5 Libraries"
|
||||
GROUP Runtime
|
||||
INSTALL_TYPES Full Developer User
|
||||
)
|
||||
CPACK_ADD_COMPONENT (headers
|
||||
DISPLAY_NAME "HDF5 Headers"
|
||||
cpack_add_component (headers
|
||||
DISPLAY_NAME "HDF5 Headers"
|
||||
DEPENDS libraries
|
||||
GROUP Development
|
||||
INSTALL_TYPES Full Developer
|
||||
)
|
||||
CPACK_ADD_COMPONENT (hdfdocuments
|
||||
cpack_add_component (hdfdocuments
|
||||
DISPLAY_NAME "HDF5 Documents"
|
||||
GROUP Documents
|
||||
INSTALL_TYPES Full Developer
|
||||
)
|
||||
CPACK_ADD_COMPONENT (configinstall
|
||||
DISPLAY_NAME "HDF5 CMake files"
|
||||
cpack_add_component (configinstall
|
||||
DISPLAY_NAME "HDF5 CMake files"
|
||||
DEPENDS libraries
|
||||
GROUP Development
|
||||
INSTALL_TYPES Full Developer User
|
||||
)
|
||||
|
||||
|
||||
if (HDF5_BUILD_FORTRAN)
|
||||
CPACK_ADD_COMPONENT (fortlibraries
|
||||
DISPLAY_NAME "HDF5 Fortran Libraries"
|
||||
cpack_add_component (fortlibraries
|
||||
DISPLAY_NAME "HDF5 Fortran Libraries"
|
||||
DEPENDS libraries
|
||||
GROUP Runtime
|
||||
INSTALL_TYPES Full Developer User
|
||||
)
|
||||
CPACK_ADD_COMPONENT (fortheaders
|
||||
DISPLAY_NAME "HDF5 Fortran Headers"
|
||||
cpack_add_component (fortheaders
|
||||
DISPLAY_NAME "HDF5 Fortran Headers"
|
||||
DEPENDS fortlibraries
|
||||
GROUP Development
|
||||
INSTALL_TYPES Full Developer
|
||||
)
|
||||
endif (HDF5_BUILD_FORTRAN)
|
||||
|
||||
|
||||
if (HDF5_BUILD_CPP_LIB)
|
||||
CPACK_ADD_COMPONENT (cpplibraries
|
||||
DISPLAY_NAME "HDF5 C++ Libraries"
|
||||
cpack_add_component (cpplibraries
|
||||
DISPLAY_NAME "HDF5 C++ Libraries"
|
||||
DEPENDS libraries
|
||||
GROUP Runtime
|
||||
INSTALL_TYPES Full Developer User
|
||||
)
|
||||
CPACK_ADD_COMPONENT (cppheaders
|
||||
DISPLAY_NAME "HDF5 C++ Headers"
|
||||
cpack_add_component (cppheaders
|
||||
DISPLAY_NAME "HDF5 C++ Headers"
|
||||
DEPENDS cpplibraries
|
||||
GROUP Development
|
||||
INSTALL_TYPES Full Developer
|
||||
)
|
||||
endif (HDF5_BUILD_CPP_LIB)
|
||||
|
||||
|
||||
if (HDF5_BUILD_TOOLS)
|
||||
CPACK_ADD_COMPONENT (toolsapplications
|
||||
DISPLAY_NAME "HDF5 Tools Applications"
|
||||
cpack_add_component (toolsapplications
|
||||
DISPLAY_NAME "HDF5 Tools Applications"
|
||||
DEPENDS toolslibraries
|
||||
GROUP Applications
|
||||
INSTALL_TYPES Full Developer User
|
||||
)
|
||||
CPACK_ADD_COMPONENT (toolslibraries
|
||||
DISPLAY_NAME "HDF5 Tools Libraries"
|
||||
cpack_add_component (toolslibraries
|
||||
DISPLAY_NAME "HDF5 Tools Libraries"
|
||||
DEPENDS libraries
|
||||
GROUP Runtime
|
||||
INSTALL_TYPES Full Developer User
|
||||
)
|
||||
CPACK_ADD_COMPONENT (toolsheaders
|
||||
DISPLAY_NAME "HDF5 Tools Headers"
|
||||
cpack_add_component (toolsheaders
|
||||
DISPLAY_NAME "HDF5 Tools Headers"
|
||||
DEPENDS toolslibraries
|
||||
GROUP Development
|
||||
INSTALL_TYPES Full Developer
|
||||
)
|
||||
endif (HDF5_BUILD_TOOLS)
|
||||
|
||||
|
||||
if (HDF5_BUILD_HL_LIB)
|
||||
CPACK_ADD_COMPONENT (hllibraries
|
||||
DISPLAY_NAME "HDF5 HL Libraries"
|
||||
cpack_add_component (hllibraries
|
||||
DISPLAY_NAME "HDF5 HL Libraries"
|
||||
DEPENDS libraries
|
||||
GROUP Runtime
|
||||
INSTALL_TYPES Full Developer User
|
||||
)
|
||||
CPACK_ADD_COMPONENT (hlheaders
|
||||
DISPLAY_NAME "HDF5 HL Headers"
|
||||
cpack_add_component (hlheaders
|
||||
DISPLAY_NAME "HDF5 HL Headers"
|
||||
DEPENDS hllibraries
|
||||
GROUP Development
|
||||
INSTALL_TYPES Full Developer
|
||||
)
|
||||
CPACK_ADD_COMPONENT (hltoolsapplications
|
||||
DISPLAY_NAME "HDF5 HL Tools Applications"
|
||||
cpack_add_component (hltoolsapplications
|
||||
DISPLAY_NAME "HDF5 HL Tools Applications"
|
||||
DEPENDS hllibraries
|
||||
GROUP Applications
|
||||
INSTALL_TYPES Full Developer User
|
||||
)
|
||||
CPACK_ADD_COMPONENT (hlcpplibraries
|
||||
DISPLAY_NAME "HDF5 HL C++ Libraries"
|
||||
DEPENDS hllibraries
|
||||
GROUP Runtime
|
||||
)
|
||||
CPACK_ADD_COMPONENT (hlcppheaders
|
||||
DISPLAY_NAME "HDF5 HL C++ Headers"
|
||||
DEPENDS hlcpplibraries
|
||||
GROUP Development
|
||||
)
|
||||
CPACK_ADD_COMPONENT (hlfortlibraries
|
||||
DISPLAY_NAME "HDF5 HL Fortran Libraries"
|
||||
DEPENDS fortlibraries
|
||||
GROUP Runtime
|
||||
)
|
||||
if (HDF5_BUILD_CPP_LIB)
|
||||
cpack_add_component (hlcpplibraries
|
||||
DISPLAY_NAME "HDF5 HL C++ Libraries"
|
||||
DEPENDS hllibraries
|
||||
GROUP Runtime
|
||||
INSTALL_TYPES Full Developer User
|
||||
)
|
||||
cpack_add_component (hlcppheaders
|
||||
DISPLAY_NAME "HDF5 HL C++ Headers"
|
||||
DEPENDS hlcpplibraries
|
||||
GROUP Development
|
||||
INSTALL_TYPES Full Developer
|
||||
)
|
||||
endif (HDF5_BUILD_CPP_LIB)
|
||||
if (HDF5_BUILD_FORTRAN)
|
||||
cpack_add_component (hlfortlibraries
|
||||
DISPLAY_NAME "HDF5 HL Fortran Libraries"
|
||||
DEPENDS fortlibraries
|
||||
GROUP Runtime
|
||||
INSTALL_TYPES Full Developer User
|
||||
)
|
||||
endif (HDF5_BUILD_FORTRAN)
|
||||
endif (HDF5_BUILD_HL_LIB)
|
||||
|
||||
|
||||
endif (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
|
||||
|
||||
567
CMakeLists.txt
567
CMakeLists.txt
@@ -10,6 +10,24 @@ PROJECT (HDF5 C CXX)
|
||||
# set CMAKE_INSTALL_PREFIX to the required install path.
|
||||
# Make install can be used to install all components for system-wide use.
|
||||
#
|
||||
if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
MESSAGE(FATAL_ERROR "\nERROR! ${PROJECT_NAME} DOES NOT SUPPORT IN SOURCE BUILDS!\n"
|
||||
"CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
" == CMAKE_CURRENT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}\n"
|
||||
"NEXT STEPS:\n"
|
||||
"(1) Delete the CMakeCache.txt file and the CMakeFiles/ directory\n"
|
||||
" under the source directory for ${PROJECT_NAME}, otherwise you\n"
|
||||
" will not be able to configure ${PROJECT_NAME} correctly!\n"
|
||||
" * For example, on linux machines do:\n"
|
||||
" $ rm -r CMakeCache.txt CMakeFiles/\n"
|
||||
"(2) Create a different directory and configure ${PROJECT_NAME} in that directory.\n"
|
||||
" * For example, on linux machines do:\n"
|
||||
" $ mkdir MY_BUILD\n"
|
||||
" $ cd MY_BUILD\n"
|
||||
" $ cmake [OPTIONS] ..\n"
|
||||
)
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Instructions for use : Sub-Project Build
|
||||
#
|
||||
@@ -29,7 +47,7 @@ PROJECT (HDF5 C CXX)
|
||||
# dependencies to this variable so that external projects pick them up
|
||||
#
|
||||
# HDF5_EXTERNAL_LIB_PREFIX :
|
||||
# If the parent project needs to install hdf libraries, but avoid
|
||||
# If the parent project needs to install hdf libraries, but avoid
|
||||
# name conflicts with system versions, then a prefix may be added
|
||||
# to ensure that the correct versions configured are used.
|
||||
#
|
||||
@@ -53,8 +71,8 @@ PROJECT (HDF5 C CXX)
|
||||
# # Setup all necessary overrides for zlib so that HDF5 uses our
|
||||
# # internally compiled zlib rather than any other version
|
||||
# if (HDF5_ENABLE_Z_LIB_SUPPORT)
|
||||
# # We must tell the main HDF5 library that it depends on our zlib
|
||||
# set (HDF5_LIB_DEPENDENCIES vtkzlib)
|
||||
# # We must tell the main HDF5 library that it depends on our zlib
|
||||
# set (HDF5_LIB_DEPENDENCIES vtkzlib)
|
||||
# # Override the zlib header file
|
||||
# if (VTK_USE_SYSTEM_ZLIB)
|
||||
# set (H5_ZLIB_HEADER "zlib.h")
|
||||
@@ -65,10 +83,11 @@ PROJECT (HDF5 C CXX)
|
||||
# set (ZLIB_LIBRARIES vtkzlib)
|
||||
# endif (VTK_USE_SYSTEM_ZLIB)
|
||||
# endif (HDF5_ENABLE_Z_LIB_SUPPORT)
|
||||
#
|
||||
#
|
||||
# # Add the sub project
|
||||
# add_subdirectory (Utilities/hdf5-1.8)
|
||||
#-----------------------------------------------------------------------------
|
||||
string(TIMESTAMP CONFIG_DATE "%Y-%m-%d")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Allow Visual Studio solution directories
|
||||
@@ -84,6 +103,8 @@ if (HDF5_USE_FOLDERS)
|
||||
endif (HDF5_USE_FOLDERS)
|
||||
option (HDF5_NO_PACKAGES "CPACK - Disable packaging" OFF)
|
||||
mark_as_advanced (HDF5_NO_PACKAGES)
|
||||
option (ALLOW_UNSUPPORTED "Allow unsupported combinations of configure options" OFF)
|
||||
mark_as_advanced (ALLOW_UNSUPPORTED)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set the core names of all the libraries
|
||||
@@ -120,18 +141,30 @@ set (HDF5_HL_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_C_LIB_
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set the target names of all the libraries
|
||||
#-----------------------------------------------------------------------------
|
||||
set (HDF5_LIB_TARGET ${HDF5_LIB_CORENAME})
|
||||
set (HDF5_TEST_LIB_TARGET ${HDF5_TEST_LIB_CORENAME})
|
||||
set (HDF5_CPP_LIB_TARGET ${HDF5_CPP_LIB_CORENAME})
|
||||
set (HDF5_HL_LIB_TARGET ${HDF5_HL_LIB_CORENAME})
|
||||
set (HDF5_HL_CPP_LIB_TARGET ${HDF5_HL_CPP_LIB_CORENAME})
|
||||
set (HDF5_TOOLS_LIB_TARGET ${HDF5_TOOLS_LIB_CORENAME})
|
||||
set (HDF5_F90_LIB_TARGET ${HDF5_F90_LIB_CORENAME})
|
||||
set (HDF5_F90_C_LIB_TARGET ${HDF5_F90_C_LIB_CORENAME})
|
||||
set (HDF5_F90_TEST_LIB_TARGET ${HDF5_F90_TEST_LIB_CORENAME})
|
||||
set (HDF5_F90_C_TEST_LIB_TARGET ${HDF5_F90_C_TEST_LIB_CORENAME})
|
||||
set (HDF5_HL_F90_LIB_TARGET ${HDF5_HL_F90_LIB_CORENAME})
|
||||
set (HDF5_HL_F90_C_LIB_TARGET ${HDF5_HL_F90_C_LIB_CORENAME})
|
||||
set (HDF5_LIB_TARGET "${HDF5_LIB_CORENAME}-static")
|
||||
set (HDF5_TEST_LIB_TARGET "${HDF5_TEST_LIB_CORENAME}-static")
|
||||
set (HDF5_CPP_LIB_TARGET "${HDF5_CPP_LIB_CORENAME}-static")
|
||||
set (HDF5_HL_LIB_TARGET "${HDF5_HL_LIB_CORENAME}-static")
|
||||
set (HDF5_HL_CPP_LIB_TARGET "${HDF5_HL_CPP_LIB_CORENAME}-static")
|
||||
set (HDF5_TOOLS_LIB_TARGET "${HDF5_TOOLS_LIB_CORENAME}-static")
|
||||
set (HDF5_F90_LIB_TARGET "${HDF5_F90_LIB_CORENAME}-static")
|
||||
set (HDF5_F90_C_LIB_TARGET "${HDF5_F90_C_LIB_CORENAME}-static")
|
||||
set (HDF5_F90_TEST_LIB_TARGET "${HDF5_F90_TEST_LIB_CORENAME}-static")
|
||||
set (HDF5_F90_C_TEST_LIB_TARGET "${HDF5_F90_C_TEST_LIB_CORENAME}-static")
|
||||
set (HDF5_HL_F90_LIB_TARGET "${HDF5_HL_F90_LIB_CORENAME}-static")
|
||||
set (HDF5_HL_F90_C_LIB_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-static")
|
||||
set (HDF5_LIBSH_TARGET "${HDF5_LIB_CORENAME}-shared")
|
||||
set (HDF5_TEST_LIBSH_TARGET "${HDF5_TEST_LIB_CORENAME}-shared")
|
||||
set (HDF5_CPP_LIBSH_TARGET "${HDF5_CPP_LIB_CORENAME}-shared")
|
||||
set (HDF5_HL_LIBSH_TARGET "${HDF5_HL_LIB_CORENAME}-shared")
|
||||
set (HDF5_HL_CPP_LIBSH_TARGET "${HDF5_HL_CPP_LIB_CORENAME}-shared")
|
||||
set (HDF5_TOOLS_LIBSH_TARGET "${HDF5_TOOLS_LIB_CORENAME}-shared")
|
||||
set (HDF5_F90_LIBSH_TARGET "${HDF5_F90_LIB_CORENAME}-shared")
|
||||
set (HDF5_F90_C_LIBSH_TARGET "${HDF5_F90_C_LIB_CORENAME}-shared")
|
||||
set (HDF5_F90_TEST_LIBSH_TARGET "${HDF5_F90_TEST_LIB_CORENAME}-shared")
|
||||
set (HDF5_F90_C_TEST_LIBSH_TARGET "${HDF5_F90_C_TEST_LIB_CORENAME}-shared")
|
||||
set (HDF5_HL_F90_LIBSH_TARGET "${HDF5_HL_F90_LIB_CORENAME}-shared")
|
||||
set (HDF5_HL_F90_C_LIBSH_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-shared")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Define some CMake variables for use later in the project
|
||||
@@ -152,13 +185,25 @@ if (NOT HDF5_INSTALL_BIN_DIR)
|
||||
set (HDF5_INSTALL_BIN_DIR bin)
|
||||
endif (NOT HDF5_INSTALL_BIN_DIR)
|
||||
if (NOT HDF5_INSTALL_LIB_DIR)
|
||||
if (APPLE)
|
||||
set (HDF5_INSTALL_FMWK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
|
||||
endif (APPLE)
|
||||
set (HDF5_INSTALL_LIB_DIR lib)
|
||||
endif (NOT HDF5_INSTALL_LIB_DIR)
|
||||
if (NOT HDF5_INSTALL_INCLUDE_DIR)
|
||||
set (HDF5_INSTALL_INCLUDE_DIR include)
|
||||
endif (NOT HDF5_INSTALL_INCLUDE_DIR)
|
||||
option (HDF5_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE)
|
||||
if (NOT HDF5_INSTALL_DATA_DIR)
|
||||
if (NOT WIN32)
|
||||
if (APPLE)
|
||||
if (HDF5_BUILD_FRAMEWORKS)
|
||||
set (HDF5_INSTALL_EXTRA_DIR ../SharedSupport)
|
||||
else (HDF5_BUILD_FRAMEWORKS)
|
||||
set (HDF5_INSTALL_EXTRA_DIR share)
|
||||
endif (HDF5_BUILD_FRAMEWORKS)
|
||||
set (HDF5_INSTALL_FWRK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
|
||||
endif (APPLE)
|
||||
set (HDF5_INSTALL_DATA_DIR share)
|
||||
set (HDF5_INSTALL_CMAKE_DIR share/cmake)
|
||||
else (NOT WIN32)
|
||||
@@ -167,6 +212,10 @@ if (NOT HDF5_INSTALL_DATA_DIR)
|
||||
endif (NOT WIN32)
|
||||
endif (NOT HDF5_INSTALL_DATA_DIR)
|
||||
|
||||
if(DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}")
|
||||
set (CMAKE_PREFIX_PATH ${ADDITIONAL_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH})
|
||||
endif(DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# parse the full version number from H5public.h and include in H5_VERS_INFO
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -246,7 +295,7 @@ endif (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Targets built within this project are exported at Install time for use
|
||||
# by other projects using FindHDF5.
|
||||
# by other projects using FindHDF5.
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT HDF5_EXPORTED_TARGETS)
|
||||
set (HDF5_EXPORTED_TARGETS "hdf5-targets")
|
||||
@@ -270,21 +319,23 @@ include (${HDF_RESOURCES_DIR}/ConfigureChecks.cmake)
|
||||
set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to Build Shared/Static libs, default is static
|
||||
# Mac OS X Options
|
||||
#-----------------------------------------------------------------------------
|
||||
option (BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
|
||||
set (LIB_TYPE STATIC)
|
||||
if (HDF5_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS)
|
||||
set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries")
|
||||
endif (HDF5_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to Build Shared and Static libs, default is static
|
||||
#-----------------------------------------------------------------------------
|
||||
option (BUILD_SHARED_LIBS "Build Shared Libraries" ON)
|
||||
set (H5_ENABLE_SHARED_LIB NO)
|
||||
set (H5_ENABLE_STATIC_LIB NO)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set (LIB_TYPE SHARED)
|
||||
set (H5_BUILT_AS_DYNAMIC_LIB 1)
|
||||
set (H5_ENABLE_SHARED_LIB YES)
|
||||
else (BUILD_SHARED_LIBS)
|
||||
set (H5_BUILT_AS_STATIC_LIB 1)
|
||||
set (H5_ENABLE_STATIC_LIB YES)
|
||||
set (CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
set (LINK_SHARED_LIBS ${LINK_LIBS})
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
set (H5_ENABLE_STATIC_LIB YES)
|
||||
set (CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to Build Static executables
|
||||
@@ -304,7 +355,7 @@ option (HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" O
|
||||
if (HDF5_ENABLE_COVERAGE)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
|
||||
set (LDFLAGS "${LDFLAGS} -fprofile-arcs -ftest-coverage")
|
||||
set (LDFLAGS "${LDFLAGS} -fprofile-arcs -ftest-coverage")
|
||||
endif (HDF5_ENABLE_COVERAGE)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -313,7 +364,7 @@ endif (HDF5_ENABLE_COVERAGE)
|
||||
# option (HDF5_ENABLE_USING_DMALLOC "Indicate that dmalloc is used" OFF)
|
||||
# if (HDF5_ENABLE_USING_DMALLOC)
|
||||
# find_package (DMALLOC)
|
||||
# set (H5_HAVE_DMALLOC DMALLOC_FOUND)
|
||||
# set (H5_HAVE_DMALLOC DMALLOC_FOUND)
|
||||
# endif (HDF5_ENABLE_USING_DMALLOC)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -321,17 +372,25 @@ endif (HDF5_ENABLE_COVERAGE)
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF)
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
set (H5_USING_MEMCHECKER 1)
|
||||
set (H5_USING_MEMCHECKER 1)
|
||||
endif (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to indicate internal memory allocation sanity checks are enabled
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_MEMORY_ALLOC_SANITY_CHECK "Indicate that internal memory allocation sanity checks are enabled" OFF)
|
||||
if (HDF5_MEMORY_ALLOC_SANITY_CHECK)
|
||||
set (H5_MEMORY_ALLOC_SANITY_CHECK 1)
|
||||
endif (HDF5_MEMORY_ALLOC_SANITY_CHECK)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to use deprecated public API symbols
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_ENABLE_DEPRECATED_SYMBOLS "Enable deprecated public API symbols" ON)
|
||||
if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
|
||||
set (H5_NO_DEPRECATED_SYMBOLS 0)
|
||||
set (H5_NO_DEPRECATED_SYMBOLS 0)
|
||||
else (HDF5_ENABLE_DEPRECATED_SYMBOLS)
|
||||
set (H5_NO_DEPRECATED_SYMBOLS 1)
|
||||
set (H5_NO_DEPRECATED_SYMBOLS 1)
|
||||
endif (HDF5_ENABLE_DEPRECATED_SYMBOLS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -369,10 +428,11 @@ endif (MAKE_SYSTEM)
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add some definitions for Debug Builds
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_ENABLE_TRACE "Enable API tracing capability" OFF)
|
||||
mark_as_advanced (HDF5_ENABLE_TRACE)
|
||||
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
add_definitions (-DDEBUG)
|
||||
# Enable tracing of the API
|
||||
option (HDF5_ENABLE_TRACE "Enable API tracing capability" ON)
|
||||
if (HDF5_ENABLE_TRACE)
|
||||
add_definitions (-DH5_DEBUG_API )
|
||||
endif (HDF5_ENABLE_TRACE)
|
||||
@@ -381,37 +441,14 @@ if (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
if (HDF5_ENABLE_INSTRUMENT)
|
||||
set (H5_HAVE_INSTRUMENTED_LIBRARY 1)
|
||||
endif (HDF5_ENABLE_INSTRUMENT)
|
||||
mark_as_advanced (HDF5_Enable_Instrument)
|
||||
#-- NMake Makefiles will overwhelm the console with warnings if -Wall is used.
|
||||
if (NOT WIN32)
|
||||
add_definitions (-Wall)
|
||||
endif (NOT WIN32)
|
||||
mark_as_advanced (HDF5_ENABLE_INSTRUMENT)
|
||||
else (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
add_definitions (-DNDEBUG)
|
||||
option (HDF5_ENABLE_TRACE "Enable API tracing capability" OFF)
|
||||
if (HDF5_ENABLE_TRACE)
|
||||
add_definitions (-DH5_DEBUG_API )
|
||||
endif (HDF5_ENABLE_TRACE)
|
||||
endif (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Compiler specific flags : Shouldn't there be compiler tests for these
|
||||
#-----------------------------------------------------------------------------
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -finline-functions -fno-common")
|
||||
else (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common")
|
||||
endif (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
endif (CMAKE_COMPILER_IS_GNUCC)
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -finline-functions -fno-common")
|
||||
else (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common")
|
||||
endif (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
endif (CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to embed library info into executables
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -420,210 +457,7 @@ if (HDF5_ENABLE_EMBEDDED_LIBINFO)
|
||||
set (H5_HAVE_EMBEDDED_LIBINFO 1)
|
||||
endif (HDF5_ENABLE_EMBEDDED_LIBINFO)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to allow the user to disable compiler warnings
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF)
|
||||
if (HDF5_DISABLE_COMPILER_WARNINGS)
|
||||
# MSVC uses /w to suppress warnings. It also complains if another
|
||||
# warning level is given, so remove it.
|
||||
if (MSVC)
|
||||
set (HDF5_WARNINGS_BLOCKED 1)
|
||||
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /w")
|
||||
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /w")
|
||||
endif (MSVC)
|
||||
if (WIN32)
|
||||
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
|
||||
endif (WIN32)
|
||||
# Borland uses -w- to suppress warnings.
|
||||
if (BORLAND)
|
||||
set (HDF5_WARNINGS_BLOCKED 1)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
|
||||
endif (BORLAND)
|
||||
|
||||
# Most compilers use -w to suppress warnings.
|
||||
if (NOT HDF5_WARNINGS_BLOCKED)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
|
||||
endif (NOT HDF5_WARNINGS_BLOCKED)
|
||||
endif (HDF5_DISABLE_COMPILER_WARNINGS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# CDash is configured to only allow 3000 warnings, so
|
||||
# break into groups (from the config/gnu-flags file)
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT MSVC)
|
||||
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline")
|
||||
else (NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -erroff=%none -DBSD_COMP")
|
||||
endif (NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
||||
# Append warning flags
|
||||
# Don't use the '-Wtraditional' flag, we're way past having K&R C code
|
||||
# set (H5_CFLAGS "${H5_CFLAGS} -Wtraditional")
|
||||
# Don't use the '-Wtraditional-conversion' flag, there's too many warnings
|
||||
# from GCC's assert macro
|
||||
# set (H5_CFLAGS "${H5_CFLAGS} -Wtraditional-conversion")
|
||||
|
||||
# Append warning flags from gcc-3* case
|
||||
# (don't use -Wpadded flag for normal builds, many of the warnings its
|
||||
# issuing can't be fixed and they are making it hard to detect other,
|
||||
# more important warnings)
|
||||
#set (H5_CFLAGS "${H5_CFLAGS} -Wfloat-equal -Wmissing-format-attribute -Wpadded")
|
||||
set (H5_CFLAGS1 "${H5_CFLAGS1} -Wfloat-equal -Wmissing-format-attribute")
|
||||
|
||||
# Append warning flags from gcc-3.2* case
|
||||
set (H5_CFLAGS1 "${H5_CFLAGS1} -Wmissing-noreturn -Wpacked -Wdisabled-optimization")
|
||||
|
||||
# Enable more format checking flags, beyond the basic -Wformat included
|
||||
# in -Wall
|
||||
set (H5_CFLAGS1 "${H5_CFLAGS1} -Wformat=2")
|
||||
|
||||
# The "unreachable code" warning appears to be reliable now...
|
||||
# (this warning was removed in gcc 4.5+)
|
||||
#set (H5_CFLAGS "${H5_CFLAGS} -Wunreachable-code")
|
||||
|
||||
# Append warning flags from gcc-3.3* case
|
||||
set (H5_CFLAGS1 "${H5_CFLAGS1} -Wendif-labels")
|
||||
|
||||
# Append warning flags from gcc-3.4* case
|
||||
set (H5_CFLAGS2 "${H5_CFLAGS2} -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch")
|
||||
|
||||
# Append more extra warning flags that only gcc4.0+ know about
|
||||
set (H5_CFLAGS2 "${H5_CFLAGS2} -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros")
|
||||
|
||||
# Append more extra warning flags that only gcc 4.1+ know about
|
||||
set (H5_CFLAGS3 "${H5_CFLAGS3} -Wunsafe-loop-optimizations -Wc++-compat")
|
||||
|
||||
# Append more extra warning flags that only gcc 4.2+ know about
|
||||
set (H5_CFLAGS3 "${H5_CFLAGS3} -Wstrict-overflow")
|
||||
|
||||
# Append more extra warning flags that only gcc 4.3+ know about
|
||||
#
|
||||
# Technically, variable-length arrays are part of the C99 standard, but
|
||||
# we should approach them a bit cautiously... -QAK
|
||||
set (H5_CFLAGS3 "${H5_CFLAGS3} -Wlogical-op -Wlarger-than=2048 -Wvla")
|
||||
|
||||
# Append more extra warning flags that only gcc 4.4+ know about
|
||||
set (H5_CFLAGS4 "${H5_CFLAGS4} -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat")
|
||||
|
||||
# Append more extra warning flags that only gcc 4.5+ know about
|
||||
set (H5_CFLAGS4 "${H5_CFLAGS4} -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants")
|
||||
|
||||
# Append more extra warning flags that only gcc 4.6+ know about
|
||||
set (H5_CFLAGS5 "${H5_CFLAGS5} -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines")
|
||||
|
||||
# Append more extra warning flags that only gcc 4.7+ know about
|
||||
set (H5_CFLAGS5 "${H5_CFLAGS5} -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn")
|
||||
endif (NOT MSVC)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to allow the user to enable all warnings
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_ENABLE_ALL_WARNINGS "Enable all warnings" OFF)
|
||||
if (HDF5_ENABLE_ALL_WARNINGS)
|
||||
if (MSVC)
|
||||
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wall")
|
||||
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall")
|
||||
else (MSVC)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic ${H5_CFLAGS1} ${H5_CFLAGS2} ${H5_CFLAGS3} ${H5_CFLAGS4}")
|
||||
endif (MSVC)
|
||||
endif (HDF5_ENABLE_ALL_WARNINGS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to allow the user to enable warnings by groups
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_ENABLE_GROUPZERO_WARNINGS "Enable group zero warnings" OFF)
|
||||
if (HDF5_ENABLE_GROUPZERO_WARNINGS)
|
||||
if (MSVC)
|
||||
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W1")
|
||||
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W1")
|
||||
else (MSVC)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic")
|
||||
endif (MSVC)
|
||||
endif (HDF5_ENABLE_GROUPZERO_WARNINGS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to allow the user to enable warnings by groups
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_ENABLE_GROUPONE_WARNINGS "Enable group one warnings" OFF)
|
||||
if (HDF5_ENABLE_GROUPONE_WARNINGS)
|
||||
if (MSVC)
|
||||
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W2")
|
||||
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W2")
|
||||
else (MSVC)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS1}")
|
||||
endif (MSVC)
|
||||
endif (HDF5_ENABLE_GROUPONE_WARNINGS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to allow the user to enable warnings by groups
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_ENABLE_GROUPTWO_WARNINGS "Enable group two warnings" OFF)
|
||||
if (HDF5_ENABLE_GROUPTWO_WARNINGS)
|
||||
if (MSVC)
|
||||
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
|
||||
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
|
||||
else (MSVC)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS2}")
|
||||
endif (MSVC)
|
||||
endif (HDF5_ENABLE_GROUPTWO_WARNINGS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to allow the user to enable warnings by groups
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_ENABLE_GROUPTHREE_WARNINGS "Enable group three warnings" OFF)
|
||||
if (HDF5_ENABLE_GROUPTHREE_WARNINGS)
|
||||
if (MSVC)
|
||||
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
|
||||
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
||||
else (MSVC)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS3}")
|
||||
endif (MSVC)
|
||||
endif (HDF5_ENABLE_GROUPTHREE_WARNINGS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to allow the user to enable warnings by groups
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_ENABLE_GROUPFOUR_WARNINGS "Enable group four warnings" OFF)
|
||||
if (HDF5_ENABLE_GROUPFOUR_WARNINGS)
|
||||
if (NOT MSVC)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS4}")
|
||||
endif (NOT MSVC)
|
||||
endif (HDF5_ENABLE_GROUPFOUR_WARNINGS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to allow the user to enable warnings by groups
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_ENABLE_GROUPFIVE_WARNINGS "Enable group five warnings" OFF)
|
||||
if (HDF5_ENABLE_GROUPFIVE_WARNINGS)
|
||||
if (NOT MSVC)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS5}")
|
||||
endif (NOT MSVC)
|
||||
endif (HDF5_ENABLE_GROUPFIVE_WARNINGS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# This is in here to help some of the GCC based IDES like Eclipse
|
||||
# and code blocks parse the compiler errors and warnings better.
|
||||
#-----------------------------------------------------------------------------
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
|
||||
endif (CMAKE_COMPILER_IS_GNUCC)
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
|
||||
endif (CMAKE_COMPILER_IS_GNUCXX)
|
||||
include (${HDF_RESOURCES_DIR}/HDFCompilerFlags.cmake)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# All libs/tests/examples need the main include directories
|
||||
@@ -654,6 +488,7 @@ endif (HDF5_ENABLE_PARALLEL)
|
||||
# Parallel IO usage requires MPI to be Linked and Included
|
||||
if (H5_HAVE_PARALLEL)
|
||||
set (LINK_LIBS ${LINK_LIBS} ${MPI_C_LIBRARIES})
|
||||
set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${MPI_C_LIBRARIES})
|
||||
if (MPI_C_LINK_FLAGS)
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${MPI_C_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
|
||||
endif (MPI_C_LINK_FLAGS)
|
||||
@@ -685,6 +520,9 @@ endif (HDF5_USE_18_API_DEFAULT)
|
||||
#-----------------------------------------------------------------------------
|
||||
include (UserMacros.cmake)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Include filter (zlib, szip, etc.) macros
|
||||
#-----------------------------------------------------------------------------
|
||||
include (CMakeFilters.cmake)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -697,7 +535,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
if (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
|
||||
PACKAGE_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
|
||||
endif (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
|
||||
|
||||
|
||||
if (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
|
||||
PACKAGE_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
|
||||
endif (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
|
||||
@@ -705,41 +543,58 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to use threadsafe
|
||||
# Note: Currently CMake only allows configuring of threadsafe on
|
||||
# non-Cygwin WINDOWS.
|
||||
#-----------------------------------------------------------------------------
|
||||
if (WIN32)
|
||||
option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF)
|
||||
if (HDF5_ENABLE_THREADSAFE)
|
||||
# check for unsupported options
|
||||
if (H5_BUILT_AS_STATIC_LIB)
|
||||
message (FATAL_ERROR " **** thread-safety option not supported with static library **** ")
|
||||
endif (H5_BUILT_AS_STATIC_LIB)
|
||||
if (HDF5_ENABLE_PARALLEL)
|
||||
option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF)
|
||||
if (HDF5_ENABLE_THREADSAFE)
|
||||
# check for unsupported options
|
||||
message (STATUS " **** thread-safety option not supported with static library **** ")
|
||||
message (STATUS " **** thread-safety option will not be used building static library **** ")
|
||||
if (HDF5_ENABLE_PARALLEL)
|
||||
if (NOT ALLOW_UNSUPPORTED)
|
||||
message (FATAL_ERROR " **** parallel and thread-safety options are not supported **** ")
|
||||
endif (HDF5_ENABLE_PARALLEL)
|
||||
if (HDF5_BUILD_FORTRAN)
|
||||
else (NOT ALLOW_UNSUPPORTED)
|
||||
message (STATUS " **** Allowing unsupported parallel and thread-safety options **** ")
|
||||
endif (NOT ALLOW_UNSUPPORTED)
|
||||
endif (HDF5_ENABLE_PARALLEL)
|
||||
if (HDF5_BUILD_FORTRAN)
|
||||
if (NOT ALLOW_UNSUPPORTED)
|
||||
message (FATAL_ERROR " **** Fortran and thread-safety options are not supported **** ")
|
||||
endif (HDF5_BUILD_FORTRAN)
|
||||
if (HDF5_BUILD_CPP_LIB)
|
||||
else (NOT ALLOW_UNSUPPORTED)
|
||||
message (STATUS " **** Allowing unsupported Fortran and thread-safety options **** ")
|
||||
endif (NOT ALLOW_UNSUPPORTED)
|
||||
endif (HDF5_BUILD_FORTRAN)
|
||||
if (HDF5_BUILD_CPP_LIB)
|
||||
if (NOT ALLOW_UNSUPPORTED)
|
||||
message (FATAL_ERROR " **** C++ and thread-safety options are not supported **** ")
|
||||
endif (HDF5_BUILD_CPP_LIB)
|
||||
set (H5_HAVE_THREADSAFE 1)
|
||||
if (H5_HAVE_IOEO)
|
||||
message (STATUS " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ")
|
||||
set (H5_HAVE_WIN_THREADS 1)
|
||||
else (H5_HAVE_IOEO)
|
||||
if (NOT H5_HAVE_PTHREAD_H)
|
||||
set (H5_HAVE_THREADSAFE 0)
|
||||
message (FATAL_ERROR " **** thread-safe option requires Win32 threads or Pthreads **** ")
|
||||
endif (NOT H5_HAVE_PTHREAD_H)
|
||||
endif (H5_HAVE_IOEO)
|
||||
endif (HDF5_ENABLE_THREADSAFE)
|
||||
endif (WIN32)
|
||||
else (NOT ALLOW_UNSUPPORTED)
|
||||
message (STATUS " **** Allowing unsupported C++ and thread-safety options **** ")
|
||||
endif (NOT ALLOW_UNSUPPORTED)
|
||||
endif (HDF5_BUILD_CPP_LIB)
|
||||
if (HDF5_BUILD_HL_LIB)
|
||||
if (NOT ALLOW_UNSUPPORTED)
|
||||
message (FATAL_ERROR " **** HL and thread-safety options are not supported **** ")
|
||||
else (NOT ALLOW_UNSUPPORTED)
|
||||
message (STATUS " **** Allowing unsupported HL and thread-safety options **** ")
|
||||
endif (NOT ALLOW_UNSUPPORTED)
|
||||
endif (HDF5_BUILD_HL_LIB)
|
||||
if (H5_HAVE_IOEO)
|
||||
message (STATUS " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ")
|
||||
set (H5_HAVE_WIN_THREADS 1)
|
||||
else (H5_HAVE_IOEO)
|
||||
if (NOT H5_HAVE_PTHREAD_H)
|
||||
message (FATAL_ERROR " **** thread-safe option requires Win32 threads or Pthreads **** ")
|
||||
endif (NOT H5_HAVE_PTHREAD_H)
|
||||
endif (H5_HAVE_IOEO)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads)
|
||||
if (NOT Threads_FOUND)
|
||||
message (STATUS " **** thread-safe package not found - threads still might work **** ")
|
||||
endif (NOT Threads_FOUND)
|
||||
endif (HDF5_ENABLE_THREADSAFE)
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# wrapper script variables
|
||||
#
|
||||
#
|
||||
#set (CFLAGS "${C_DEFINES}")
|
||||
#set (CXXFLAGS "${CXX_DEFINES}")
|
||||
|
||||
@@ -751,23 +606,44 @@ add_subdirectory (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src)
|
||||
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
|
||||
ADD_DEPENDENCIES (${HDF5_LIB_TARGET} ZLIB)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_dependencies (${HDF5_LIBSH_TARGET} ZLIB)
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
endif (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
|
||||
if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
|
||||
ADD_DEPENDENCIES (${HDF5_LIB_TARGET} SZIP)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_dependencies (${HDF5_LIBSH_TARGET} SZIP)
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
endif (SZIP_FOUND AND SZIP_USE_EXTERNAL)
|
||||
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Dashboard and Testing Settings
|
||||
#-----------------------------------------------------------------------------
|
||||
option (BUILD_TESTING "Build HDF5 Unit Testing" OFF)
|
||||
option (BUILD_TESTING "Build HDF5 Unit Testing" ON)
|
||||
if (BUILD_TESTING)
|
||||
set (DART_TESTING_TIMEOUT 1200
|
||||
CACHE INTEGER
|
||||
"Timeout in seconds for each test (default 1200=20minutes)"
|
||||
)
|
||||
|
||||
option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF)
|
||||
mark_as_advanced (HDF5_TEST_VFD)
|
||||
if (HDF5_TEST_VFD)
|
||||
option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON)
|
||||
mark_as_advanced (HDF5_TEST_FHEAP_VFD)
|
||||
endif (HDF5_TEST_VFD)
|
||||
|
||||
option (HDF_TEST_EXPRESS "Control testing framework (0-3)" "0")
|
||||
mark_as_advanced (HDF_TEST_EXPRESS)
|
||||
|
||||
enable_testing ()
|
||||
include (CTest)
|
||||
|
||||
include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
|
||||
configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
|
||||
|
||||
if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test")
|
||||
add_subdirectory (${HDF5_SOURCE_DIR}/tools/lib ${PROJECT_BINARY_DIR}/tools/lib)
|
||||
@@ -779,18 +655,39 @@ if (BUILD_TESTING)
|
||||
endif (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar")
|
||||
endif (H5_HAVE_PARALLEL)
|
||||
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
|
||||
option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF)
|
||||
mark_as_advanced (HDF5_TEST_VFD)
|
||||
if (HDF5_TEST_VFD)
|
||||
option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON)
|
||||
mark_as_advanced (HDF5_TEST_FHEAP_VFD)
|
||||
endif (HDF5_TEST_VFD)
|
||||
|
||||
include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
|
||||
configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
|
||||
endif (BUILD_TESTING)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to build HDF5 Tools
|
||||
#-----------------------------------------------------------------------------
|
||||
if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools")
|
||||
option (HDF5_BUILD_TOOLS "Build HDF5 Tools" ON)
|
||||
if (HDF5_BUILD_TOOLS)
|
||||
add_subdirectory (${HDF5_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools)
|
||||
endif (HDF5_BUILD_TOOLS)
|
||||
endif (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to build examples
|
||||
#-----------------------------------------------------------------------------
|
||||
if (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples")
|
||||
option (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" ON)
|
||||
if (HDF5_BUILD_EXAMPLES)
|
||||
add_subdirectory (${HDF5_SOURCE_DIR}/examples ${PROJECT_BINARY_DIR}/examples)
|
||||
endif (HDF5_BUILD_EXAMPLES)
|
||||
endif (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to build High Level API's
|
||||
#-----------------------------------------------------------------------------
|
||||
if (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
|
||||
option (HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" ON)
|
||||
if (HDF5_BUILD_HL_LIB)
|
||||
set (H5_INCLUDE_HL 1)
|
||||
add_subdirectory (${HDF5_SOURCE_DIR}/hl ${PROJECT_BINARY_DIR}/hl)
|
||||
endif (HDF5_BUILD_HL_LIB)
|
||||
endif (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to build Fortran bindings/tests/examples
|
||||
# Make sure this appears before the CONFIGURE_FILE step
|
||||
@@ -801,12 +698,29 @@ set (H5_FC_FUNC "H5_FC_FUNC(name,NAME) name ## _")
|
||||
set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _")
|
||||
if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
|
||||
option (HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF)
|
||||
option (SKIP_HDF5_FORTRAN_SHARED "Do not build the fortran shared libraries" OFF)
|
||||
if (HDF5_BUILD_FORTRAN)
|
||||
if (BUILD_SHARED_LIBS AND APPLE)
|
||||
message (FATAL_ERROR " **** Shared FORTRAN libraries are unsupported **** ")
|
||||
if (NOT ALLOW_UNSUPPORTED)
|
||||
message (STATUS " **** Shared FORTRAN libraries are unsupported **** ")
|
||||
set (SKIP_HDF5_FORTRAN_SHARED ON)
|
||||
else (NOT ALLOW_UNSUPPORTED)
|
||||
message (STATUS " **** Allowing unsupported Fortran shared libraries **** ")
|
||||
endif (NOT ALLOW_UNSUPPORTED)
|
||||
endif (BUILD_SHARED_LIBS AND APPLE)
|
||||
option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON)
|
||||
|
||||
include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake)
|
||||
|
||||
message (STATUS "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}")
|
||||
# Building with PGI requires CMake 3.3 or greater because previous versions
|
||||
# of CMake add the wrong compiler flag for the PGI Fortran compiler.
|
||||
if ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "PGI" AND "${CMAKE_VERSION}" VERSION_LESS "3.3")
|
||||
message (FATAL_ERROR " **** PGI FORTRAN REQUIRES CMAKE VERSION 3.3 OR GREATER **** ")
|
||||
endif ()
|
||||
|
||||
include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake)
|
||||
|
||||
if (HDF5_ENABLE_F2003)
|
||||
if (NOT FORTRAN_HAVE_ISO_C_BINDING)
|
||||
set (HDF5_ENABLE_F2003 OFF)
|
||||
@@ -815,7 +729,7 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# wrapper script variables
|
||||
#
|
||||
#
|
||||
# set (FCFLAGS "${Fortran_DEFINES}")
|
||||
|
||||
add_subdirectory (${HDF5_SOURCE_DIR}/fortran ${PROJECT_BINARY_DIR}/fortran)
|
||||
@@ -828,56 +742,35 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
|
||||
endif (HDF5_BUILD_FORTRAN)
|
||||
endif (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to build examples
|
||||
#-----------------------------------------------------------------------------
|
||||
if (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples")
|
||||
option (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" OFF)
|
||||
if (HDF5_BUILD_EXAMPLES)
|
||||
add_subdirectory (${HDF5_SOURCE_DIR}/examples ${PROJECT_BINARY_DIR}/examples)
|
||||
endif (HDF5_BUILD_EXAMPLES)
|
||||
endif (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to build HDF5 C++ Library
|
||||
#-----------------------------------------------------------------------------
|
||||
if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
|
||||
option (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF)
|
||||
option (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" ON)
|
||||
if (HDF5_BUILD_CPP_LIB)
|
||||
# check for unsupported options
|
||||
if (HDF5_ENABLE_PARALLEL)
|
||||
message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive **** ")
|
||||
if (NOT ALLOW_UNSUPPORTED)
|
||||
message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive **** ")
|
||||
else (NOT ALLOW_UNSUPPORTED)
|
||||
message (STATUS " **** Allowing unsupported Parallel and C++ options **** ")
|
||||
endif (NOT ALLOW_UNSUPPORTED)
|
||||
endif (HDF5_ENABLE_PARALLEL)
|
||||
if (CMAKE_NO_STD_NAMESPACE)
|
||||
set (H5_NO_STD 1)
|
||||
endif (CMAKE_NO_STD_NAMESPACE)
|
||||
add_subdirectory (${HDF5_SOURCE_DIR}/c++ ${PROJECT_BINARY_DIR}/c++)
|
||||
if (HDF5_BUILD_HL_LIB)
|
||||
if (EXISTS "${HDF5_SOURCE_DIR}/hl/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/c++")
|
||||
#-- Build the High Level Fortran source codes
|
||||
add_subdirectory (${HDF5_SOURCE_DIR}/hl/c++ ${PROJECT_BINARY_DIR}/hl/c++)
|
||||
endif (EXISTS "${HDF5_SOURCE_DIR}/hl/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/c++")
|
||||
endif (HDF5_BUILD_HL_LIB)
|
||||
endif (HDF5_BUILD_CPP_LIB)
|
||||
endif (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to build HDF5 Tools
|
||||
#-----------------------------------------------------------------------------
|
||||
if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools")
|
||||
option (HDF5_BUILD_TOOLS "Build HDF5 Tools" OFF)
|
||||
if (HDF5_BUILD_TOOLS)
|
||||
add_subdirectory (${HDF5_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools)
|
||||
endif (HDF5_BUILD_TOOLS)
|
||||
endif (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to build High Level API's
|
||||
#-----------------------------------------------------------------------------
|
||||
if (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
|
||||
option (HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" OFF)
|
||||
if (HDF5_BUILD_HL_LIB)
|
||||
set (H5_INCLUDE_HL 1)
|
||||
add_subdirectory (${HDF5_SOURCE_DIR}/hl ${PROJECT_BINARY_DIR}/hl)
|
||||
endif (HDF5_BUILD_HL_LIB)
|
||||
endif (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Check if Fortran's default real is double precision. If it is and HL is
|
||||
# Check if Fortran's default real is double precision. If it is and HL is
|
||||
# being built then configure should fail due to bug HDFFV-889.
|
||||
#-----------------------------------------------------------------------------
|
||||
if (HDF5_BUILD_FORTRAN AND HDF5_BUILD_HL_LIB )
|
||||
|
||||
2
COPYING
2
COPYING
@@ -4,7 +4,7 @@ HDF5 (Hierarchical Data Format 5) Software Library and Utilities
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
HDF5 (Hierarchical Data Format 5) Software Library and Utilities
|
||||
Copyright 2006-2014 by The HDF Group.
|
||||
Copyright 2006-2015 by The HDF Group.
|
||||
|
||||
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
|
||||
Copyright 1998-2006 by the Board of Trustees of the University of Illinois.
|
||||
|
||||
@@ -9,10 +9,10 @@ set (CTEST_NIGHTLY_START_TIME "18:00:00 CST")
|
||||
|
||||
set (CTEST_DROP_METHOD "http")
|
||||
if (CDASH_LOCAL)
|
||||
set (CTEST_DROP_SITE "72.36.68.252")
|
||||
set (CTEST_DROP_SITE "10.10.10.82")
|
||||
set (CTEST_DROP_LOCATION "/submit.php?project=HDF5Trunk")
|
||||
else (CDASH_LOCAL)
|
||||
set (CTEST_DROP_SITE "cdash.hdfgroup.uiuc.edu")
|
||||
set (CTEST_DROP_SITE "cdash.hdfgroup.org")
|
||||
set (CTEST_DROP_LOCATION "/submit.php?project=HDF5+Trunk")
|
||||
endif (CDASH_LOCAL)
|
||||
set (CTEST_DROP_SITE_CDASH TRUE)
|
||||
@@ -23,9 +23,9 @@ set (VALGRIND_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=
|
||||
set (CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
|
||||
set (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
|
||||
|
||||
set (CTEST_TEST_TIMEOUT 1200 CACHE STRING
|
||||
"Maximum time allowed before CTest will kill the test.")
|
||||
set (DART_TESTING_TIMEOUT 1200 CACHE STRING
|
||||
set (CTEST_TEST_TIMEOUT 600 CACHE STRING
|
||||
"Maximum time allowed before CTest will kill the test.")
|
||||
set (DART_TESTING_TIMEOUT 600 CACHE STRING
|
||||
"Maximum time allowed before CTest will kill the test." FORCE)
|
||||
|
||||
SET(CTEST_SUBMIT_RETRY_DELAY 20 CACHE STRING
|
||||
|
||||
10
Makefile.am
10
Makefile.am
@@ -87,7 +87,7 @@ CHECK_CLEANFILES+=*-tmp
|
||||
test _test: check
|
||||
|
||||
lib progs check-p check-s:
|
||||
@@SETX@; for d in $(SUBDIRS); do \
|
||||
for d in $(SUBDIRS); do \
|
||||
if test $$d != .; then \
|
||||
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
||||
fi; \
|
||||
@@ -95,7 +95,7 @@ lib progs check-p check-s:
|
||||
|
||||
# Make all, tests, and (un)install
|
||||
tests:
|
||||
@@SETX@; for d in $(SUBDIRS); do \
|
||||
for d in $(SUBDIRS); do \
|
||||
if test $$d != .; then \
|
||||
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
||||
fi; \
|
||||
@@ -103,7 +103,7 @@ tests:
|
||||
|
||||
# Check-clean also recurses into examples directory
|
||||
check-clean:
|
||||
@@SETX@; for d in $(SUBDIRS) examples; do \
|
||||
for d in $(SUBDIRS) examples; do \
|
||||
if test $$d != .; then \
|
||||
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
||||
fi; \
|
||||
@@ -130,7 +130,7 @@ uninstall-all:
|
||||
|
||||
# Install examples in this directory and recursively
|
||||
install-examples uninstall-examples:
|
||||
@@SETX@; for d in examples $(HDF5_INTERFACES) $(HL); do \
|
||||
for d in examples $(HDF5_INTERFACES) $(HL); do \
|
||||
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
||||
done
|
||||
|
||||
@@ -177,7 +177,7 @@ trace:
|
||||
# Run tests with different Virtual File Drivers.
|
||||
# Currently, only invoke check-vfd in the test directory.
|
||||
check-vfd:
|
||||
@@SETX@; for d in src test; do \
|
||||
for d in src test; do \
|
||||
if test $$d != .; then \
|
||||
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
||||
fi; \
|
||||
|
||||
1124
Makefile.in
1124
Makefile.in
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
HDF5 version 1.9.215 currently under development
|
||||
HDF5 version 1.9.234 currently under development
|
||||
Please refer to the release_docs/INSTALL file for installation instructions.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
@@ -8,7 +8,7 @@ specific to this release of the library. Several INSTALL* files can also be
|
||||
found in the release_docs/ directory: INSTALL contains instructions for
|
||||
compiling and installing the library; INSTALL_parallel contains instructions
|
||||
for installing the parallel version of the library; similarly-named files
|
||||
contain instructions for VMS and several environments on MS Windows systems.
|
||||
contain instructions for several environments on MS Windows systems.
|
||||
|
||||
Documentation for this release can be found at the following URL:
|
||||
http://www.hdfgroup.org/HDF5/doc/.
|
||||
|
||||
@@ -19,4 +19,4 @@ endif (BUILD_USER_DEFINED_LIBS)
|
||||
#-----------------------------------------------------------------------------
|
||||
#------------------- E X A M P L E E N D -----------------------------------
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
9774
aclocal.m4
vendored
9774
aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
84
acsite.m4
84
acsite.m4
@@ -53,87 +53,3 @@ esac
|
||||
rm -rf conftest*[]dnl
|
||||
])# _AC_SYS_LARGEFILE_MACRO_VALUE
|
||||
|
||||
dnl -------------------------------------------------------------------------
|
||||
dnl AC_F9X_MODS()
|
||||
dnl
|
||||
dnl Check how F9X handles modules. This macro also checks which
|
||||
dnl command-line option to use to include the module once it's built.
|
||||
dnl
|
||||
AC_DEFUN(AC_F9X_MODS,
|
||||
[AC_MSG_CHECKING(what $FC does with modules)
|
||||
AC_LANG_PUSH(Fortran)
|
||||
|
||||
test -d conftestdir || mkdir conftestdir
|
||||
cd conftestdir
|
||||
rm -rf *
|
||||
|
||||
cat >conftest.$ac_ext <<EOF
|
||||
module module
|
||||
integer foo
|
||||
end module module
|
||||
EOF
|
||||
|
||||
eval $ac_compile
|
||||
modfiles=""
|
||||
F9XMODEXT=""
|
||||
|
||||
for f in conftest.o module.mod MODULE.mod module.M MODULE.M; do
|
||||
if test -f "$f" ; then
|
||||
modfiles="$f"
|
||||
|
||||
case "$f" in
|
||||
*.o) F9XMODEXT="o" ;;
|
||||
*.mod) F9XMODEXT="mod" ;;
|
||||
*.M) F9XMODEXT="M" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
echo $modfiles 6>&1
|
||||
if test "$modfiles" = file.o; then
|
||||
echo $ac_n "checking whether $FC -em is saner""... $ac_c" 1>&6
|
||||
OLD_FCFLAGS=$FCFLAGS
|
||||
FCFLAGS="$FCFLAGS -em"
|
||||
eval $ac_compile
|
||||
modfiles=""
|
||||
for f in file.o module.mod MODULE.mod module.M MODULE.M; do
|
||||
test -f $f && modfiles="$f"
|
||||
done
|
||||
if test "$modfiles" = "file.o"; then
|
||||
FCFLAGS=$OLD_FCFLAGS
|
||||
echo no 6>&1
|
||||
else
|
||||
echo yes 6>&1
|
||||
fi
|
||||
fi
|
||||
cd ..
|
||||
|
||||
AC_MSG_CHECKING(how $FC finds modules)
|
||||
|
||||
for flag in "-I" "-M" "-p"; do
|
||||
cat >conftest.$ac_ext <<EOF
|
||||
program conftest
|
||||
use module
|
||||
end program conftest
|
||||
EOF
|
||||
|
||||
ac_compile='${FC-f90} $FCFLAGS ${flag}conftestdir -c conftest.$ac_ext 1>&AS_MESSAGE_LOG_FD'
|
||||
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
F9XMODFLAG=$flag
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -n "$F9XMODFLAG"; then
|
||||
echo $F9XMODFLAG 1>&6
|
||||
FCFLAGS="$F9XMODFLAG. $FCFLAGS"
|
||||
else
|
||||
echo unknown 1>&6
|
||||
fi
|
||||
AC_SUBST(F9XMODFLAG)
|
||||
AC_SUBST(F9XMODEXT)
|
||||
rm -rf conftest*
|
||||
AC_LANG_POP(Fortran)
|
||||
])
|
||||
|
||||
|
||||
300
autogen.sh
Executable file
300
autogen.sh
Executable file
@@ -0,0 +1,300 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
# Copyright by The HDF Group.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This file is part of HDF5. The full HDF5 copyright notice, including
|
||||
# terms governing use, modification, and redistribution, is contained in
|
||||
# the files COPYING and Copyright.html. COPYING can be found at the root
|
||||
# of the source code distribution tree; Copyright.html can be found at the
|
||||
# root level of an installed copy of the electronic document set and is
|
||||
# linked from the top-level documents page. It can also be found at
|
||||
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access
|
||||
# to either file, you may request a copy from help@hdfgroup.org.
|
||||
#
|
||||
|
||||
# A script to reconfigure autotools for HDF5, and to recreate other
|
||||
# generated files specifc to HDF5.
|
||||
#
|
||||
# IMPORTANT OS X NOTE
|
||||
#
|
||||
# If you are using OS X, you will probably not have the autotools
|
||||
# installed, even if you have the Xcode command-line tools.
|
||||
#
|
||||
# The easiest way to fix this is to install everything via Homebrew:
|
||||
#
|
||||
# http://brew.sh/
|
||||
#
|
||||
# After you install the base packages, install autoconf, automake,
|
||||
# and libtool.
|
||||
#
|
||||
# brew install autoconf
|
||||
# brew install automake
|
||||
# brew install libtool
|
||||
#
|
||||
# This only takes a few minutes. Note that libtool and libtoolize will
|
||||
# be glibtool and glibtoolize so as not to conflict with Apple's non-gnu
|
||||
# tools. This autogen.sh script handles this for you.
|
||||
#
|
||||
# END IMPORTANT OS X NOTE
|
||||
#
|
||||
# If you want to use a particular version of the autotools, the paths
|
||||
# to each tool can be overridden using the following environment
|
||||
# variables:
|
||||
#
|
||||
# HDF5_ACLOCAL
|
||||
# HDF5_AUTOHEADER
|
||||
# HDF5_AUTOMAKE
|
||||
# HDF5_AUTOCONF
|
||||
# HDF5_LIBTOOL
|
||||
# HDF5_M4
|
||||
#
|
||||
# Note that aclocal will attempt to include libtool's share/aclocal
|
||||
# directory.
|
||||
#
|
||||
# This script takes two potential options:
|
||||
#
|
||||
# -p
|
||||
#
|
||||
# When this is selected, the autotools versions are set to the paths
|
||||
# and versions used by The HDF Group to produce the released versions
|
||||
# of the library.
|
||||
#
|
||||
# NOTE: This is probably temporary. Once we update our dev machines
|
||||
# to have recent versions of the autotools this option will probably
|
||||
# be removed.
|
||||
#
|
||||
# -v
|
||||
#
|
||||
# This emits some extra information, mainly tool versions.
|
||||
|
||||
echo
|
||||
echo "**************************"
|
||||
echo "* HDF5 autogen.sh script *"
|
||||
echo "**************************"
|
||||
echo
|
||||
|
||||
# Default is not production
|
||||
production=false
|
||||
|
||||
# Default is not verbose output
|
||||
verbose=false
|
||||
|
||||
optspec=":hpv-"
|
||||
while getopts "$optspec" optchar; do
|
||||
case "${optchar}" in
|
||||
h)
|
||||
echo "usage: $0 [OPTIONS]"
|
||||
echo
|
||||
echo " -h Print this help message."
|
||||
echo
|
||||
echo " -p Used by THG to use hard-codes autotools"
|
||||
echo " paths on THG machines. Not for non-HDF-Group"
|
||||
echo " users!"
|
||||
echo
|
||||
echo " -v Show more verbose output."
|
||||
echo
|
||||
echo " NOTE: Each tool can be set via an environment variable."
|
||||
echo " These are documented inside this autogen.sh script."
|
||||
echo
|
||||
exit 0
|
||||
;;
|
||||
p)
|
||||
echo "Setting THG production mode..."
|
||||
echo
|
||||
production=true
|
||||
;;
|
||||
v)
|
||||
echo "Setting verbosity: high"
|
||||
echo
|
||||
verbose=true
|
||||
;;
|
||||
*)
|
||||
if [ "$OPTERR" != 1 ] || [ "${optspec:0:1}" = ":" ]; then
|
||||
echo "Non-option argument: '-${OPTARG}'" >&2
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$production" = true ] ; then
|
||||
|
||||
# Production mode
|
||||
#
|
||||
# Hard-code canonical HDF Group tool locations.
|
||||
|
||||
# If paths to tools are not specified, assume they are
|
||||
# located in /usr/hdf/bin/AUTOTOOLS and set paths accordingly.
|
||||
if test -z ${HDF5_AUTOCONF}; then
|
||||
HDF5_AUTOCONF=/usr/hdf/bin/AUTOTOOLS/autoconf
|
||||
fi
|
||||
if test -z ${HDF5_AUTOMAKE}; then
|
||||
HDF5_AUTOMAKE=/usr/hdf/bin/AUTOTOOLS/automake
|
||||
fi
|
||||
if test -z ${HDF5_AUTOHEADER}; then
|
||||
HDF5_AUTOHEADER=/usr/hdf/bin/AUTOTOOLS/autoheader
|
||||
fi
|
||||
if test -z ${HDF5_ACLOCAL}; then
|
||||
HDF5_ACLOCAL=/usr/hdf/bin/AUTOTOOLS/aclocal
|
||||
fi
|
||||
if test -z ${HDF5_LIBTOOL}; then
|
||||
HDF5_LIBTOOL=/usr/hdf/bin/AUTOTOOLS/libtool
|
||||
fi
|
||||
if test -z ${HDF5_M4}; then
|
||||
HDF5_M4=/usr/hdf/bin/AUTOTOOLS/m4
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
# Not in production mode
|
||||
#
|
||||
# If paths to autotools are not specified, use whatever the system
|
||||
# has installed as the default. We use 'which <tool>' to
|
||||
# show exactly what's being used.
|
||||
if test -z ${HDF5_AUTOCONF}; then
|
||||
HDF5_AUTOCONF=$(which autoconf)
|
||||
fi
|
||||
if test -z ${HDF5_AUTOMAKE}; then
|
||||
HDF5_AUTOMAKE=$(which automake)
|
||||
fi
|
||||
if test -z ${HDF5_AUTOHEADER}; then
|
||||
HDF5_AUTOHEADER=$(which autoheader)
|
||||
fi
|
||||
if test -z ${HDF5_ACLOCAL}; then
|
||||
HDF5_ACLOCAL=$(which aclocal)
|
||||
fi
|
||||
if test -z ${HDF5_LIBTOOL}; then
|
||||
case "`uname`" in
|
||||
Darwin*)
|
||||
# libtool on OS-X is non-gnu
|
||||
HDF5_LIBTOOL=$(which glibtool)
|
||||
;;
|
||||
*)
|
||||
HDF5_LIBTOOL=$(which libtool)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test -z ${HDF5_M4}; then
|
||||
HDF5_M4=$(which m4)
|
||||
fi
|
||||
|
||||
fi # production
|
||||
|
||||
|
||||
# Make sure that these versions of the autotools are in the path
|
||||
AUTOCONF_DIR=`dirname ${HDF5_AUTOCONF}`
|
||||
LIBTOOL_DIR=`dirname ${HDF5_LIBTOOL}`
|
||||
M4_DIR=`dirname ${HDF5_M4}`
|
||||
PATH=${AUTOCONF_DIR}:${LIBTOOL_DIR}:${M4_DIR}:$PATH
|
||||
|
||||
# Make libtoolize match the specified libtool
|
||||
case "`uname`" in
|
||||
Darwin*)
|
||||
# On OS X, libtoolize could be named glibtoolize or
|
||||
# libtoolize. Try the former first, then fall back
|
||||
# to the latter if it's not found.
|
||||
HDF5_LIBTOOLIZE="${LIBTOOL_DIR}/glibtoolize"
|
||||
if [ ! -f $HDF5_LIBTOOLIZE ] ; then
|
||||
HDF5_LIBTOOLIZE="${LIBTOOL_DIR}/libtoolize"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
HDF5_LIBTOOLIZE="${LIBTOOL_DIR}/libtoolize"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Run autotools in order
|
||||
#
|
||||
# When available, we use the --force option to ensure all files are
|
||||
# updated. This prevents the autotools from re-running to fix dependencies
|
||||
# during the 'make' step, which can be a problem if environment variables
|
||||
# were set on the command line during autogen invocation.
|
||||
|
||||
# Some versions of libtoolize will suggest that we add ACLOCAL_AMFLAGS
|
||||
# = '-I m4'. This is already done in commence.am, which is included
|
||||
# in Makefile.am. You can ignore this suggestion.
|
||||
|
||||
# LIBTOOLIZE
|
||||
libtoolize_cmd="${HDF5_LIBTOOLIZE} --copy --force"
|
||||
echo ${libtoolize_cmd}
|
||||
if [ "$verbose" = true ] ; then
|
||||
${HDF5_LIBTOOLIZE} --version
|
||||
fi
|
||||
${libtoolize_cmd} || exit 1
|
||||
echo
|
||||
echo "NOTE: You can ignore the warning about adding -I m4."
|
||||
echo " We already do this in an included file."
|
||||
echo
|
||||
|
||||
# ACLOCAL
|
||||
if test -e "${LIBTOOL_DIR}/../share/aclocal" ; then
|
||||
aclocal_include="-I ${LIBTOOL_DIR}/../share/aclocal"
|
||||
fi
|
||||
aclocal_cmd="${HDF5_ACLOCAL} --force -I m4 ${aclocal_include}"
|
||||
echo ${aclocal_cmd}
|
||||
if [ "$verbose" = true ] ; then
|
||||
${HDF5_ACLOCAL} --version
|
||||
fi
|
||||
${aclocal_cmd} || exit 1
|
||||
echo
|
||||
|
||||
# AUTOHEADER
|
||||
autoheader_cmd="${HDF5_AUTOHEADER} --force"
|
||||
echo ${autoheader_cmd}
|
||||
if [ "$verbose" = true ] ; then
|
||||
${HDF5_AUTOHEADER} --version
|
||||
fi
|
||||
${autoheader_cmd} || exit 1
|
||||
echo
|
||||
|
||||
# AUTOMAKE
|
||||
automake_cmd="${HDF5_AUTOMAKE} --copy --add-missing --force-missing"
|
||||
echo ${automake_cmd}
|
||||
if [ "$verbose" = true ] ; then
|
||||
${HDF5_AUTOMAKE} --version
|
||||
fi
|
||||
${automake_cmd} || exit 1
|
||||
echo
|
||||
|
||||
# AUTOCONF
|
||||
autoconf_cmd="${HDF5_AUTOCONF} --force"
|
||||
echo ${autoconf_cmd}
|
||||
if [ "$verbose" = true ] ; then
|
||||
${HDF5_AUTOCONF} --version
|
||||
fi
|
||||
${autoconf_cmd} || exit 1
|
||||
echo
|
||||
|
||||
# Run scripts that process source.
|
||||
|
||||
# Run trace script
|
||||
# The trace script adds H5TRACE macros to library source files. It should
|
||||
# have no effect on files that don't have HDF5 API macros in them.
|
||||
echo
|
||||
echo "Running trace script:"
|
||||
bin/trace src/H5*.c || exit 1
|
||||
|
||||
# Run make_err
|
||||
# make_err automatically generates the H5E headers that create error message
|
||||
# types for HDF5.
|
||||
echo
|
||||
echo "Running error generation script:"
|
||||
bin/make_err src/H5err.txt || exit 1
|
||||
|
||||
# Run make_vers
|
||||
# make_vers automatically generates the public headers that define the API version
|
||||
# macros for HDF5.
|
||||
echo
|
||||
echo "Running API version generation script:"
|
||||
bin/make_vers src/H5vers.txt || exit 1
|
||||
|
||||
# Run make_overflow
|
||||
# make_overflow automatically generates macros for detecting overflows for type
|
||||
# conversion.
|
||||
echo
|
||||
echo "Running overflow macro generation script:"
|
||||
bin/make_overflow src/H5overflow.txt || exit 1
|
||||
|
||||
echo
|
||||
exit 0
|
||||
|
||||
402
bin/bbrelease
Executable file
402
bin/bbrelease
Executable file
@@ -0,0 +1,402 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright by The HDF Group.
|
||||
# Copyright by the Board of Trustees of the University of Illinois.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This file is part of HDF5. The full HDF5 copyright notice, including
|
||||
# terms governing use, modification, and redistribution, is contained in
|
||||
# the files COPYING and Copyright.html. COPYING can be found at the root
|
||||
# of the source code distribution tree; Copyright.html can be found at the
|
||||
# root level of an installed copy of the electronic HDF5 document set and
|
||||
# is linked from the top-level documents page. It can also be found at
|
||||
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
|
||||
# access to either file, you may request a copy from help@hdfgroup.org.
|
||||
#
|
||||
|
||||
# Make a release of hdf5.
|
||||
#
|
||||
# Programmer: Robb Matzke
|
||||
# Creation date: on or before 1998-01-29.
|
||||
#
|
||||
# Modifications
|
||||
# Robb Matzke, 1999-07-16
|
||||
# The SunOS 5.6 sed *must* have slashes as delimiters. I changed things like
|
||||
# `sed s+/CVS++' to `sed 's/\/CVS//'
|
||||
#
|
||||
# Albert Cheng, 1999-10-26
|
||||
# Moved the MANIFEST checking to a separate command file so that
|
||||
# it can be invoked individually.
|
||||
#
|
||||
# Albert Cheng, 2004-08-14
|
||||
# Added the --private option.
|
||||
#
|
||||
# James Laird, 2005-09-07
|
||||
# Added the md5 method.
|
||||
|
||||
# Function definitions
|
||||
#
|
||||
# Print Usage page
|
||||
USAGE()
|
||||
{
|
||||
cat << EOF
|
||||
Usage: $0 -d <dir> [--docver BRANCHNAME] [-h] [--nocheck] [--private] <methods> ...
|
||||
-d DIR The name of the directory where the releas(es) should be
|
||||
placed.
|
||||
--docver BRANCHNAME This is added for 1.8 and beyond to get the correct
|
||||
version of documentation files from the hdf5docs
|
||||
repository. BRANCHNAME for v1.8 should be hdf5_1_8.
|
||||
-h print the help page.
|
||||
--nocheck Ignore errors in MANIFEST file.
|
||||
--private Make a private release with today's date in version information.
|
||||
--revision Make a private release with the code revision number in version information.
|
||||
|
||||
This must be run at the top level of the source directory.
|
||||
The other command-line options are the names of the programs to use
|
||||
for compressing the resulting tar archive (if none are given then
|
||||
"tar" is assumed):
|
||||
|
||||
tar -- use tar and don't do any compressing.
|
||||
gzip -- use gzip with "-9" and append ".gz" to the output name.
|
||||
bzip2 -- use bzip2 with "-9" and append ".bz2" to the output name.
|
||||
zip -- convert all text files to DOS style and form a zip file for Windows use.
|
||||
doc -- produce the latest doc tree in addition to the archive.
|
||||
|
||||
An md5 checksum is produced for each archive created and stored in the md5 file.
|
||||
|
||||
Examples:
|
||||
|
||||
$ bin/release -d /tmp
|
||||
/tmp/hdf5-1.8.13-RELEASE.txt
|
||||
/tmp/hdf5-1.8.13.md5
|
||||
/tmp/hdf5-1.8.13.tar
|
||||
|
||||
$ bin/release -d /tmp gzip
|
||||
/tmp/hdf5-1.8.13-RELEASE.txt
|
||||
/tmp/hdf5-1.8.13.md5
|
||||
/tmp/hdf5-1.8.13.tar.gz
|
||||
|
||||
$ bin/release -d /tmp tar gzip zip
|
||||
/tmp/hdf5-1.8.13-RELEASE.txt
|
||||
/tmp/hdf5-1.8.13.md5
|
||||
/tmp/hdf5-1.8.13.tar
|
||||
/tmp/hdf5-1.8.13.tar.gz
|
||||
/tmp/hdf5-1.8.13.tar.zip
|
||||
|
||||
EOF
|
||||
|
||||
}
|
||||
|
||||
# Function name: tar2zip
|
||||
# Convert the release tarball to a Windows zipball.
|
||||
#
|
||||
# Programmer: Albert Cheng
|
||||
# Creation date: 2014-04-23
|
||||
#
|
||||
# Modifications
|
||||
#
|
||||
# Steps:
|
||||
# 1. untar the tarball in a temporay directory;
|
||||
# Note: do this in a temporary directory to avoid changing
|
||||
# the original source directory which maybe around.
|
||||
# 2. convert all its text files to DOS (LF-CR) style;
|
||||
# 3. form a zip file which is usable by Windows users.
|
||||
#
|
||||
# Parameters:
|
||||
# $1 version
|
||||
# $2 release tarball
|
||||
# $3 output zipball file name
|
||||
#
|
||||
# Returns 0 if successful; 1 otherwise
|
||||
#
|
||||
tar2zip()
|
||||
{
|
||||
if [ $# -ne 3 ]; then
|
||||
echo "usage: tar2zip <tarfilename> <zipfilename>"
|
||||
return 1
|
||||
fi
|
||||
ztmpdir=/tmp/tmpdir$$
|
||||
mkdir -p $ztmpdir
|
||||
version=$1
|
||||
tarfile=$2
|
||||
zipfile=$3
|
||||
|
||||
# step 1: untar tarball in ztmpdir
|
||||
(cd $ztmpdir; tar xf -) < $tarfile
|
||||
# sanity check
|
||||
if [ ! -d $ztmpdir/$version ]; then
|
||||
echo "untar did not create $ztmpdir/$version source dir"
|
||||
# cleanup
|
||||
rm -rf $ztmpdir
|
||||
return 1
|
||||
fi
|
||||
# step 2: convert text files
|
||||
# There maybe a simpler way to do this.
|
||||
# options used in unix2dos:
|
||||
# -k Keep the date stamp
|
||||
# -q quiet mode
|
||||
# grep redirect output to /dev/null because -q or -s are not portable.
|
||||
find $ztmpdir/$version | \
|
||||
while read inf; do \
|
||||
if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \
|
||||
unix2dos -q -k $inf; \
|
||||
fi\
|
||||
done
|
||||
# step 3: make zipball
|
||||
# -9 maximum compression
|
||||
# -y Store symbolic links as such in the zip archive
|
||||
# -r recursive
|
||||
# -q quiet
|
||||
(cd $ztmpdir; zip -9 -y -r -q $version.zip $version)
|
||||
mv $ztmpdir/$version.zip $zipfile
|
||||
|
||||
# cleanup
|
||||
rm -rf $ztmpdir
|
||||
}
|
||||
|
||||
# This command must be run at the top level of the hdf5 source directory.
|
||||
# Verify this requirement.
|
||||
# Since we are running bbrelease to create an HDF5 source tarfile for buildbot
|
||||
# testing with source that is not for release, there is not a file named
|
||||
# "configure" but there will be one named "configure.ac". The "configure"
|
||||
# file will be created when autogen.sh runs. There probably will always
|
||||
# be a bin/release file, but just in case it is removed, we can check for
|
||||
# this script, bbrelease, in the bin directory. The bin/release script should
|
||||
# continue to check for "configure" because it should be present in release
|
||||
# source.
|
||||
if [ ! \( -f configure.ac -a -f bin/bbrelease \) ]; then
|
||||
echo "$0 must be run at the top level of the hdf5 source directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Defaults
|
||||
DEST=releases
|
||||
VERS=`perl bin/h5vers`
|
||||
VERS_OLD=
|
||||
test "$VERS" || exit 1
|
||||
verbose=yes
|
||||
check=yes
|
||||
release_date=`date +%F`
|
||||
today=`date +%Y%m%d`
|
||||
pmode='no'
|
||||
revmode='no'
|
||||
tmpdir="../#release_tmp.$$" # tmp work directory
|
||||
DOC_URL=http://svn.hdfgroup.uiuc.edu/hdf5doc/trunk
|
||||
CPPLUS_RM_NAME=cpplus_RM
|
||||
|
||||
# Restore previous Version information
|
||||
RESTORE_VERSION()
|
||||
{
|
||||
if [ X-${VERS_OLD} != X- ]; then
|
||||
echo restoring version information back to $VERS_OLD
|
||||
rm -f config/lt_vers.am
|
||||
cp $tmpdir/lt_vers.am config/lt_vers.am
|
||||
bin/h5vers -s $VERS_OLD
|
||||
VERS_OLD=
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Command-line arguments
|
||||
while [ -n "$1" ]; do
|
||||
arg=$1
|
||||
shift
|
||||
case "$arg" in
|
||||
-d)
|
||||
DEST=$1
|
||||
shift
|
||||
;;
|
||||
--nocheck)
|
||||
check=no
|
||||
;;
|
||||
-h)
|
||||
USAGE
|
||||
exit 0
|
||||
;;
|
||||
--private)
|
||||
pmode=yes
|
||||
;;
|
||||
--revision)
|
||||
revmode=yes
|
||||
;;
|
||||
--docver)
|
||||
DOCVERSION=$1
|
||||
shift
|
||||
;;
|
||||
-*)
|
||||
echo "Unknown switch: $arg" 1>&2
|
||||
USAGE
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
methods="$methods $arg"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Default method is tar
|
||||
if [ "X$methods" = "X" ]; then
|
||||
methods="tar"
|
||||
fi
|
||||
|
||||
# Create the temporay work directory.
|
||||
if mkdir $tmpdir; then
|
||||
echo "temporary work directory for release. "\
|
||||
"Can be deleted after release completes." > $tmpdir/README
|
||||
else
|
||||
echo "Failed to mkdir tmpdir($tmpdir)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# setup restoration in case of abort.
|
||||
trap RESTORE_VERSION 0
|
||||
|
||||
if [ X$pmode = Xyes ]; then
|
||||
VERS_OLD=$VERS
|
||||
# Copy old version of config/lt_vers.am, since it's hard to
|
||||
# "undo" changes to it.
|
||||
cp config/lt_vers.am $tmpdir
|
||||
# Set version information to m.n.r-of$today.
|
||||
# (h5vers does not correctly handle just m.n.r-$today.)
|
||||
VERS=`echo $VERS | sed -e s/-.*//`-of$today
|
||||
echo Private release of $VERS
|
||||
bin/h5vers -s $VERS
|
||||
fi
|
||||
|
||||
if [ X$revmode = Xyes ]; then
|
||||
VERS_OLD=$VERS
|
||||
# Copy old version of config/lt_vers.am, since it's hard to
|
||||
# "undo" changes to it.
|
||||
cp config/lt_vers.am $tmpdir
|
||||
branch=`svn info | grep ^URL: | awk -F/ '{print $NF}'`
|
||||
revision=`svn info | grep "Revision:" | awk '{print $2}'`
|
||||
# Set version information to m.n.r-r$revision.
|
||||
# (h5vers does not correctly handle just m.n.r-$today.)
|
||||
VERS=`echo $VERS | sed -e s/-.*//`-r$revision
|
||||
echo Private release of $VERS
|
||||
bin/h5vers -s $VERS
|
||||
HDF5_VERS=hdf5-$branch-r$revision
|
||||
# use a generic directory name for revision releases
|
||||
HDF5_IN_VERS=hdfsrc
|
||||
else
|
||||
# Store hdf5-$VERS ("hdf5-1.7.51", e.g.) to a variable to avoid typos
|
||||
HDF5_VERS=hdf5-$VERS
|
||||
# directory name matches tar file name for non-revision releases
|
||||
HDF5_IN_VERS=$HDF5_VERS
|
||||
fi
|
||||
|
||||
test "$verbose" && echo "Releasing $HDF5_VERS to $DEST" 1>&2
|
||||
if [ ! -d $DEST ]; then
|
||||
echo " Destination directory $DEST does not exist" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check the validity of the MANIFEST file.
|
||||
bin/chkmanifest || fail=yes
|
||||
if [ "X$fail" = "Xyes" ]; then
|
||||
if [ $check = yes ]; then
|
||||
exit 1
|
||||
else
|
||||
echo "Continuing anyway..."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create a manifest that contains only files for distribution.
|
||||
MANIFEST=$tmpdir/H5_MANIFEST
|
||||
grep '^\.' MANIFEST | grep -v _DO_NOT_DISTRIBUTE_ >$MANIFEST
|
||||
|
||||
# Prepare the source tree for a release.
|
||||
#ln -s `pwd` $tmpdir/$HDF5_VERS || exit 1
|
||||
ln -s `pwd` $tmpdir/$HDF5_IN_VERS || exit 1
|
||||
# Save a backup copy of Makefile if exists.
|
||||
test -f Makefile && mv Makefile $tmpdir/Makefile.x
|
||||
cp -p Makefile.dist Makefile
|
||||
|
||||
# Update README.txt and release_docs/RELEASE.txt with release information in
|
||||
# line 1.
|
||||
for f in README.txt release_docs/RELEASE.txt; do
|
||||
echo "HDF5 version $VERS released on $release_date" >$f.x
|
||||
sed -e 1d $f >>$f.x
|
||||
mv $f.x $f
|
||||
# Make sure new files are of the right access mode
|
||||
chmod 644 $f
|
||||
done
|
||||
|
||||
# trunk is different than branches.
|
||||
if [ "${DOCVERSION}" ]; then
|
||||
DOC_URL=http://svn.hdfgroup.uiuc.edu/hdf5doc/branches/${DOCVERSION}
|
||||
fi
|
||||
|
||||
# Create the tar file
|
||||
test "$verbose" && echo " Running tar..." 1>&2
|
||||
( \
|
||||
cd $tmpdir; \
|
||||
tar cf $HDF5_VERS.tar $HDF5_IN_VERS/Makefile \
|
||||
`sed 's/^\.\//'$HDF5_IN_VERS'\//' $MANIFEST` || exit 1 \
|
||||
)
|
||||
|
||||
# Compress
|
||||
MD5file=$HDF5_VERS.md5
|
||||
cp /dev/null $DEST/$MD5file
|
||||
for comp in $methods; do
|
||||
case $comp in
|
||||
tar)
|
||||
cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar
|
||||
(cd $DEST; md5sum $HDF5_VERS.tar >> $MD5file)
|
||||
;;
|
||||
gzip)
|
||||
test "$verbose" && echo " Running gzip..." 1>&2
|
||||
gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz
|
||||
(cd $DEST; md5sum $HDF5_VERS.tar.gz >> $MD5file)
|
||||
;;
|
||||
bzip2)
|
||||
test "$verbose" && echo " Running bzip2..." 1>&2
|
||||
bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2
|
||||
(cd $DEST; md5sum $HDF5_VERS.tar.bz2 >> $MD5file)
|
||||
;;
|
||||
zip)
|
||||
test "$verbose" && echo " Creating zip ball..." 1>&2
|
||||
tar2zip $HDF5_IN_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2
|
||||
(cd $DEST; md5sum $HDF5_VERS.zip >> $MD5file)
|
||||
;;
|
||||
doc)
|
||||
if [ "${DOCVERSION}" = "" ]; then
|
||||
DOCVERSION=trunk
|
||||
fi
|
||||
test "$verbose" && echo " Creating docs..." 1>&2
|
||||
# Check out docs from svn repo
|
||||
(cd $tmpdir; svn co $DOC_URL > /dev/null) || exit 1
|
||||
# Create doxygen C++ RM
|
||||
(cd c++/src && doxygen cpp_doc_config > /dev/null ) || exit 1
|
||||
# Replace version of C++ RM with just-created version
|
||||
rm -rf $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME
|
||||
mv c++/src/$CPPLUS_RM_NAME $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME
|
||||
# Compress the docs and move them to the release area
|
||||
mv $tmpdir/$DOCVERSION $tmpdir/${HDF5_VERS}_docs
|
||||
(cd $tmpdir && tar cf ${HDF5_VERS}_docs.tar ${HDF5_VERS}_docs)
|
||||
mv $tmpdir/${HDF5_VERS}_docs.tar $DEST
|
||||
;;
|
||||
*)
|
||||
echo "***Error*** Unknown method $comp"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Copy the RELEASE.txt to the release area.
|
||||
cp release_docs/RELEASE.txt $DEST/$HDF5_VERS-RELEASE.txt
|
||||
|
||||
# Remove distributed Makefile and restore previous Makefile if existed.
|
||||
rm -f Makefile
|
||||
test -f $tmpdir/Makefile.x && mv $tmpdir/Makefile.x Makefile
|
||||
|
||||
# Restore OLD version information, then no need for trap.
|
||||
if [ X$pmode = Xyes ] || [ X$revmode = Xyes ]; then
|
||||
RESTORE_VERSION
|
||||
trap 0
|
||||
fi
|
||||
|
||||
# Remove temporary things
|
||||
rm -rf $tmpdir
|
||||
|
||||
exit 0
|
||||
@@ -159,19 +159,6 @@ LOCATE_SZLIB()
|
||||
HP-UX)
|
||||
szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/HPUX-11.00"
|
||||
;;
|
||||
IRIX)
|
||||
szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/IRIX64-6.5-32bit"
|
||||
;;
|
||||
IRIX64)
|
||||
case "$CC" in
|
||||
*-n32)
|
||||
szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/IRIX64-6.5-32bit"
|
||||
;;
|
||||
*)
|
||||
szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/IRIX64-6.5"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
Linux)
|
||||
case `uname -m` in
|
||||
i686)
|
||||
|
||||
@@ -56,7 +56,6 @@ HTM_COPYRIGHT=/tmp/h5chkright_HTM.$$ # HTML style copyright
|
||||
SH_COPYRIGHT=/tmp/h5chkright_SH.$$ # SHELL style copyright
|
||||
SH_COPYRIGHT2=/tmp/h5chkright_SH2.$$ # SHELL style copyright, 2nd style.
|
||||
WINBAT_COPYRIGHT=/tmp/h5chkright_WINBAT.$$ # Windows Batch file Copyright notice
|
||||
VMSCMD_COPYRIGHT=/tmp/h5chkright_VMSCMD.$$ # VMS command file Copyright notice
|
||||
CONFIGURE_AC_COPYRIGHT=/tmp/h5chkright_CONFIGURE_AC.$$ # configure.ac file Copyright notice
|
||||
|
||||
tmpfixfile=/tmp/h5chkright_fix.$$ # Temporary fixed copy of file
|
||||
@@ -221,22 +220,6 @@ dnl root level of an installed copy of the electronic HDF5 document set and
|
||||
dnl is linked from the top-level documents page. It can also be found at
|
||||
dnl http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
|
||||
dnl access to either file, you may request a copy from help@hdfgroup.org.
|
||||
EOF
|
||||
|
||||
# VMS command file Copyright notice
|
||||
cat > ${VMSCMD_COPYRIGHT} << \EOF
|
||||
$!# Copyright by The HDF Group.
|
||||
$!# Copyright by the Board of Trustees of the University of Illinois.
|
||||
$!# All rights reserved.
|
||||
$!#
|
||||
$!# This file is part of HDF5. The full HDF5 copyright notice, including
|
||||
$!# terms governing use, modification, and redistribution, is contained in
|
||||
$!# the files COPYING and Copyright.html. COPYING can be found at the root
|
||||
$!# of the source code distribution tree; Copyright.html can be found at the
|
||||
$!# root level of an installed copy of the electronic HDF5 document set and
|
||||
$!# is linked from the top-level documents page. It can also be found at
|
||||
$!# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
|
||||
$!# access to either file, you may request a copy from help@hdfgroup.org.
|
||||
EOF
|
||||
|
||||
}
|
||||
@@ -611,28 +594,6 @@ BATCH_FILE()
|
||||
}
|
||||
|
||||
|
||||
# Check Windows Batch files
|
||||
#
|
||||
VMSCMD_FILE()
|
||||
{
|
||||
f=$1
|
||||
case `MATCH_COPYRIGHT $VMSCMD_COPYRIGHT $f` in
|
||||
PASSED)
|
||||
PASSED $f
|
||||
return
|
||||
;;
|
||||
FAILED)
|
||||
# show the difference
|
||||
FAILED $f
|
||||
$DIFF ${EXTRACTEDFILE} ${VMSCMD_COPYRIGHT}
|
||||
if [ -n "$FIXIT" ]; then
|
||||
FIX_COPYRIGHT $VMSCMD_COPYRIGHT $f
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
# Check Configure.in type files
|
||||
#
|
||||
CONFIGURE_AC_FILE()
|
||||
@@ -834,10 +795,6 @@ while read file; do
|
||||
# Windows Batch files
|
||||
BATCH_FILE ${file}
|
||||
;;
|
||||
*.com )
|
||||
# VMS Command files
|
||||
VMSCMD_FILE ${file}
|
||||
;;
|
||||
*.h5 | *.hdf5 )
|
||||
# Ignore HDF5 data files
|
||||
continue
|
||||
|
||||
155
bin/chkmanifest
155
bin/chkmanifest
@@ -17,78 +17,23 @@
|
||||
# Check that all the files in MANIFEST exist and that (if this is a
|
||||
# SVN checkout) that all the SVN-managed files appear in the
|
||||
# MANIFEST.
|
||||
#
|
||||
|
||||
verbose=yes
|
||||
MANIFEST=/tmp/HD_MANIFEST.$$
|
||||
SVNENTRY=/tmp/HD_SVNENTRY.$$
|
||||
|
||||
# function definitions
|
||||
|
||||
GETSVNENTRIES_13 ()
|
||||
# Purpose: Extract filenames from the svn v1.3.* entries file
|
||||
# $1: directory name in which the svn entries is.
|
||||
# steps:
|
||||
# 1. remove all single line entries so that step 2 does not fail on them.
|
||||
# 2. merge all multiple lines entries into single lines.
|
||||
# 3. remove all non file entries.
|
||||
# 4. insert a blank line because some entries files has no kind="file"
|
||||
# entry and ed does not like to do g on an empty file.
|
||||
# 5. remove everything except the file name.
|
||||
# 6. remove all blank lines, including the inserted one.
|
||||
{
|
||||
cp $1/entries $SVNENTRY
|
||||
chmod u+w $SVNENTRY # entries file is not writable.
|
||||
ed - $SVNENTRY <<EOF
|
||||
g/^<.*>$/d
|
||||
g/^</.,/>$/j
|
||||
v/kind="file"/d
|
||||
a
|
||||
|
||||
.
|
||||
g/.*name="/s///
|
||||
g/".*/s///
|
||||
g/^$/d
|
||||
w
|
||||
q
|
||||
EOF
|
||||
cat $SVNENTRY
|
||||
rm $SVNENTRY
|
||||
}
|
||||
|
||||
GETSVNENTRIES_14 ()
|
||||
# Purpose: Extract filenames from the svn v1.4.* entries file
|
||||
# $1: directory name in which the svn entries is.
|
||||
# steps:
|
||||
# 1. all valid files are followed by a line containing "file" only.
|
||||
# 2. find them by looking for "file" first, then mark its preceding line as
|
||||
# wanted.
|
||||
# 3. remove all non-marked line.
|
||||
# 4. insert a blank line because some entries files has no kind="file"
|
||||
# entry and ed does not like to do g on an empty file.
|
||||
# 5. remove the marks.
|
||||
{
|
||||
cp $1/entries $SVNENTRY
|
||||
chmod u+w $SVNENTRY # entries file is not writable.
|
||||
ed - $SVNENTRY <<EOF
|
||||
g/^file$/-s/^/%WANTED%/
|
||||
v/%WANTED%/d
|
||||
a
|
||||
|
||||
.
|
||||
g/^%WANTED%/s///
|
||||
w
|
||||
q
|
||||
EOF
|
||||
cat $SVNENTRY
|
||||
rm $SVNENTRY
|
||||
}
|
||||
|
||||
AUTOGEN=./autogen.sh
|
||||
AUTOGEN_LOG=/tmp/autogen.log.$$
|
||||
|
||||
# Main
|
||||
test "$verbose" && echo " Checking MANIFEST..." 1>&2
|
||||
# clean up $MANIFEST file when exits
|
||||
trap "rm -f $MANIFEST" 0
|
||||
|
||||
# Only split lines on newline, not whitespace
|
||||
set -f
|
||||
IFS='
|
||||
'
|
||||
|
||||
# First make sure i am in the directory in which there is an MANIFEST file
|
||||
# and then do the checking from there. Will try the following,
|
||||
# current directory, parent directory, the directory this command resides.
|
||||
@@ -107,6 +52,19 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# Do an autogen if generated files (e.g., configure) is not present
|
||||
if [ ! -f configure ]; then
|
||||
echo " running $AUTOGEN -p"
|
||||
$AUTOGEN -p > $AUTOGEN_LOG 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $AUTOGEN encountered error. Abort.
|
||||
echo output from $AUTOGEN:
|
||||
cat $AUTOGEN_LOG
|
||||
exit 1
|
||||
fi
|
||||
rm $AUTOGEN_LOG
|
||||
fi
|
||||
|
||||
# Check for duplicate entries. This can be done at any time, but it may as
|
||||
# well be sooner so that if something else fails the presence of duplicates
|
||||
# will already be known.
|
||||
@@ -132,36 +90,55 @@ for file in `cat $MANIFEST`; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Get the list of files under version control and check that they are
|
||||
# present.
|
||||
#
|
||||
# First get a list of all the pending files with svn stat and
|
||||
# check those.
|
||||
svn_stat=`svn stat -q`
|
||||
for file in $svn_stat; do
|
||||
|
||||
# Inspect the .svn/entries to figure out what version of svn file entry is
|
||||
# used.
|
||||
# The following algorithm is formed via reverse engineering.
|
||||
# I don't know what the official svn format is if such a specification exists.
|
||||
# Algorithm:
|
||||
# If the first line of the file has 'xml version="1.0"' in it, it is created
|
||||
# by svn 1.3 or older; else if it has '^file$' in it, it is created by svn 1.4.
|
||||
svn_entry_file=.svn/entries
|
||||
if head -1 $svn_entry_file | grep 'xml version="1.0"' > /dev/null 2>&1;then
|
||||
getsvnentries=GETSVNENTRIES_13
|
||||
elif grep '^file$' $svn_entry_file > /dev/null 2>&1; then
|
||||
getsvnentries=GETSVNENTRIES_14
|
||||
else
|
||||
echo "Unknown svn entries format. Aborted"
|
||||
exit 1
|
||||
fi
|
||||
# Newly added files are not listed by svn ls, which
|
||||
# we check later.
|
||||
|
||||
for svn in `find . -type d -name .svn -print`; do
|
||||
path=`echo $svn |sed 's/\/.svn//'`
|
||||
for file in `$getsvnentries $svn`; do
|
||||
if (grep ^$path/$file$ $MANIFEST >/dev/null); then
|
||||
:
|
||||
else
|
||||
echo "+ $path/$file"
|
||||
fail=yes
|
||||
fi
|
||||
done
|
||||
# The line listing new files starts with 'A'.
|
||||
letter=`echo $file | head -c 1`
|
||||
if [ "$letter" = "A" ]; then
|
||||
# Convert the seven Subversion status columns to './' so it matches
|
||||
# the manifest file name.
|
||||
#
|
||||
# There is a space between the status columns and file name, hence
|
||||
# the '8' instead of '7'.
|
||||
path=`echo $file | sed 's/^.\{8\}/\.\//g'`
|
||||
# Ignore directories
|
||||
if [ ! -d $path ]; then
|
||||
if (grep ^$path$ $MANIFEST >/dev/null); then
|
||||
:
|
||||
else
|
||||
echo "- $path"
|
||||
fail=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Next check svn ls, which gets a list of all files that are
|
||||
# checked in.
|
||||
svn_ls=`svn ls -R`
|
||||
for file in $svn_ls; do
|
||||
path="./${file}"
|
||||
# Ignore directories
|
||||
if [ ! -d $path ]; then
|
||||
if (grep ^$path$ $MANIFEST >/dev/null); then
|
||||
:
|
||||
else
|
||||
echo "+ $path"
|
||||
fail=yes
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Finish up
|
||||
if [ "X$fail" = "Xyes" ]; then
|
||||
cat 1>&2 <<EOF
|
||||
The MANIFEST is out of date. Files marked with a minus sign (-) no
|
||||
|
||||
437
bin/cmakehdf5
437
bin/cmakehdf5
@@ -12,8 +12,6 @@
|
||||
DPRINT=:
|
||||
#DPRINT=echo
|
||||
|
||||
# use the ctest scripting method if --script is given
|
||||
if [ "$1" != "--script" ]; then
|
||||
# variable names
|
||||
# The "extra" number is the step number and easier to see all logfiles in
|
||||
# the sorted order of steps
|
||||
@@ -23,6 +21,8 @@ makelog="#${progname}_2build.log"
|
||||
testlog="#${progname}_3test.log"
|
||||
packlog="#${progname}_4pack.log"
|
||||
installlog="#${progname}_5install.log"
|
||||
vflag=1 # verbose flag default to on.
|
||||
config_summary=libhdf5.settings
|
||||
exit_code=0
|
||||
|
||||
# This command should be in the source directory's bin/
|
||||
@@ -46,9 +46,17 @@ cacheinit=$srcdir/config/cmake/cacheinit.cmake
|
||||
build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=OFF # C++ interface default off
|
||||
build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=OFF # Fortran interface default off
|
||||
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=ON # High Level interface default on
|
||||
build_threadsafe=-DHDF5_ENABLE_THREADSAFE:BOOL=OFF # Threadsafe feature default off
|
||||
build_testing=-DBUILD_TESTING:BOOL=ON # Build tests default on
|
||||
build_tools=-DHDF5_BUILD_TOOLS:BOOL=ON # Build tools default on
|
||||
|
||||
with_zlib=-DHDF5_ENABLE_Z_LIB_SUPPORT=ON # enable zlib filter default on
|
||||
with_szlib=-DHDF5_ENABLE_SZIP_SUPPORT=OFF # enables szip filter default off
|
||||
szlib_path="" # szip lib path default off
|
||||
shared_lib=-DBUILD_SHARED_LIBS:BOOL=ON # enables shared lib; default on
|
||||
njobs="" # number of jobs (commands) to
|
||||
# run simultaneously; default is
|
||||
# value from $MAKE if defined,
|
||||
# otherwise none (1)
|
||||
|
||||
#=============
|
||||
# Function definitions
|
||||
@@ -75,11 +83,26 @@ Usage: $progname [<options>]
|
||||
enable or disable c++ API. Default is off.
|
||||
--enable-hl | --disable-hl:
|
||||
enable or disable high level API. Default is on.
|
||||
--enable-threadsafe | --disable-threadsafe:
|
||||
enable or disable threadsafe feature. Default is off
|
||||
--enable-shared | --disable-shared:
|
||||
enable or disable shared lib. Default is on.
|
||||
--enable-tools | --disable-tools:
|
||||
enable or disable building tools. Default is on.
|
||||
--enable-testing | --disable-testing:
|
||||
enable or disable building tests. Default is on.
|
||||
--with-zlib | --with-zlib=<libpath> | --without-zlib:
|
||||
Use zlib library for external deflate I/O filter. Default is on.
|
||||
--with-szlib | --with-szlib=<libpath> | --without-szlib:
|
||||
Use szlib library for external deflate I/O filter. Default is on.
|
||||
--njobs=<-j N>:
|
||||
number of jobs (commands) to run simultaneously; default is value from
|
||||
$MAKE if defined, otherwise none
|
||||
--enable-verbose | --disable-verbose:
|
||||
enable or disable verbose output. Default is on.
|
||||
--help: shows details help page
|
||||
|
||||
<libpath>: the file path to the library, expect <libpath>/lib and <libpath>/include.
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -106,7 +129,7 @@ STEP()
|
||||
(TIMESTAMP; nerror=0 ;
|
||||
echo "eval $command"
|
||||
eval $command || nerror=1 ;
|
||||
TIMESTAMP; exit $nerror) < /dev/null >> "$logfile" 2>&1
|
||||
TIMESTAMP; exit $nerror) < /dev/null > "$logfile" 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "error in '$banner'. $progname aborted."
|
||||
exit 1
|
||||
@@ -114,6 +137,60 @@ STEP()
|
||||
}
|
||||
|
||||
|
||||
# Install the generated installation image file. Different platform uses
|
||||
# different image files.
|
||||
# Linux: HDF5-<version>-Linux.sh file
|
||||
# Mac OS X: Not implemented yet
|
||||
# Others: Not implemented yet
|
||||
INSTALL_HDF5()
|
||||
{
|
||||
myos="`uname -s`"
|
||||
case "$myos" in
|
||||
Linux)
|
||||
install_file=./HDF5-${version}-Linux.sh
|
||||
$install_file --skip-license $*
|
||||
;;
|
||||
Darwin) # Mac OSX DMG file
|
||||
# These steps were a kludge. Need proper support from Cmake engineering.
|
||||
echo Darwin install step needs proper implementation. Quit.
|
||||
return 1
|
||||
#
|
||||
install_file=HDF5-${version}-Darwin.dmg
|
||||
test -d hdf5 || mkdir hdf5
|
||||
basename=`basename $install_file .dmg`
|
||||
# mount the DMG file as /Volumes/$basename
|
||||
# echo 'Y' as yes for license.
|
||||
echo Y | hdiutil mount $install_file
|
||||
# copy the contents to the install location
|
||||
cp -R "/Volumes/$basename/HDF_Group" hdf5
|
||||
# unmount the DMG file
|
||||
hdiutil unmount /Volumes/$basename
|
||||
;;
|
||||
*) # unknown/unsupported OS.
|
||||
echo "INSTALL_HDF5: Error--unknown/unsupported OS($myos)"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
# Print logfiles.
|
||||
# $*: logfiles
|
||||
DUMP_LOGFILE()
|
||||
{
|
||||
for x in $*; do
|
||||
if [ -f $x ]; then
|
||||
echo "=================================="
|
||||
echo "Dumping $x"
|
||||
echo "=================================="
|
||||
cat $x
|
||||
echo "==== END $x ====="
|
||||
echo
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
#==========
|
||||
# main
|
||||
#==========
|
||||
@@ -121,6 +198,12 @@ STEP()
|
||||
# Show a start time stamp
|
||||
TIMESTAMP
|
||||
|
||||
# Initialize njobs if $AMKE is defined
|
||||
if [ -n "$MAKE" ]; then
|
||||
# assume all arguments are for --jobs
|
||||
njobs=`echo $MAKE | cut -s -d' ' -f2-`
|
||||
fi
|
||||
|
||||
# Parse Cmake configure options
|
||||
# --enable-XXX or --disable-XXX will enable or disable feature XXX.
|
||||
# XXX can be:
|
||||
@@ -149,6 +232,18 @@ while [ $# -gt 0 ]; do
|
||||
--disable-hl)
|
||||
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=OFF
|
||||
;;
|
||||
--enable-threadsafe)
|
||||
build_threadsafe=-DHDF5_ENABLE_THREADSAFE:BOOL=ON
|
||||
;;
|
||||
--disable-threadsafe)
|
||||
build_threadsafe=-DHDF5_ENABLE_THREADSAFE:BOOL=OFF
|
||||
;;
|
||||
--enable-shared)
|
||||
shared_lib=-DBUILD_SHARED_LIBS:BOOL=ON
|
||||
;;
|
||||
--disable-shared)
|
||||
shared_lib=-DBUILD_SHARED_LIBS:BOOL=OFF
|
||||
;;
|
||||
--enable-tools)
|
||||
build_tools=-DHDF5_BUILD_TOOLS:BOOL=ON
|
||||
;;
|
||||
@@ -161,18 +256,52 @@ while [ $# -gt 0 ]; do
|
||||
--disable-testing)
|
||||
build_testing=-DBUILD_TESTING:BOOL=OFF
|
||||
;;
|
||||
--with-zlib)
|
||||
with_zlib=-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON
|
||||
;;
|
||||
--with-zlib=*)
|
||||
xarg=`echo $1 | cut -d= -f2-`
|
||||
with_zlib="-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON -DZLIB_ROOT=$xarg"
|
||||
;;
|
||||
--without-zlib)
|
||||
with_zlib=-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF
|
||||
;;
|
||||
--with-szlib)
|
||||
with_szlib=-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON
|
||||
szlib_path="" # szlib is in default paths
|
||||
;;
|
||||
--with-szlib=*)
|
||||
xarg=`echo $1 | cut -d= -f2-`
|
||||
with_szlib="-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON"
|
||||
szlib_path="SZIP_INSTALL=$xarg"
|
||||
;;
|
||||
--without-szlib)
|
||||
with_szlib=-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF
|
||||
szlib_path="" # reset the path
|
||||
;;
|
||||
--njobs=*)
|
||||
njobs=`echo $1 | cut -d= -f2-`
|
||||
;;
|
||||
--enable-verbose)
|
||||
vflag=1
|
||||
;;
|
||||
--disable-verbose)
|
||||
vflag=0
|
||||
;;
|
||||
--help)
|
||||
# print the detail help page and exit
|
||||
HELP
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown options"
|
||||
echo "Unknown options: $1"
|
||||
HELP
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
$DPRINT after option parsing vflag=$vflag
|
||||
|
||||
# Always display the brief help page
|
||||
HELP_BRIEF
|
||||
@@ -194,290 +323,50 @@ if [ $? != 0 ]; then
|
||||
echo $vers failed. Aborted.
|
||||
exit 1
|
||||
fi
|
||||
echo Running Cmake for HDF5-${version} ...
|
||||
|
||||
# setup output of all the log files if verbose is on upon exit
|
||||
trap \
|
||||
"if [ $vflag -ne 0 ]; then DUMP_LOGFILE \$configlog \$makelog \$testlog \$packlog \$installlog; fi" \
|
||||
0
|
||||
|
||||
echo Running Cmake for HDF5-${version} ...
|
||||
# 4. Configure the C library, tools and tests with this command:
|
||||
STEP "Configure..." "cmake \
|
||||
# If successful, append the configure summary to the configure logfile.
|
||||
STEP "Configure..." \
|
||||
"env ${szlib_path} \
|
||||
cmake \
|
||||
-C $cacheinit \
|
||||
$build_cpp_lib \
|
||||
$build_fortran \
|
||||
$build_hl_lib \
|
||||
$build_threadsafe \
|
||||
$shared_lib \
|
||||
$build_testing \
|
||||
$build_tools \
|
||||
$srcdir" $configlog
|
||||
|
||||
$with_zlib \
|
||||
$with_szlib \
|
||||
$srcdir" $configlog &&\
|
||||
cat $config_summary >> $configlog
|
||||
|
||||
# 5. Build the C library, tools and tests with this command:
|
||||
STEP "Build the library, tools and tests, ..." "cmake --build . --config Release" $makelog
|
||||
|
||||
STEP "Build the library, tools and tests, ..." "cmake --build . --config Release -- $njobs" $makelog
|
||||
|
||||
# 6. Test the C library and tools with this command:
|
||||
STEP "Test the library and tools..." "ctest . -C Release" $testlog
|
||||
|
||||
STEP "Test the library and tools..." "ctest . -C Release $njobs" $testlog
|
||||
|
||||
# 7. Create an install image with this command:
|
||||
STEP "Create an install image..." "cpack -C Release CPackConfig.cmake" $packlog
|
||||
|
||||
|
||||
# The implementation of installation is imcomplete (only works for linux).
|
||||
# Screen it out for now till it is completed.
|
||||
if false; then
|
||||
# 8. Install with this command:
|
||||
STEP "Install..." "./HDF5-${version}-Linux.sh --skip-license" $installlog
|
||||
STEP "Install..." "INSTALL_HDF5" $installlog
|
||||
fi
|
||||
|
||||
# save the last exit code
|
||||
exit_code=$?
|
||||
|
||||
# Show a closing time stamp
|
||||
TIMESTAMP
|
||||
exit $exit_code
|
||||
|
||||
else
|
||||
# ---------------
|
||||
# older version
|
||||
# ---------------
|
||||
|
||||
# variable names
|
||||
progname=`basename $0` # program name
|
||||
cminfile="cmakemin.$$" # Cmake minimum file
|
||||
cfgfile=$progname.$$ # configure file
|
||||
ctest_log=ctest.log # output of ctest script
|
||||
install_log=install.log # output of installation
|
||||
$DPRINT $cfgfile
|
||||
|
||||
# Remove temporary generated files if exit 0
|
||||
trap "rm -f $cminfile $cfgfile" 0
|
||||
|
||||
#=============
|
||||
# Function definitions
|
||||
#=============
|
||||
TIMESTAMP()
|
||||
{
|
||||
echo "=====" "`date`" "====="
|
||||
}
|
||||
|
||||
|
||||
#==========
|
||||
# main
|
||||
#==========
|
||||
# Show a start time stamp
|
||||
TIMESTAMP
|
||||
|
||||
# Explain what and where log files are.
|
||||
cat <<EOF
|
||||
$ctest_log: output of ctest script.
|
||||
$install_log: output of installation
|
||||
Log files will be stored in Testing/Temporary:
|
||||
LastConfigure_<timestamp>.log: output of configure
|
||||
LastBuild_<timestamp>.log: output of build
|
||||
LastTest_<timestamp>.log: output of testing
|
||||
LastTestsFailed_<timestamp>.log: list of failed tests
|
||||
|
||||
EOF
|
||||
|
||||
# First generate the two needed input files, the $cimnfile and $cfgfile.
|
||||
# Then use ctest to use the two input files.
|
||||
|
||||
#==========
|
||||
# create the configure file
|
||||
#==========
|
||||
# Create the cmake minimum required file to be used by the following
|
||||
# configure file. Though not absolute needed, it is better to generate
|
||||
# this file before the configure file. Quote the EOF to preven substitution
|
||||
# in the text.
|
||||
#==========
|
||||
#==========
|
||||
cat > $cfgfile <<'EOF'
|
||||
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
||||
########################################################
|
||||
# This dashboard is maintained by The HDF Group
|
||||
# For any comments please contact cdashhelp@hdfgroup.org
|
||||
#
|
||||
########################################################
|
||||
|
||||
set (CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
|
||||
set (CTEST_SOURCE_DIRECTORY "../hdf5")
|
||||
set (CTEST_BINARY_DIRECTORY ".")
|
||||
set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
|
||||
set (CTEST_BUILD_CONFIGURATION "Release")
|
||||
set (CTEST_MAX_N 8)
|
||||
|
||||
# -- CDash variables
|
||||
set (LOCAL_NO_SUBMIT TRUE) # No CDash submit.
|
||||
set (MODEL "Experimental")
|
||||
set (CDASH_LOCAL TRUE)
|
||||
set (SITE_BUILDNAME_SUFFIX "cmakehdf5")
|
||||
|
||||
# -- URL set for internal check, default is to not update
|
||||
set (LOCAL_SKIP_UPDATE TRUE)
|
||||
set (REPOSITORY_URL "http://svn.${hdfgroup_url}/hdf5/branches/hdf5_1_8")
|
||||
# -- Standard build options
|
||||
set (ADD_BUILD_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=${CTEST_BINARY_DIRECTORY} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=\"SVN\" -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
|
||||
|
||||
# Use multiple CPU cores to build
|
||||
include(ProcessorCount)
|
||||
ProcessorCount(N)
|
||||
if(NOT N EQUAL 0)
|
||||
if(N GREATER ${CTEST_MAX_N})
|
||||
set(N ${CTEST_MAX_N})
|
||||
endif(N GREATER ${CTEST_MAX_N})
|
||||
set(CTEST_BUILD_FLAGS -j${N})
|
||||
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
|
||||
endif()
|
||||
|
||||
# -----------------------------------------------------------
|
||||
# -- Get environment
|
||||
# -----------------------------------------------------------
|
||||
## -- set hostname
|
||||
## --------------------------
|
||||
find_program (HOSTNAME_CMD NAMES hostname)
|
||||
exec_program (${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
|
||||
set (CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}")
|
||||
find_program (UNAME NAMES uname)
|
||||
macro (getuname name flag)
|
||||
exec_program ("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
|
||||
endmacro (getuname)
|
||||
|
||||
getuname (osname -s)
|
||||
getuname (osrel -r)
|
||||
getuname (cpu -m)
|
||||
|
||||
if (SITE_BUILDNAME_SUFFIX)
|
||||
set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}-${SITE_BUILDNAME_SUFFIX}")
|
||||
else (SITE_BUILDNAME_SUFFIX)
|
||||
set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
|
||||
endif (SITE_BUILDNAME_SUFFIX)
|
||||
# -----------------------------------------------------------
|
||||
|
||||
set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# MAC machines need special option
|
||||
#-----------------------------------------------------------------------------
|
||||
if (APPLE)
|
||||
# Compiler choice
|
||||
execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
SET(ENV{CC} "${XCODE_CC}")
|
||||
SET(ENV{CXX} "${XCODE_CXX}")
|
||||
# Shared fortran is not supported, build static
|
||||
set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
|
||||
set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
|
||||
endif (APPLE)
|
||||
|
||||
|
||||
# -----------------------------------------------------------
|
||||
find_package (Subversion)
|
||||
set (CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
|
||||
# -- Only clean build folder if LOCAL_CLEAR_BUILD is set
|
||||
if (LOCAL_CLEAR_BUILD)
|
||||
set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
|
||||
ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
|
||||
endif (LOCAL_CLEAR_BUILD)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Send the main script as a note.
|
||||
list (APPEND CTEST_NOTES_FILES
|
||||
"${CMAKE_CURRENT_LIST_FILE}"
|
||||
"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
|
||||
)
|
||||
|
||||
# Check for required variables.
|
||||
foreach (req
|
||||
CTEST_CMAKE_GENERATOR
|
||||
CTEST_SITE
|
||||
CTEST_BUILD_NAME
|
||||
)
|
||||
if (NOT DEFINED ${req})
|
||||
message(FATAL_ERROR "The containing script must set ${req}")
|
||||
endif (NOT DEFINED ${req})
|
||||
endforeach (req)
|
||||
|
||||
## -- set output to english
|
||||
set($ENV{LC_MESSAGES} "en_EN")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Initialize the CTEST commands
|
||||
#------------------------------
|
||||
set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
|
||||
set (CTEST_CONFIGURE_COMMAND
|
||||
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"")
|
||||
|
||||
# Print summary information.
|
||||
foreach (v
|
||||
CTEST_SITE
|
||||
CTEST_BUILD_NAME
|
||||
CTEST_SOURCE_DIRECTORY
|
||||
CTEST_BINARY_DIRECTORY
|
||||
CTEST_CMAKE_GENERATOR
|
||||
CTEST_BUILD_CONFIGURATION
|
||||
CTEST_CONFIGURE_COMMAND
|
||||
CTEST_SCRIPT_DIRECTORY
|
||||
)
|
||||
set (vars "${vars} ${v}=[${${v}}]\n")
|
||||
endforeach (v)
|
||||
message ("Dashboard script configuration:\n${vars}\n")
|
||||
|
||||
CTEST_START (${MODEL} TRACK ${MODEL})
|
||||
if (NOT LOCAL_SKIP_UPDATE)
|
||||
CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
|
||||
endif (NOT LOCAL_SKIP_UPDATE)
|
||||
CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
||||
if(NOT res STREQUAL "0")
|
||||
message (FATAL_ERROR "Configure FAILED")
|
||||
endif()
|
||||
message ("Configure DONE")
|
||||
CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
|
||||
if (NOT LOCAL_NO_SUBMIT)
|
||||
CTEST_SUBMIT (PARTS Update Configure Notes)
|
||||
endif (NOT LOCAL_NO_SUBMIT)
|
||||
CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res)
|
||||
if (NOT LOCAL_NO_SUBMIT)
|
||||
CTEST_SUBMIT (PARTS Build)
|
||||
endif (NOT LOCAL_NO_SUBMIT)
|
||||
if(NOT res STREQUAL "0")
|
||||
message (FATAL_ERROR "Build FAILED")
|
||||
endif()
|
||||
message ("build DONE")
|
||||
if (NOT LOCAL_SKIP_TEST)
|
||||
CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
|
||||
if (NOT LOCAL_NO_SUBMIT)
|
||||
CTEST_SUBMIT (PARTS Test)
|
||||
endif (NOT LOCAL_NO_SUBMIT)
|
||||
if(NOT res STREQUAL "0")
|
||||
message (FATAL_ERROR "Test FAILED")
|
||||
endif()
|
||||
message ("test DONE")
|
||||
endif (NOT LOCAL_SKIP_TEST)
|
||||
if(NOT LOCAL_MEMCHECK_TEST)
|
||||
##-----------------------------------------------
|
||||
## Package the product
|
||||
##-----------------------------------------------
|
||||
execute_process(COMMAND cpack -C ${CTEST_BUILD_CONFIGURATION} -V
|
||||
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
|
||||
RESULT_VARIABLE cpackResult
|
||||
OUTPUT_VARIABLE cpackLog
|
||||
ERROR_VARIABLE cpackLog.err
|
||||
)
|
||||
file(WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
|
||||
endif(NOT LOCAL_MEMCHECK_TEST)
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
message ("DONE")
|
||||
EOF
|
||||
|
||||
|
||||
# Run ctest
|
||||
ctest -S $cfgfile -C Release -V -O $ctest_log
|
||||
exit_code=$?
|
||||
if [ $exit_code = 0 ]; then
|
||||
echo CTest script completed without error
|
||||
else
|
||||
echo Error encountered CTest script
|
||||
fi
|
||||
# Using HDF5-*.sh because actual name is unavailable
|
||||
install_sh=HDF5-*.sh
|
||||
echo installing with $install_sh ...
|
||||
./$install_sh --skip-license > $install_log
|
||||
exit_code=$?
|
||||
if [ $exit_code = 0 ]; then
|
||||
echo Complete without error
|
||||
else
|
||||
echo Error encountered
|
||||
fi
|
||||
TIMESTAMP
|
||||
exit $exit_code
|
||||
|
||||
fi
|
||||
|
||||
|
||||
113
bin/compile
113
bin/compile
@@ -1,113 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Copyright by The HDF Group.
|
||||
# Copyright by the Board of Trustees of the University of Illinois.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This file is part of HDF5. The full HDF5 copyright notice, including
|
||||
# terms governing use, modification, and redistribution, is contained in
|
||||
# the files COPYING and Copyright.html. COPYING can be found at the root
|
||||
# of the source code distribution tree; Copyright.html can be found at the
|
||||
# root level of an installed copy of the electronic HDF5 document set and
|
||||
# is linked from the top-level documents page. It can also be found at
|
||||
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
|
||||
# access to either file, you may request a copy from help@hdfgroup.org.
|
||||
#
|
||||
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Usage:
|
||||
# compile PROGRAM [ARGS]...
|
||||
# `-o FOO.o' is removed from the args passed to the actual compile.
|
||||
|
||||
prog=$1
|
||||
shift
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
args=
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we do something ugly here.
|
||||
ofile=$2
|
||||
shift
|
||||
case "$ofile" in
|
||||
*.o | *.obj)
|
||||
;;
|
||||
*)
|
||||
args="$args -o $ofile"
|
||||
ofile=
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
args="$args $1"
|
||||
;;
|
||||
*)
|
||||
args="$args $1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$prog" $args
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir $lockdir > /dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir $lockdir; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$prog" $args
|
||||
status=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir $lockdir
|
||||
exit $status
|
||||
1526
bin/config.guess
vendored
1526
bin/config.guess
vendored
File diff suppressed because it is too large
Load Diff
1658
bin/config.sub
vendored
1658
bin/config.sub
vendored
File diff suppressed because it is too large
Load Diff
529
bin/depcomp
529
bin/depcomp
@@ -1,529 +0,0 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2005-02-09.22
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test -f "$tmpdepfile"; then :
|
||||
else
|
||||
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||
tmpdepfile="$stripped.u"
|
||||
fi
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
outname="$stripped.o"
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mecanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
0
bin/distdep
Normal file → Executable file
0
bin/distdep
Normal file → Executable file
@@ -1,65 +0,0 @@
|
||||
#!/bin/sh
|
||||
##
|
||||
## Copyright by the Board of Trustees of the University of Illinois.
|
||||
## All rights reserved.
|
||||
##
|
||||
## This file is part of HDF5. The full HDF5 copyright notice, including
|
||||
## terms governing use, modification, and redistribution, is contained in
|
||||
## the files COPYING and Copyright.html. COPYING can be found at the root
|
||||
## of the source code distribution tree; Copyright.html can be found at the
|
||||
## root level of an installed copy of the electronic HDF5 document set and
|
||||
## is linked from the top-level documents page. It can also be found at
|
||||
## http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have
|
||||
## access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
|
||||
##
|
||||
# regenerate hl/src/H5LTanalyze.c
|
||||
|
||||
# HDF5 currently uses the following versions of the bison flex:
|
||||
BISON_VERSION="bison (GNU Bison) 2.7"
|
||||
FLEX_VERSION="flex 2.5.37"
|
||||
|
||||
# If paths to bison flex are not specified by the user, assume tools are
|
||||
# running on jam in /mnt/hdf/packages and set paths accordingly.
|
||||
if test -z ${BISON}; then
|
||||
BISON=/usr/hdf/bin/bison
|
||||
fi
|
||||
if test -z ${FLEX}; then
|
||||
FLEX=/usr/hdf/bin/flex
|
||||
fi
|
||||
|
||||
# Check version numbers of all bison flex against the "correct" versions
|
||||
BI_VERS=`${BISON} --version 2>&1 | grep "^${BISON_VERSION}"`
|
||||
if test -z "${BI_VERS}"; then
|
||||
echo "${BISON} version is not ${BISON_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
FL_VERS=`${FLEX} --version 2>&1 | grep "^${FLEX_VERSION}"`
|
||||
if test -z "${FL_VERS}"; then
|
||||
echo "${FLEX} version is not ${FLEX_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure that the tools are in the path.
|
||||
BISON_DIR=`dirname ${BISON}`
|
||||
FLEX_DIR=`dirname ${FLEX}`
|
||||
|
||||
# Main body
|
||||
cd hl/src
|
||||
echo "Generate hl/src/H5LTparse.c from hl/src/H5LTparse.y"
|
||||
bison -pH5LTyy -o H5LTparse.c -d H5LTparse.y
|
||||
echo "Generate hl/src/H5LTanalyze.c from hl/src/H5LTanalyze.l"
|
||||
flex --nounistd -PH5LTyy -oH5LTanalyze.c H5LTanalyze.l
|
||||
|
||||
# fix H5LTparse.c to declare H5LTyyparse return type as an hid_t
|
||||
# instead of int. Currently the generated function H5LTyyparse is
|
||||
# generated with a return value of type int, which is a mapping to the
|
||||
# flex yyparse function. The return value in the HL library should be
|
||||
# an hid_t.
|
||||
# I propose to not use flex to generate this function, but for now I am
|
||||
# adding a perl command to find and replace this function declaration in
|
||||
# H5LTparse.c.
|
||||
perl -0777 -pi -e 's/int\nyyparse/hid_t\nyyparse/igs' H5LTparse.c
|
||||
perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' H5LTparse.c
|
||||
cd ../..
|
||||
|
||||
exit 0
|
||||
252
bin/genparser
Executable file
252
bin/genparser
Executable file
@@ -0,0 +1,252 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
# Copyright by The HDF Group.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This file is part of HDF5. The full HDF5 copyright notice, including
|
||||
# terms governing use, modification, and redistribution, is contained in
|
||||
# the files COPYING and Copyright.html. COPYING can be found at the root
|
||||
# of the source code distribution tree; Copyright.html can be found at the
|
||||
# root level of an installed copy of the electronic document set and is
|
||||
# linked from the top-level documents page. It can also be found at
|
||||
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access
|
||||
# to either file, you may request a copy from help@hdfgroup.org.
|
||||
#
|
||||
|
||||
# This script runs flex/lex and bison/yacc to generate parser code for
|
||||
# the high-level library. It used to be a part of autogen.sh, but many
|
||||
# people encountered problems with installing flex and bison on their
|
||||
# system and the parser code rarely changes, so those parts of the
|
||||
# script were moved to their own file.
|
||||
#
|
||||
# NOTE CAREFULLY!
|
||||
#
|
||||
# There is NO dependency in either the autotools or CMake to regenerate
|
||||
# the parser code. If you modify H5LT analyze.l or H5LTparse.y, you
|
||||
# will need to run this scrpit manually on a system with a suitable
|
||||
# lexer and parser generator.
|
||||
#
|
||||
# IMPORTANT OS X NOTE
|
||||
#
|
||||
# If you are using OS X, you will probably not have flex or bison
|
||||
# installed. In addtion, even if you do have bison installed, the bison
|
||||
# version you have installed may also have a bug that makes it unable to
|
||||
# process our input files.
|
||||
#
|
||||
# The easiest way to fix this is to install everything via Homebrew:
|
||||
#
|
||||
# http://brew.sh/
|
||||
#
|
||||
# After you install the base packages, install flex/bison.
|
||||
#
|
||||
# brew install flex
|
||||
# brew install bison
|
||||
#
|
||||
# END IMPORTANT OS X NOTE
|
||||
#
|
||||
# If you want to use a particular version of flex or bison, the paths
|
||||
# to each tool can be overridden using the following environment
|
||||
# variables:
|
||||
#
|
||||
# HDF5_FLEX
|
||||
# HDF5_BISON
|
||||
#
|
||||
# This script takes two potential options:
|
||||
#
|
||||
# -p
|
||||
#
|
||||
# When this is selected, the flex/bison versions are set to the paths
|
||||
# and versions used by The HDF Group to produce the released versions
|
||||
# of the library.
|
||||
#
|
||||
# NOTE: This is probably temporary. Once we update our dev machines
|
||||
# to have recent versions of the autotools this option will probably
|
||||
# be removed.
|
||||
#
|
||||
# -v
|
||||
#
|
||||
# This emits some extra information, mainly tool versions.
|
||||
|
||||
echo
|
||||
echo "*******************************************"
|
||||
echo "* HDF5 high-level parser generator script *"
|
||||
echo "*******************************************"
|
||||
echo
|
||||
|
||||
# Default is not verbose output
|
||||
verbose=false
|
||||
|
||||
optspec=":hpv-"
|
||||
while getopts "$optspec" optchar; do
|
||||
case "${optchar}" in
|
||||
h)
|
||||
echo "usage: $0 [OPTIONS] /path/to/hl/src/directory"
|
||||
echo
|
||||
echo " -h Print this help message."
|
||||
echo
|
||||
echo " -p Used by THG to use hard-codes flex/bison"
|
||||
echo " paths on THG machines. Not for non-HDF-Group"
|
||||
echo " users!"
|
||||
echo
|
||||
echo " -v Show more verbose output."
|
||||
echo
|
||||
echo " NOTE: Each tool can be set via an environment variable."
|
||||
echo " These are documented inside this script."
|
||||
echo
|
||||
exit 0
|
||||
;;
|
||||
p)
|
||||
echo "Setting THG production mode..."
|
||||
echo
|
||||
production=true
|
||||
;;
|
||||
v)
|
||||
echo "Setting verbosity: high"
|
||||
echo
|
||||
verbose=true
|
||||
;;
|
||||
*)
|
||||
if [ "$OPTERR" != 1 ] || [ "${optspec:0:1}" = ":" ]; then
|
||||
echo "Non-option argument: '-${OPTARG}'" >&2
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Get the path to the hl src directory
|
||||
shift $(($OPTIND - 1))
|
||||
path_to_hl_src=$1
|
||||
if test -z ${path_to_hl_src}; then
|
||||
echo "*** ERROR *** - Path to hl/src not set"
|
||||
echo "Please add the path to the hl/src directory as a parameter"
|
||||
echo "See $0 -h for more help."
|
||||
echo
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ "$production" = true ] ; then
|
||||
|
||||
# Production mode
|
||||
#
|
||||
# Hard-code canonical HDF Group tool locations.
|
||||
|
||||
# If paths to tools are not specified, assume they are
|
||||
# located in /usr/hdf/bin/AUTOTOOLS and set paths accordingly.
|
||||
if test -z ${HDF5_BISON}; then
|
||||
HDF5_BISON=/usr/hdf/bin/AUTOTOOLS/bison
|
||||
fi
|
||||
if test -z ${HDF5_FLEX}; then
|
||||
HDF5_FLEX=/usr/hdf/bin/AUTOTOOLS/flex
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
# Not in production mode
|
||||
#
|
||||
# If paths to autotools are not specified, use whatever the system
|
||||
# has installed as the default. We use 'which <tool>' to
|
||||
# show exactly what's being used.
|
||||
if test -z ${HDF5_BISON}; then
|
||||
HDF5_BISON=$(which bison)
|
||||
fi
|
||||
if test -z ${HDF5_FLEX}; then
|
||||
HDF5_FLEX=$(which flex)
|
||||
fi
|
||||
|
||||
fi # production
|
||||
|
||||
# Make sure that these versions of the tools are in the path
|
||||
BISON_DIR=`dirname ${HDF5_BISON}`
|
||||
FLEX_DIR=`dirname ${HDF5_FLEX}`
|
||||
PATH=${FLEX_DIR}:${BISON_DIR}:$PATH
|
||||
|
||||
# Run flex and bison
|
||||
# automatically generates hl/src/H5LTanalyze.c and hl/src/H5LTparse.c
|
||||
# Note that, as of Xcode 6.1 (2015), the default bison version on OS X
|
||||
# is old enough to have the circular dependency bug. You'll have
|
||||
# to install a later version of bison. See the OS X note at the top
|
||||
# of this script.
|
||||
echo
|
||||
echo "Generating H5LT parser code (requires yacc/bison):"
|
||||
echo "Generate hl/src/H5LTparse.c from hl/src/H5LTparse.y"
|
||||
# HDF5_BISON is set via the environment or 'which bison', above
|
||||
if test -z ${HDF5_BISON}; then
|
||||
echo
|
||||
echo "*************************"
|
||||
echo " ERROR - bison not found"
|
||||
echo "*************************"
|
||||
echo "bison is required to generate parser code in H5LT"
|
||||
echo
|
||||
exit 127
|
||||
fi
|
||||
if [ "$verbose" = true ] ; then
|
||||
${HDF5_BISON} --version
|
||||
fi
|
||||
${HDF5_BISON} -pH5LTyy -o ${path_to_hl_src}/H5LTparse.c -d ${path_to_hl_src}/H5LTparse.y
|
||||
|
||||
echo
|
||||
echo "Generating H5LT lexer code (requires lex/flex):"
|
||||
echo "Generate hl/src/H5LTanalyze.c from hl/src/H5LTanalyze.l"
|
||||
# HDF5_FLEX is set via the environment or 'which flex', above
|
||||
if test -z ${HDF5_FLEX}; then
|
||||
echo
|
||||
echo "************************"
|
||||
echo " ERROR - flex not found"
|
||||
echo "************************"
|
||||
echo "flex is required to generate lexer code in H5LT"
|
||||
echo
|
||||
exit 127
|
||||
fi
|
||||
if [ "$verbose" = true ] ; then
|
||||
${HDF5_FLEX} --version
|
||||
fi
|
||||
${HDF5_FLEX} --nounistd -PH5LTyy -o ${path_to_hl_src}/H5LTanalyze.c ${path_to_hl_src}/H5LTanalyze.l
|
||||
|
||||
# fix H5LTparse.c to declare H5LTyyparse return type as an hid_t
|
||||
# instead of int. Currently the generated function H5LTyyparse is
|
||||
# generated with a return value of type int, which is a mapping to the
|
||||
# flex yyparse function. The return value in the HL library should be
|
||||
# an hid_t.
|
||||
# I propose to not use flex to generate this function, but for now I am
|
||||
# adding a perl command to find and replace this function declaration in
|
||||
# H5LTparse.c.
|
||||
perl -0777 -pi -e 's/int yyparse/hid_t yyparse/igs' ${path_to_hl_src}/H5LTparse.c
|
||||
perl -0777 -pi -e 's/int\nyyparse/hid_t\nyyparse/igs' ${path_to_hl_src}/H5LTparse.c
|
||||
perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' ${path_to_hl_src}/H5LTparse.c
|
||||
|
||||
# Add code that disables warnings in the flex/bison-generated code.
|
||||
#
|
||||
# Note that the GCC pragmas did not exist until gcc 4.2. Earlier versions
|
||||
# will simply ignore them, but we want to avoid those warnings.
|
||||
for f in ${path_to_hl_src}/H5LTparse.c ${path_to_hl_src}/H5LTanalyze.c
|
||||
do
|
||||
echo '#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2 ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wconversion" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wmissing-prototypes" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wnested-externs" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wold-style-definition" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wredundant-decls" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wsign-compare" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wsign-conversion" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wstrict-overflow" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wstrict-prototypes" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wswitch-default" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wunused-function" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wunused-macros" ' >> tmp.out
|
||||
echo '#pragma GCC diagnostic ignored "-Wunused-parameter" ' >> tmp.out
|
||||
echo '#elif defined __SUNPRO_CC ' >> tmp.out
|
||||
echo '#pragma disable_warn ' >> tmp.out
|
||||
echo '#elif defined _MSC_VER ' >> tmp.out
|
||||
echo '#pragma warning(push, 1) ' >> tmp.out
|
||||
echo '#endif ' >> tmp.out
|
||||
|
||||
cat $f >> tmp.out
|
||||
mv tmp.out $f
|
||||
done
|
||||
|
||||
echo
|
||||
exit 0
|
||||
|
||||
67
bin/h5vers
67
bin/h5vers
@@ -159,10 +159,10 @@ while ($_ = shift) {
|
||||
die "mutually exclusive options given\n" if $set && $inc;
|
||||
|
||||
# Determine file to use as H5public.h, README.txt,
|
||||
# release_docs/RELEASE.txt, configure.ac, windows/src/H5pubconf.h,
|
||||
# vms/src/h5pubconf.h and config/lt_vers.am.
|
||||
# release_docs/RELEASE.txt, configure.ac, windows/src/H5pubconf.h
|
||||
# and config/lt_vers.am.
|
||||
# The README.txt, release_docs/RELEASE.txt, configure.ac,
|
||||
# vms/src/h5pubconf.h, windows/src/H5pubconf.h, and config/lt_vers.am
|
||||
# windows/src/H5pubconf.h, and config/lt_vers.am
|
||||
# files are always in the directory above H5public.h
|
||||
unless ($file) {
|
||||
for (@files) {
|
||||
@@ -187,10 +187,10 @@ die "unable to read file: $RELEASE\n" unless -r $file;
|
||||
my $CONFIGURE = $file;
|
||||
$CONFIGURE =~ s/[^\/]*$/..\/configure.ac/;
|
||||
die "unable to read file: $CONFIGURE\n" unless -r $file;
|
||||
# vms/src/h5pubconf.h
|
||||
my $H5VMSPUBCONF = $file;
|
||||
$H5VMSPUBCONF =~ s/[^\/]*$/..\/vms\/src\/h5pubconf.h/;
|
||||
die "unable to read file: $H5VMSPUBCONF\n" unless -r $file;
|
||||
# cpp_doc_config
|
||||
my $CPP_DOC_CONFIG = $file;
|
||||
$CPP_DOC_CONFIG =~ s/[^\/]*$/..\/c++\/src\/cpp_doc_config/;
|
||||
die "unable to read file: $CPP_DOC_CONFIG\n" unless -r $file;
|
||||
|
||||
# Get the current version number.
|
||||
open FILE, $file or die "unable to open $file: $!\n";
|
||||
@@ -238,8 +238,8 @@ if ($set) {
|
||||
$README = "";
|
||||
$RELEASE = "";
|
||||
$CONFIGURE = "";
|
||||
$H5VMSPUBCONF = "";
|
||||
$LT_VERS = "";
|
||||
$CPP_DOC_CONFIG = "";
|
||||
$LT_VERS = "";
|
||||
@newver = @curver;
|
||||
}
|
||||
|
||||
@@ -314,6 +314,46 @@ if ($RELEASE) {
|
||||
close FILE;
|
||||
}
|
||||
|
||||
# Update the c++/src/cpp_doc_config file
|
||||
if ($CPP_DOC_CONFIG) {
|
||||
my $data = read_file($CPP_DOC_CONFIG);
|
||||
my $version_string = sprintf("\"%d.%d.%d%s %s\"",
|
||||
@newver[0,1,2],
|
||||
$newver[3] eq "" ? "" : "-".$newver[3],
|
||||
"currently under development");
|
||||
|
||||
$data =~ s/PROJECT_NUMBER\s*=.*/PROJECT_NUMBER = $version_string/;
|
||||
|
||||
write_file($CPP_DOC_CONFIG, $data);
|
||||
}
|
||||
|
||||
# helper function to read the file for updating c++/src/cpp_doc_config file.
|
||||
# The version string in that file is not at the top, so the string replacement
|
||||
# is not for the first line, and reading/writing the entire file as one string
|
||||
# facilitates the substring replacement.
|
||||
sub read_file {
|
||||
my ($filename) = @_;
|
||||
|
||||
open my $in, $filename or die "Could not open '$filename' for reading $!";
|
||||
local $/ = undef;
|
||||
my $all = <$in>;
|
||||
close $in;
|
||||
|
||||
return $all;
|
||||
}
|
||||
|
||||
# helper function to write the file for updating c++/src/cpp_doc_config file.
|
||||
sub write_file {
|
||||
my ($filename, $content) = @_;
|
||||
|
||||
open my $out, ">$filename" or die "Could not open '$filename' for writing $!";;
|
||||
print $out $content;
|
||||
close $out;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
sub gen_configure {
|
||||
my ($name, $conf) = @_;
|
||||
|
||||
@@ -337,12 +377,12 @@ sub gen_configure {
|
||||
$conf =~ /^(.*?)\/?configure.ac$/;
|
||||
|
||||
if ($1) {
|
||||
$rc = system("cd $1 && bin/reconfigure >/dev/null 2>/dev/null && rm -rf autom4te.cache");
|
||||
$rc = system("cd $1 && ./autogen.sh -p >/dev/null 2>/dev/null && rm -rf autom4te.cache");
|
||||
} else {
|
||||
$rc = system("bin/reconfigure >/dev/null 2>/dev/null && rm -rf autom4te.cache");
|
||||
$rc = system("./autogen.sh -p >/dev/null 2>/dev/null && rm -rf autom4te.cache");
|
||||
}
|
||||
if ($rc) {
|
||||
printf("bin/reconfigure failed with exit code %d. Aborted.\n", $rc);
|
||||
printf("./autogen.sh -p failed with exit code %d. Aborted.\n", $rc);
|
||||
exit 1;
|
||||
}
|
||||
}
|
||||
@@ -387,9 +427,6 @@ sub gen_h5pubconf {
|
||||
close FILE;
|
||||
}
|
||||
|
||||
# Update the VMS-maintained h5pubconf.h file
|
||||
gen_h5pubconf("HDF5", $H5VMSPUBCONF, @newver) if $H5VMSPUBCONF;
|
||||
|
||||
# Print the new version number
|
||||
if ($verbose) {
|
||||
printf("version %d.%d release %d%s\n", @newver[0,1,2],
|
||||
|
||||
520
bin/install-sh
520
bin/install-sh
@@ -1,520 +0,0 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dst_arg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
@@ -67,33 +67,6 @@ case "$OSname" in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
IRIX)
|
||||
swpaths="/afs/ncsa/packages/hdf/IRIX_6.5"
|
||||
;;
|
||||
IRIX64)
|
||||
case "$CC" in
|
||||
cc|"") #default cc
|
||||
abi=`cc -show_defaults 2>&1 | grep 'default abi'`
|
||||
case $abi in
|
||||
*-n32)
|
||||
swpaths="/afs/ncsa/packages/hdf/IRIX64-n32_6.5"
|
||||
;;
|
||||
*-64)
|
||||
swpaths="/afs/ncsa/packages/hdf/IRIX64_6.5"
|
||||
;;
|
||||
*)
|
||||
swpaths="/afs/ncsa/packages/hdf/IRIX64_6.5"
|
||||
;;
|
||||
esac # $abi
|
||||
;;
|
||||
*-n32)
|
||||
swpaths="/afs/ncsa/packages/hdf/IRIX64-n32_6.5"
|
||||
;;
|
||||
*)
|
||||
swpaths="/afs/ncsa/packages/hdf/IRIX64_6.5"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
Linux)
|
||||
swpaths="/afs/ncsa/packages/hdf/Linux"
|
||||
;;
|
||||
@@ -150,36 +123,6 @@ case "$OSname" in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
IRIX)
|
||||
swpaths="/afs/ncsa/packages/hdf5/IRIX_6.5"
|
||||
;;
|
||||
IRIX64)
|
||||
case "$CC" in
|
||||
cc|"") #default cc
|
||||
abi=`cc -show_defaults 2>&1 | grep 'default abi'`
|
||||
case $abi in
|
||||
*-n32)
|
||||
swpaths="/afs/ncsa/packages/hdf5/IRIX64-n32_6.5"
|
||||
;;
|
||||
*-64)
|
||||
#swpaths="/afs/ncsa/packages/hdf5/IRIX64_6.5"
|
||||
swpaths="/afs/ncsa/packages/hdf5/5-1.4.3-irix64"
|
||||
;;
|
||||
*)
|
||||
#swpaths="/afs/ncsa/packages/hdf5/IRIX64_6.5"
|
||||
swpaths="/afs/ncsa/packages/hdf5/5-1.4.3-irix64"
|
||||
;;
|
||||
esac # $abi
|
||||
;;
|
||||
*-n32)
|
||||
swpaths="/afs/ncsa/packages/hdf5/IRIX64-n32_6.5"
|
||||
;;
|
||||
*)
|
||||
#swpaths="/afs/ncsa/packages/hdf5/IRIX64_6.5"
|
||||
swpaths="/afs/ncsa/packages/hdf5/5-1.4.3-irix64"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
Linux)
|
||||
swpaths="/afs/ncsa/packages/hdf5/Linux"
|
||||
;;
|
||||
|
||||
9655
bin/ltmain.sh
9655
bin/ltmain.sh
File diff suppressed because it is too large
Load Diff
12
bin/make_err
12
bin/make_err
@@ -175,6 +175,12 @@ sub create_public ($) {
|
||||
print_warning(*HEADER);
|
||||
print_startprotect(*HEADER, $file);
|
||||
|
||||
# Begin extern C block
|
||||
print HEADER "\n";
|
||||
print HEADER "#ifdef __cplusplus\n";
|
||||
print HEADER "extern \"C\" {\n";
|
||||
print HEADER "#endif\n";
|
||||
|
||||
# Iterate over all the major errors
|
||||
print HEADER "\n/*********************/\n";
|
||||
print HEADER "/* Major error codes */\n";
|
||||
@@ -202,6 +208,12 @@ sub create_public ($) {
|
||||
}
|
||||
}
|
||||
|
||||
# End extern C block
|
||||
print HEADER "\n";
|
||||
print HEADER "#ifdef __cplusplus\n";
|
||||
print HEADER "}\n";
|
||||
print HEADER "#endif\n";
|
||||
|
||||
print_endprotect(*HEADER, $file);
|
||||
|
||||
# Close header file
|
||||
|
||||
215
bin/missing
215
bin/missing
@@ -1,215 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
@@ -1,101 +0,0 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
# $Id$
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case "${1}" in
|
||||
-h | --help | --h* ) # -h for help
|
||||
echo "${usage}" 1>&2; exit 0 ;;
|
||||
-m ) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
|
||||
dirmode="${1}"
|
||||
shift ;;
|
||||
-- ) shift; break ;; # stop option processing
|
||||
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
|
||||
* ) break ;; # first non-opt arg
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
fi ;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
fi ;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 3
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
||||
152
bin/reconfigure
152
bin/reconfigure
@@ -1,152 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Copyright by the Board of Trustees of the University of Illinois.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This file is part of HDF5. The full HDF5 copyright notice, including
|
||||
# terms governing use, modification, and redistribution, is contained in
|
||||
# the files COPYING and Copyright.html. COPYING can be found at the root
|
||||
# of the source code distribution tree; Copyright.html can be found at the
|
||||
# root level of an installed copy of the electronic HDF5 document set and
|
||||
# is linked from the top-level documents page. It can also be found at
|
||||
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
|
||||
# access to either file, you may request a copy from help@hdfgroup.org.
|
||||
#
|
||||
|
||||
# A script to reconfigure autotools for HDF5, and to recreate other
|
||||
# generated files specifc to HDF5.
|
||||
# If the paths of the autotools are not specified by the user, they
|
||||
# are hardcoded to point to their locations on HDF5 Linux machines.
|
||||
# Users can specify the locations of the autotools with the following
|
||||
# variables:
|
||||
# AUTOCONF, AUTOMAKE, ACLOCAL, AUTOHEADER should be the path to the
|
||||
# corresponding tools.
|
||||
# LIBTOOL_DIR should be the path to the base libtool directory;
|
||||
# $LIBTOOL_DIR/bin/libtool should invoke libtool, while
|
||||
# $LIBTOOL_DIR/share/aclocal needs to be included by aclocal.
|
||||
# Be very careful when specifying these tools manually! There are a lot
|
||||
# of versions that can get confused (not even counting the m4 utility)!
|
||||
|
||||
# HDF5 currently uses the following versions of the autotools:
|
||||
AUTOCONF_VERSION="autoconf (GNU Autoconf) 2.69"
|
||||
AUTOMAKE_VERSION="automake (GNU automake) 1.14.1"
|
||||
AUTOHEADER_VERSION="autoheader (GNU Autoconf) 2.69"
|
||||
ACLOCAL_VERSION="aclocal (GNU automake) 1.14.1"
|
||||
LIBTOOL_VERSION="(GNU libtool) 2.4.2"
|
||||
M4_VERSION="m4 (GNU M4) 1.4.17"
|
||||
|
||||
#
|
||||
# When upgrading automake's version, don't forget to also update its
|
||||
# helper utilities, especially depcomp.
|
||||
|
||||
|
||||
# If paths to autotools are not specified by the user, assume tools are
|
||||
# running on jam in /mnt/hdf/packages and set paths accordingly.
|
||||
if test -z ${AUTORECONF}; then
|
||||
AUTORECONF=/mnt/hdf/packages/autoconf/autoconf-2.69/bin/autoreconf
|
||||
fi
|
||||
if test -z ${AUTOCONF}; then
|
||||
AUTOCONF=/mnt/hdf/packages/autoconf/autoconf-2.69/bin/autoconf
|
||||
fi
|
||||
if test -z ${AUTOMAKE}; then
|
||||
AUTOMAKE=/mnt/hdf/packages/automake/automake-1.14.1/bin/automake-1.14
|
||||
fi
|
||||
if test -z ${AUTOHEADER}; then
|
||||
AUTOHEADER=/mnt/hdf/packages/autoconf/autoconf-2.69/bin/autoheader
|
||||
fi
|
||||
if test -z ${ACLOCAL}; then
|
||||
ACLOCAL=/mnt/hdf/packages/automake/automake-1.14.1/bin/aclocal-1.14
|
||||
fi
|
||||
if test -z ${LIBTOOL}; then
|
||||
LIBTOOL=/mnt/hdf/packages/libtool/libtool-2.4.2/bin/libtool
|
||||
fi
|
||||
if test -z ${M4}; then
|
||||
M4=/mnt/hdf/packages/m4/m4-1.4.17/bin/m4
|
||||
fi
|
||||
|
||||
# Check version numbers of all autotools against the "correct" versions
|
||||
AC_VERS=`${AUTOCONF} --version 2>&1 | grep "^${AUTOCONF_VERSION}"`
|
||||
if test -z "${AC_VERS}"; then
|
||||
echo "${AUTOCONF} version is not ${AUTOCONF_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
AM_VERS=`${AUTOMAKE} --version 2>&1 | grep "^${AUTOMAKE_VERSION}"`
|
||||
if test -z "${AM_VERS}"; then
|
||||
echo "${AUTOMAKE} version is not ${AUTOMAKE_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
AH_VERS=`${AUTOHEADER} --version 2>&1 | grep "^${AUTOHEADER_VERSION}"`
|
||||
if test -z "${AH_VERS}"; then
|
||||
echo "${AUTOHEADER} version is not ${AUTOHEADER_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
AL_VERS=`${ACLOCAL} --version 2>&1 | grep "^${ACLOCAL_VERSION}"`
|
||||
if test -z "${AL_VERS}"; then
|
||||
echo "${ACLOCAL} version is not ${ACLOCAL_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
LT_VERS=`${LIBTOOL} --version 2>&1 | grep "${LIBTOOL_VERSION}"`
|
||||
if test -z "${LT_VERS}"; then
|
||||
echo "${LIBTOOL} version is not ${LIBTOOL_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
M4_VERS=`${M4} --version 2>&1 | grep "${M4_VERSION}"`
|
||||
if test -z "${M4_VERS}"; then
|
||||
echo "${M4} version is not ${M4_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure that the tools are in the path.
|
||||
AUTOCONF_DIR=`dirname ${AUTOCONF}`
|
||||
LIBTOOL_DIR=`dirname ${LIBTOOL}`
|
||||
M4_DIR=`dirname ${M4}`
|
||||
PATH=${AUTOCONF_DIR}:${M4_DIR}:$PATH
|
||||
|
||||
# Run autoconf/automake commands in order
|
||||
echo ${ACLOCAL} -I ${LIBTOOL_DIR}/../share/aclocal
|
||||
${ACLOCAL} -I ${LIBTOOL_DIR}/../share/aclocal || exit 1
|
||||
|
||||
echo ${AUTOHEADER}
|
||||
${AUTOHEADER} || exit 1
|
||||
|
||||
echo ${AUTOMAKE} --add-missing
|
||||
${AUTOMAKE} --add-missing || exit 1
|
||||
|
||||
echo ${AUTOCONF}
|
||||
${AUTOCONF} || exit 1
|
||||
|
||||
# Clean up top-level Makefile.in
|
||||
# pmake wants an argument to be the first non-comment line it encounters
|
||||
# in the Makefile. Automake wants to reorganize the Makefile.
|
||||
# To work around this, we post-process the top-level Makefile.in.
|
||||
sed "s/^#xxx//" Makefile.in > Makefile.in.new
|
||||
mv Makefile.in.new Makefile.in
|
||||
|
||||
# Run trace script
|
||||
# The trace script adds H5TRACE macros to library source files. It should
|
||||
# have no effect on files that don't have HDF5 API macros in them.
|
||||
echo
|
||||
echo " Running trace script:"
|
||||
bin/trace src/H5*.c || exit 1
|
||||
|
||||
# Run make_err
|
||||
# make_err automatically generates the H5E headers that create error message
|
||||
# types for HDF5.
|
||||
echo
|
||||
echo " Running error generation script:"
|
||||
bin/make_err src/H5err.txt || exit 1
|
||||
|
||||
# Run make_vers
|
||||
# make_vers automatically generates the public headers that define the API version
|
||||
# macros for HDF5.
|
||||
echo
|
||||
echo " Running API version generation script:"
|
||||
bin/make_vers src/H5vers.txt || exit 1
|
||||
|
||||
# Run flex
|
||||
# automatically generates the lexical file for hl/src/H5LTanalyze.c
|
||||
echo
|
||||
echo " Running flex generation script:"
|
||||
bin/genltanalyze || exit 1
|
||||
|
||||
exit 0
|
||||
26
bin/release
26
bin/release
@@ -50,31 +50,33 @@ Usage: $0 -d <dir> [-h] [--nocheck] [--private] <methods> ...
|
||||
This must be run at the top level of the source directory.
|
||||
The other command-line options are the names of the programs to use
|
||||
for compressing the resulting tar archive (if none are given then
|
||||
"tar md5" is assumed):
|
||||
"tar" is assumed):
|
||||
|
||||
tar -- use tar and don't do any compressing.
|
||||
gzip -- use gzip with "-9" and append ".gz" to the output name.
|
||||
bzip2 -- use bzip2 with "-9" and append ".bz2" to the output name.
|
||||
zip -- convert all text files to DOS style and form a zip file for Windows use.
|
||||
md5 -- produce a md5 checksum in addition to the archive.
|
||||
doc -- produce the latest doc tree in addition to the archive.
|
||||
|
||||
An md5 checksum is produced for each archive created and stored in the md5 file.
|
||||
|
||||
Examples:
|
||||
|
||||
$ bin/release -d /tmp
|
||||
/tmp/hdf5-1.8.13-RELEASE.txt
|
||||
/tmp/hdf5-1.8.13.md5
|
||||
/tmp/hdf5-1.8.13.tar
|
||||
/tmp/hdf5-1.8.13.tar.md5
|
||||
|
||||
$ bin/release -d /tmp gzip
|
||||
/tmp/hdf5-1.8.13-RELEASE.txt
|
||||
/tmp/hdf5-1.8.13.md5
|
||||
/tmp/hdf5-1.8.13.tar.gz
|
||||
|
||||
$ bin/release -d /tmp tar gzip zip md5
|
||||
$ bin/release -d /tmp tar gzip zip
|
||||
/tmp/hdf5-1.8.13-RELEASE.txt
|
||||
/tmp/hdf5-1.8.13.md5
|
||||
/tmp/hdf5-1.8.13.tar
|
||||
/tmp/hdf5-1.8.13.tar.gz
|
||||
/tmp/hdf5-1.8.13.tar.md5
|
||||
/tmp/hdf5-1.8.13.tar.zip
|
||||
|
||||
EOF
|
||||
@@ -212,9 +214,9 @@ while [ -n "$1" ]; do
|
||||
esac
|
||||
done
|
||||
|
||||
# Default methods are tar and md5
|
||||
# Default method is tar
|
||||
if [ "X$methods" = "X" ]; then
|
||||
methods="tar md5"
|
||||
methods="tar"
|
||||
fi
|
||||
|
||||
# Create the temporay work directory.
|
||||
@@ -289,26 +291,28 @@ test "$verbose" && echo " Running tar..." 1>&2
|
||||
)
|
||||
|
||||
# Compress
|
||||
MD5file=$HDF5_VERS.md5
|
||||
cp /dev/null $DEST/$MD5file
|
||||
for comp in $methods; do
|
||||
case $comp in
|
||||
tar)
|
||||
cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar
|
||||
(cd $DEST; md5sum $HDF5_VERS.tar >> $MD5file)
|
||||
;;
|
||||
gzip)
|
||||
test "$verbose" && echo " Running gzip..." 1>&2
|
||||
gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz
|
||||
(cd $DEST; md5sum $HDF5_VERS.tar.gz >> $MD5file)
|
||||
;;
|
||||
bzip2)
|
||||
test "$verbose" && echo " Running bzip2..." 1>&2
|
||||
bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2
|
||||
(cd $DEST; md5sum $HDF5_VERS.tar.bz2 >> $MD5file)
|
||||
;;
|
||||
zip)
|
||||
test "$verbose" && echo " Creating zip ball..." 1>&2
|
||||
tar2zip $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2
|
||||
;;
|
||||
md5)
|
||||
test "$verbose" && echo " Creating checksum..." 1>&2
|
||||
(cd $tmpdir; md5sum $HDF5_VERS.tar ) > $DEST/$HDF5_VERS.tar.md5
|
||||
(cd $DEST; md5sum $HDF5_VERS.zip >> $MD5file)
|
||||
;;
|
||||
doc)
|
||||
test "$verbose" && echo " Creating docs..." 1>&2
|
||||
|
||||
@@ -67,8 +67,8 @@ ReleaseDir_default=release_dir
|
||||
ZLIB_default=
|
||||
ZLIB=$ZLIB_default
|
||||
|
||||
# What compression methods to use? (md5 does checksum).
|
||||
METHODS="gzip zip bzip2 md5 doc"
|
||||
# What compression methods to use?
|
||||
METHODS="gzip zip bzip2 doc"
|
||||
|
||||
# Use User's MAKE if set. Else use generic make.
|
||||
MAKE=${MAKE:-make}
|
||||
|
||||
83
bin/switch_maint_mode
Executable file
83
bin/switch_maint_mode
Executable file
@@ -0,0 +1,83 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright by The HDF Group.
|
||||
# Copyright by the Board of Trustees of the University of Illinois.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This file is part of HDF5. The full HDF5 copyright notice, including
|
||||
# terms governing use, modification, and redistribution, is contained in
|
||||
# the files COPYING and Copyright.html. COPYING can be found at the root
|
||||
# of the source code distribution tree; Copyright.html can be found at the
|
||||
# root level of an installed copy of the electronic HDF5 document set and
|
||||
# is linked from the top-level documents page. It can also be found at
|
||||
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
|
||||
# access to either file, you may request a copy from help@hdfgroup.org.
|
||||
#
|
||||
# Switch AM_MAINTAINER_MODE value in configure.ac
|
||||
# Usage: See USAGE()
|
||||
# Programmer: Dana Robinson
|
||||
# Creation date: January 2016
|
||||
|
||||
USAGE()
|
||||
{
|
||||
cat <<EOF
|
||||
|
||||
switch_maint_mode reverses the status of AM_MAINTAINER_MODE in
|
||||
configure.ac from enable to disable or vice-versa. When enabled,
|
||||
this feature forces the autotools to run when the input files are
|
||||
older than the output files. This is the default for development
|
||||
branches. When disabled, the autotools will NOT be re-run regardless
|
||||
of their timestamps or any modifications. This is the default for
|
||||
tarballs and release branches since it avoids having end-users
|
||||
requiring the autotools.
|
||||
|
||||
Command Syntax
|
||||
==============
|
||||
switch_maint_mode [-help] [-enable|disable] <path-to-configure.ac>
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
MODE="notset"
|
||||
CONFIG_AC_PATH=
|
||||
|
||||
# Display help/usage if any options were passed in
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-enable)
|
||||
MODE="enable"
|
||||
;;
|
||||
-disable)
|
||||
MODE="disable"
|
||||
;;
|
||||
-help)
|
||||
USAGE
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
CONFIG_AC_PATH="$1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Did we get a file path?
|
||||
if test -z $CONFIG_AC_PATH ; then
|
||||
USAGE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Did we get a mode?
|
||||
if test -z $MODE ; then
|
||||
USAGE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run perl over configure.ac
|
||||
if test "X-$MODE" = "X-enable" ; then
|
||||
perl -pi -e 's/^(AM_MAINTAINER_MODE\(\[)([a-z]+)(\]\))/$1enable$3/g' $CONFIG_AC_PATH
|
||||
fi
|
||||
if test "X-$MODE" = "X-disable" ; then
|
||||
perl -pi -e 's/^(AM_MAINTAINER_MODE\(\[)([a-z]+)(\]\))/$1disable$3/g' $CONFIG_AC_PATH
|
||||
fi
|
||||
|
||||
139
bin/test-driver
139
bin/test-driver
@@ -1,139 +0,0 @@
|
||||
#! /bin/sh
|
||||
# test-driver - basic testsuite driver script.
|
||||
|
||||
scriptversion=2013-07-13.22; # UTC
|
||||
|
||||
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
# Make unconditional expansion of undefined variables an error. This
|
||||
# helps a lot in preventing typo-related bugs.
|
||||
set -u
|
||||
|
||||
usage_error ()
|
||||
{
|
||||
echo "$0: $*" >&2
|
||||
print_usage >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
print_usage ()
|
||||
{
|
||||
cat <<END
|
||||
Usage:
|
||||
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
|
||||
[--expect-failure={yes|no}] [--color-tests={yes|no}]
|
||||
[--enable-hard-errors={yes|no}] [--]
|
||||
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
|
||||
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
||||
END
|
||||
}
|
||||
|
||||
test_name= # Used for reporting.
|
||||
log_file= # Where to save the output of the test script.
|
||||
trs_file= # Where to save the metadata of the test run.
|
||||
expect_failure=no
|
||||
color_tests=no
|
||||
enable_hard_errors=yes
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
--help) print_usage; exit $?;;
|
||||
--version) echo "test-driver $scriptversion"; exit $?;;
|
||||
--test-name) test_name=$2; shift;;
|
||||
--log-file) log_file=$2; shift;;
|
||||
--trs-file) trs_file=$2; shift;;
|
||||
--color-tests) color_tests=$2; shift;;
|
||||
--expect-failure) expect_failure=$2; shift;;
|
||||
--enable-hard-errors) enable_hard_errors=$2; shift;;
|
||||
--) shift; break;;
|
||||
-*) usage_error "invalid option: '$1'";;
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
missing_opts=
|
||||
test x"$test_name" = x && missing_opts="$missing_opts --test-name"
|
||||
test x"$log_file" = x && missing_opts="$missing_opts --log-file"
|
||||
test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
|
||||
if test x"$missing_opts" != x; then
|
||||
usage_error "the following mandatory options are missing:$missing_opts"
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
usage_error "missing argument"
|
||||
fi
|
||||
|
||||
if test $color_tests = yes; then
|
||||
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
|
||||
red='[0;31m' # Red.
|
||||
grn='[0;32m' # Green.
|
||||
lgn='[1;32m' # Light green.
|
||||
blu='[1;34m' # Blue.
|
||||
mgn='[0;35m' # Magenta.
|
||||
std='[m' # No color.
|
||||
else
|
||||
red= grn= lgn= blu= mgn= std=
|
||||
fi
|
||||
|
||||
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
|
||||
trap "st=129; $do_exit" 1
|
||||
trap "st=130; $do_exit" 2
|
||||
trap "st=141; $do_exit" 13
|
||||
trap "st=143; $do_exit" 15
|
||||
|
||||
# Test script is run here.
|
||||
"$@" >$log_file 2>&1
|
||||
estatus=$?
|
||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||
estatus=1
|
||||
fi
|
||||
|
||||
case $estatus:$expect_failure in
|
||||
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
|
||||
0:*) col=$grn res=PASS recheck=no gcopy=no;;
|
||||
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
|
||||
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
|
||||
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
|
||||
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
|
||||
esac
|
||||
|
||||
# Report outcome to console.
|
||||
echo "${col}${res}${std}: $test_name"
|
||||
|
||||
# Register the test result, and other relevant metadata.
|
||||
echo ":test-result: $res" > $trs_file
|
||||
echo ":global-test-result: $res" >> $trs_file
|
||||
echo ":recheck: $recheck" >> $trs_file
|
||||
echo ":copy-in-global-log: $gcopy" >> $trs_file
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
27
bin/trace
27
bin/trace
@@ -37,10 +37,12 @@ $Source = "";
|
||||
"H5D_fill_value_t" => "DF",
|
||||
"H5FD_mpio_chunk_opt_t" => "Dh",
|
||||
"H5D_mpio_actual_io_mode_t" => "Di",
|
||||
"H5D_chunk_index_t" => "Dk",
|
||||
"H5D_layout_t" => "Dl",
|
||||
"H5D_mpio_no_collective_cause_t" => "Dn",
|
||||
"H5D_mpio_actual_chunk_opt_mode_t" => "Do",
|
||||
"H5D_space_status_t" => "Ds",
|
||||
"H5D_vds_view_t" => "Dv",
|
||||
"H5FD_mpio_xfer_t" => "Dt",
|
||||
"herr_t" => "e",
|
||||
"H5E_direction_t" => "Ed",
|
||||
@@ -100,6 +102,7 @@ $Source = "";
|
||||
"H5A_operator2_t" => "x",
|
||||
"H5A_info_t" => "x",
|
||||
"H5AC_cache_config_t" => "x",
|
||||
"H5D_append_cb_t" => "x",
|
||||
"H5D_gather_func_t" => "x",
|
||||
"H5D_operator_t" => "x",
|
||||
"H5D_scatter_func_t" => "x",
|
||||
@@ -109,8 +112,10 @@ $Source = "";
|
||||
"H5E_walk_t" => "x",
|
||||
"H5E_walk1_t" => "x",
|
||||
"H5E_walk2_t" => "x",
|
||||
"H5F_flush_cb_t" => "x",
|
||||
"H5F_info1_t" => "x",
|
||||
"H5F_info2_t" => "x",
|
||||
"H5F_retry_info_t" => "x",
|
||||
"H5FD_t" => "x",
|
||||
"H5FD_class_t" => "x",
|
||||
"H5FD_stream_fapl_t" => "x",
|
||||
@@ -118,7 +123,8 @@ $Source = "";
|
||||
"H5G_iterate_t" => "x",
|
||||
"H5G_info_t" => "x",
|
||||
"H5I_free_t" => "x",
|
||||
"H5L_class_t" => "x",
|
||||
"H5I_search_func_t" => "x",
|
||||
"H5L_class_t" => "x",
|
||||
"H5L_elink_traverse_t" => "x",
|
||||
"H5L_iterate_t" => "x",
|
||||
"H5MM_allocate_t" => "x",
|
||||
@@ -178,7 +184,7 @@ sub argstring ($$$) {
|
||||
# Normalize the data type by removing redundant white space,
|
||||
# certain type qualifiers, and indirection.
|
||||
$atype =~ s/^\bconst\b//;
|
||||
$atype =~ s/\bUNUSED\b//g;
|
||||
$atype =~ s/\bH5_ATTR_UNUSED\b//g;
|
||||
$atype =~ s/\s+/ /g;
|
||||
$ptr = length $1 if $atype =~ s/(\*+)//;
|
||||
$atype =~ s/^\s+//;
|
||||
@@ -281,14 +287,10 @@ sub rewrite_func ($$$$$) {
|
||||
|
||||
# The H5TRACE() statement
|
||||
if ($body =~ /\/\*[ \t]*NO[ \t]*TRACE[ \t]*\*\//) {
|
||||
if ($body =~ /\s*H5TRACE\d+\s*\(/) {
|
||||
errmesg $file, $name, "warning: trace info was not updated because of NO TRACE comment";
|
||||
} else {
|
||||
errmesg $file, $name, "warning: trace info was not inserted because of NO TRACE comment";
|
||||
}
|
||||
# Ignored due to NO TRACE comment.
|
||||
} elsif ($body =~ s/((\n[ \t]*)H5TRACE\d+\s*\(.*?\);)\n/"$2$trace"/es) {
|
||||
# Replaced an H5TRACE macro
|
||||
} elsif ($body=~s/((\n[ \t]*)FUNC_ENTER\w*\s*\(.*?\);??)\n/"$1$2$trace"/es) {
|
||||
# Replaced an H5TRACE macro.
|
||||
} elsif ($body=~s/((\n[ \t]*)FUNC_ENTER\w*\s*(\(.*?\))?;??)\n/"$1$2$trace"/es) {
|
||||
# Added an H5TRACE macro after a FUNC_ENTER macro.
|
||||
} else {
|
||||
errmesg $file, $name, "unable to insert tracing information";
|
||||
@@ -317,14 +319,14 @@ for $file (@ARGV) {
|
||||
|
||||
# Make modifications
|
||||
my $original = $Source;
|
||||
my $napi = $Source =~ s/\n([A-Za-z]\w*(\s+[a-z]\w*)*)\s*\n #type
|
||||
my $napi = $Source =~ s/\n([A-Za-z]\w*(\s+[A-Za-z]\w*)*\s*\**)\n #type
|
||||
(H5[A-Z]{0,2}[^_A-Z0-9]\w*) #name
|
||||
\s*\((.*?)\)\s* #args
|
||||
(\{.*?\n\}[^\n]*) #body
|
||||
/rewrite_func($file,$1,$3,$4,$5)/segx;
|
||||
$total_api += $napi;
|
||||
|
||||
# If the source changed then print out the new version
|
||||
# If the source changed then print out the new version
|
||||
if ($original ne $Source) {
|
||||
printf "%s: instrumented %d API function%s\n",
|
||||
$file, $napi, 1==$napi?"":"s";
|
||||
@@ -335,3 +337,6 @@ for $file (@ARGV) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
printf "Finished processing HDF5 API calls\n"
|
||||
|
||||
|
||||
@@ -6,15 +6,6 @@ PROJECT (HDF5_CPP)
|
||||
#-----------------------------------------------------------------------------
|
||||
add_definitions (${HDF_EXTRA_C_FLAGS})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Shared/Static Libs
|
||||
#-----------------------------------------------------------------------------
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set (CPP_BUILT_AS_DYNAMIC_LIB 1)
|
||||
else (BUILD_SHARED_LIBS)
|
||||
set (CPP_BUILT_AS_STATIC_LIB 1)
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Generate configure file
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
1376
c++/Makefile.in
1376
c++/Makefile.in
File diff suppressed because it is too large
Load Diff
@@ -34,16 +34,16 @@ set (tutr_examples
|
||||
|
||||
foreach (example ${examples})
|
||||
add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
|
||||
TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE})
|
||||
TARGET_C_PROPERTIES (cpp_ex_${example} " " " ")
|
||||
TARGET_NAMING (cpp_ex_${example} STATIC)
|
||||
TARGET_C_PROPERTIES (cpp_ex_${example} STATIC " " " ")
|
||||
target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
|
||||
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
|
||||
endforeach (example ${examples})
|
||||
|
||||
foreach (example ${tutr_examples})
|
||||
add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
|
||||
TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE})
|
||||
TARGET_C_PROPERTIES (cpp_ex_${example} " " " ")
|
||||
TARGET_NAMING (cpp_ex_${example} STATIC)
|
||||
TARGET_C_PROPERTIES (cpp_ex_${example} STATIC " " " ")
|
||||
target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
|
||||
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
|
||||
endforeach (example ${tutr_examples})
|
||||
|
||||
@@ -42,8 +42,8 @@ INSTALL_FILES=create.cpp readdata.cpp writedata.cpp compound.cpp \
|
||||
# Some of the examples depend on files created by running other examples
|
||||
readdata.chkexe_: create.chkexe_
|
||||
chunks.chkexe_: extend_ds.chkexe_
|
||||
h5tutr_rdwt.chkexe_: h5tutrcrtdat.chkexe
|
||||
h5tutrcrtatt.chkexe_: h5tutrcrtdat.chkexe
|
||||
h5tutr_rdwt.chkexe_: h5tutr_crtdat.chkexe
|
||||
h5tutrcrtatt.chkexe_: h5tutr_crtdat.chkexe
|
||||
h5tutr_crtgrpd.chkexe_: h5tutr_crtgrpar.chkexe
|
||||
|
||||
# Tell conclude.am that these are C++ tests.
|
||||
@@ -52,6 +52,7 @@ CXX_API=yes
|
||||
# Where to install examples
|
||||
# Note: no '/' after DESTDIR. Explanation in commence.am
|
||||
EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/c++
|
||||
EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples
|
||||
|
||||
# How to build programs using h5c++
|
||||
$(EXTRA_PROG): $(H5CPP)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -34,7 +34,7 @@ EXIT_FAILURE=1
|
||||
|
||||
# Where the tool is installed.
|
||||
# default is relative path to installed location of the tools
|
||||
prefix="${prefix:-../../../}"
|
||||
prefix="${prefix:-@prefix@}"
|
||||
AR="@AR@"
|
||||
RANLIB="@RANLIB@"
|
||||
H5TOOL="h5c++" # The tool name
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
cmake_minimum_required (VERSION 3.1.0)
|
||||
PROJECT (HDF5_CPP_SRC)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Shared/Static Libs
|
||||
#-----------------------------------------------------------------------------
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set (CPP_BUILT_AS_DYNAMIC_LIB 1)
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Generate configure file
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -42,6 +35,7 @@ set (CPP_SRCS
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Library.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Location.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Object.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5OcreatProp.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5PredType.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5PropList.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5StrType.cpp
|
||||
@@ -77,24 +71,41 @@ set (CPP_HDRS
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Library.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Location.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Object.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5OcreatProp.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5PredType.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5PropList.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5StrType.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.h
|
||||
)
|
||||
|
||||
add_library (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} ${CPP_SRCS} ${CPP_HDRS})
|
||||
TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} " " " ")
|
||||
add_library (${HDF5_CPP_LIB_TARGET} STATIC ${CPP_SRCS} ${CPP_HDRS})
|
||||
TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} STATIC " " " ")
|
||||
target_link_libraries (${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
|
||||
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}")
|
||||
H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} ${LIB_TYPE})
|
||||
H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} STATIC)
|
||||
set_target_properties (${HDF5_CPP_LIB_TARGET} PROPERTIES
|
||||
FOLDER libraries/cpp
|
||||
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
|
||||
)
|
||||
set (install_targets ${HDF5_CPP_LIB_TARGET})
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_library (${HDF5_CPP_LIBSH_TARGET} SHARED ${CPP_SRCS} ${CPP_HDRS})
|
||||
TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED " " " ")
|
||||
target_link_libraries (${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
|
||||
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIBSH_TARGET}")
|
||||
H5_SET_LIB_OPTIONS (${HDF5_CPP_LIBSH_TARGET} ${HDF5_CPP_LIB_NAME} SHARED)
|
||||
set_target_properties (${HDF5_CPP_LIBSH_TARGET} PROPERTIES
|
||||
FOLDER libraries/cpp
|
||||
COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
|
||||
INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
|
||||
)
|
||||
set (install_targets ${install_targets} ${HDF5_CPP_LIBSH_TARGET})
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add file(s) to CMake Install
|
||||
# Add file(s) to CMake Install
|
||||
#-----------------------------------------------------------------------------
|
||||
install (
|
||||
FILES
|
||||
@@ -110,16 +121,17 @@ install (
|
||||
#-----------------------------------------------------------------------------
|
||||
if (HDF5_EXPORTED_TARGETS)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries)
|
||||
INSTALL_TARGET_PDB (${HDF5_CPP_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries)
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
|
||||
|
||||
install (
|
||||
TARGETS
|
||||
${HDF5_CPP_LIB_TARGET}
|
||||
${install_targets}
|
||||
EXPORT
|
||||
${HDF5_EXPORTED_TARGETS}
|
||||
LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT cpplibraries
|
||||
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT cpplibraries
|
||||
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT cpplibraries
|
||||
FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT cpplibraries
|
||||
)
|
||||
endif (HDF5_EXPORTED_TARGETS)
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "H5PropList.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5AbstractDs.h"
|
||||
#include "H5DataSpace.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5Alltypes.h"
|
||||
@@ -40,16 +42,15 @@ AbstractDs::AbstractDs(){}
|
||||
// Function: AbstractDs default constructor
|
||||
///\brief Creates an AbstractDs instance using an existing id.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//
|
||||
// *** Deprecation warning ***
|
||||
// This constructor is no longer appropriate because the data member "id" had
|
||||
// been moved to the sub-classes. It will be removed in 1.10 release. If its
|
||||
// removal does not raise any problems in 1.10, it will be removed from 1.8 in
|
||||
// subsequent releases.
|
||||
//--------------------------------------------------------------------------
|
||||
AbstractDs::AbstractDs(const hid_t ds_id){}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: AbstractDs copy constructor
|
||||
///\brief Copy constructor: makes a copy of the original AbstractDs object.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
AbstractDs::AbstractDs(const AbstractDs& original){}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: AbstractDs::getTypeClass
|
||||
///\brief Returns the class of the datatype that is used by this
|
||||
@@ -113,8 +114,9 @@ DataType AbstractDs::getDataType() const
|
||||
// depending on which object invokes getDataType. Then, create and
|
||||
// return the DataType object
|
||||
try {
|
||||
DataType datatype(p_get_type());
|
||||
return(datatype);
|
||||
DataType datatype;
|
||||
f_DataType_setId(&datatype, p_get_type());
|
||||
return(datatype);
|
||||
}
|
||||
catch (DataSetIException E) {
|
||||
throw DataTypeIException("DataSet::getDataType", E.getDetailMsg());
|
||||
@@ -139,8 +141,12 @@ ArrayType AbstractDs::getArrayType() const
|
||||
// depending on which object invokes getArrayType. Then, create and
|
||||
// return the ArrayType object
|
||||
try {
|
||||
ArrayType arraytype(p_get_type());
|
||||
return(arraytype);
|
||||
// Create ArrayType and set values this way to work around the
|
||||
// problem described in the JIRA issue HDFFV-7947
|
||||
ArrayType arraytype;
|
||||
f_DataType_setId(&arraytype, p_get_type());
|
||||
arraytype.setArrayInfo();
|
||||
return(arraytype);
|
||||
}
|
||||
catch (DataSetIException E) {
|
||||
throw DataTypeIException("DataSet::getArrayType", E.getDetailMsg());
|
||||
@@ -165,8 +171,9 @@ CompType AbstractDs::getCompType() const
|
||||
// depending on which object invokes getCompType. Then, create and
|
||||
// return the CompType object
|
||||
try {
|
||||
CompType comptype(p_get_type());
|
||||
return(comptype);
|
||||
CompType comptype;
|
||||
f_DataType_setId(&comptype, p_get_type());
|
||||
return(comptype);
|
||||
}
|
||||
catch (DataSetIException E) {
|
||||
throw DataTypeIException("DataSet::getCompType", E.getDetailMsg());
|
||||
@@ -191,8 +198,9 @@ EnumType AbstractDs::getEnumType() const
|
||||
// depending on which object invokes getEnumType. Then, create and
|
||||
// return the EnumType object
|
||||
try {
|
||||
EnumType enumtype(p_get_type());
|
||||
return(enumtype);
|
||||
EnumType enumtype;
|
||||
f_DataType_setId(&enumtype, p_get_type());
|
||||
return(enumtype);
|
||||
}
|
||||
catch (DataSetIException E) {
|
||||
throw DataTypeIException("DataSet::getEnumType", E.getDetailMsg());
|
||||
@@ -217,8 +225,9 @@ IntType AbstractDs::getIntType() const
|
||||
// depending on which object invokes getIntType. Then, create and
|
||||
// return the IntType object
|
||||
try {
|
||||
IntType inttype(p_get_type());
|
||||
return(inttype);
|
||||
IntType inttype;
|
||||
f_DataType_setId(&inttype, p_get_type());
|
||||
return(inttype);
|
||||
}
|
||||
catch (DataSetIException E) {
|
||||
throw DataTypeIException("DataSet::getIntType", E.getDetailMsg());
|
||||
@@ -243,8 +252,9 @@ FloatType AbstractDs::getFloatType() const
|
||||
// depending on which object invokes getFloatType. Then, create and
|
||||
// return the FloatType object
|
||||
try {
|
||||
FloatType floatype(p_get_type());
|
||||
return(floatype);
|
||||
FloatType floatype;
|
||||
f_DataType_setId(&floatype, p_get_type());
|
||||
return(floatype);
|
||||
}
|
||||
catch (DataSetIException E) {
|
||||
throw DataTypeIException("DataSet::getFloatType", E.getDetailMsg());
|
||||
@@ -269,8 +279,9 @@ StrType AbstractDs::getStrType() const
|
||||
// depending on which object invokes getStrType. Then, create and
|
||||
// return the StrType object
|
||||
try {
|
||||
StrType strtype(p_get_type());
|
||||
return(strtype);
|
||||
StrType strtype;
|
||||
f_DataType_setId(&strtype, p_get_type());
|
||||
return(strtype);
|
||||
}
|
||||
catch (DataSetIException E) {
|
||||
throw DataTypeIException("DataSet::getStrType", E.getDetailMsg());
|
||||
@@ -295,8 +306,9 @@ VarLenType AbstractDs::getVarLenType() const
|
||||
// depending on which object invokes getVarLenType. Then, create and
|
||||
// return the VarLenType object
|
||||
try {
|
||||
VarLenType varlentype(p_get_type());
|
||||
return(varlentype);
|
||||
VarLenType varlentype;
|
||||
f_DataType_setId(&varlentype, p_get_type());
|
||||
return(varlentype);
|
||||
}
|
||||
catch (DataSetIException E) {
|
||||
throw DataTypeIException("DataSet::getVarLenType", E.getDetailMsg());
|
||||
|
||||
@@ -28,6 +28,7 @@ class FloatType;
|
||||
class IntType;
|
||||
class StrType;
|
||||
class VarLenType;
|
||||
class DataSpace;
|
||||
|
||||
/*! \class AbstractDs
|
||||
\brief AbstractDs is an abstract base class, inherited by Attribute
|
||||
@@ -67,12 +68,9 @@ class H5_DLLCPP AbstractDs {
|
||||
///\brief Returns the amount of storage size required - pure virtual.
|
||||
virtual hsize_t getStorageSize() const = 0;
|
||||
|
||||
///\brief Returns this class name.
|
||||
// Returns this class name - pure virtual.
|
||||
virtual H5std_string fromClass() const = 0;
|
||||
|
||||
// Copy constructor
|
||||
AbstractDs( const AbstractDs& original );
|
||||
|
||||
// Destructor
|
||||
virtual ~AbstractDs();
|
||||
|
||||
@@ -80,11 +78,20 @@ class H5_DLLCPP AbstractDs {
|
||||
// Default constructor
|
||||
AbstractDs();
|
||||
|
||||
// Constructor that takes an attribute id or a dataset id.
|
||||
AbstractDs( const hid_t ds_id );
|
||||
// *** Deprecation warning ***
|
||||
// The following two constructors are no longer appropriate after the
|
||||
// data member "id" had been moved to the sub-classes.
|
||||
// The copy constructor is a noop and is removed in 1.8.15 and the
|
||||
// other will be removed from 1.10 release, and then from 1.8 if its
|
||||
// removal does not raise any problems in two 1.10 releases.
|
||||
|
||||
AbstractDs(const hid_t h5_id);
|
||||
|
||||
// Copy constructor
|
||||
// AbstractDs( const AbstractDs& original );
|
||||
|
||||
private:
|
||||
// This member function is implemented by DataSet and Attribute.
|
||||
// This member function is implemented by DataSet and Attribute - pure virtual.
|
||||
virtual hid_t p_get_type() const = 0;
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5DataType.h"
|
||||
@@ -34,12 +35,7 @@ namespace H5 {
|
||||
///\brief Default constructor: Creates a stub ArrayType
|
||||
// Programmer Binh-Minh Ribler - May 2004
|
||||
//--------------------------------------------------------------------------
|
||||
ArrayType::ArrayType() : DataType()
|
||||
{
|
||||
// Initialize members
|
||||
rank = -1;
|
||||
dimensions = NULL;
|
||||
}
|
||||
ArrayType::ArrayType() : DataType(), rank(-1), dimensions(NULL) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: ArrayType overloaded constructor
|
||||
@@ -50,20 +46,7 @@ ArrayType::ArrayType() : DataType()
|
||||
//--------------------------------------------------------------------------
|
||||
ArrayType::ArrayType( const hid_t existing_id ) : DataType( existing_id )
|
||||
{
|
||||
// Get the rank of the existing array and store it in this array
|
||||
rank = H5Tget_array_ndims(existing_id);
|
||||
if (rank < 0)
|
||||
{
|
||||
throw DataTypeIException("ArrayType constructor (existing id)", "H5Tget_array_ndims failed");
|
||||
}
|
||||
|
||||
// Allocate space for the dimensions
|
||||
dimensions = new hsize_t[rank];
|
||||
|
||||
// Get the dimensions of the existing array and store it in this array
|
||||
int ret_value = H5Tget_array_dims2(id, dimensions);
|
||||
if (ret_value < 0)
|
||||
throw DataTypeIException("ArrayType constructor (existing id)", "H5Tget_array_dims2 failed");
|
||||
setArrayInfo();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -109,26 +92,68 @@ ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims)
|
||||
dimensions[i] = dims[i];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: ArrayType::setArrayInfo
|
||||
///\brief Retrieves the rank and dimensions from the array datatype
|
||||
/// and store the info in this ArrayType object.
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - January 2016
|
||||
//--------------------------------------------------------------------------
|
||||
void ArrayType::setArrayInfo()
|
||||
{
|
||||
// Get the rank of the array type specified by id from the C API
|
||||
int ndims = H5Tget_array_ndims(id);
|
||||
if (ndims < 0)
|
||||
{
|
||||
throw DataTypeIException("ArrayType::setArrayInfo", "H5Tget_array_ndims failed");
|
||||
}
|
||||
|
||||
// Get the dimensions from the C API
|
||||
hsize_t* dims;
|
||||
dims = new hsize_t[ndims];
|
||||
if (dims != NULL)
|
||||
{
|
||||
// Get the dimensions
|
||||
ndims = H5Tget_array_dims2(id, dims);
|
||||
if (ndims < 0)
|
||||
throw DataTypeIException("ArrayType::setArrayInfo", "H5Tget_array_dims2 failed");
|
||||
|
||||
// Store the array's info in memory
|
||||
rank = ndims;
|
||||
dimensions = new hsize_t[rank];
|
||||
for (int i = 0; i < rank; i++)
|
||||
dimensions[i] = dims[i];
|
||||
delete []dims;
|
||||
}
|
||||
} // setArrayInfo
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: ArrayType::getArrayNDims
|
||||
///\brief Returns the number of dimensions for an array datatype.
|
||||
///\return Number of dimensions
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - May 2004
|
||||
// Modification
|
||||
// Modified to use setArrayInfo().
|
||||
// If rank is positive, return rank
|
||||
// If rank is invalid but object has a valid identifier, obtain the
|
||||
// rank and dimensions, store them in the object, and return rank
|
||||
// Otherwise, i.e., rank is invalid and object doesn't have a
|
||||
// valid identifier, throw an exception
|
||||
//--------------------------------------------------------------------------
|
||||
int ArrayType::getArrayNDims()
|
||||
{
|
||||
// If the array's rank has not been stored, i.e. rank is init to -1,
|
||||
// retrieve it via the C API
|
||||
if (rank < 0)
|
||||
{
|
||||
rank = H5Tget_array_ndims(id);
|
||||
if (rank < 0)
|
||||
{
|
||||
throw DataTypeIException("ArrayType::getArrayNDims", "H5Tget_array_ndims failed");
|
||||
}
|
||||
}
|
||||
return(rank);
|
||||
// Validate the id first, this object could be a default object
|
||||
if (!p_valid_id(id))
|
||||
throw DataTypeIException("ArrayType::getArrayNDims", "ArrayType object is not a valid array type.");
|
||||
|
||||
// If the array's info has not been stored, i.e. "rank" still has its
|
||||
// initial value, -1, and "dimensions" is still NULL, retrieve rank and
|
||||
// dimensions via the C API and store them in this ArrayType object.
|
||||
if (rank < 0 && dimensions == NULL)
|
||||
setArrayInfo();
|
||||
|
||||
return(rank);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -138,25 +163,30 @@ int ArrayType::getArrayNDims()
|
||||
///\return Number of dimensions
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - May 2004
|
||||
// Modification
|
||||
// Jan, 2016
|
||||
// Modified to use setArrayInfo().
|
||||
// If the array information has not been stored, retrieve rank and
|
||||
// dimensions of the array type identified by "id" via the C API.
|
||||
// Copy "dimensions" to the user's buffer
|
||||
//--------------------------------------------------------------------------
|
||||
int ArrayType::getArrayDims(hsize_t* dims)
|
||||
{
|
||||
// If the array's dimensions have not been stored, retrieve them via C API
|
||||
if (dimensions == NULL)
|
||||
{
|
||||
int ndims = H5Tget_array_dims2(id, dims);
|
||||
if (ndims < 0)
|
||||
throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims2 failed");
|
||||
// Store the array's info in memory
|
||||
rank = ndims;
|
||||
dimensions = new hsize_t[rank];
|
||||
for (int i = 0; i < rank; i++)
|
||||
dimensions[i] = dims[i];
|
||||
}
|
||||
// Otherwise, simply copy what's in 'dimensions' to 'dims'
|
||||
for (int i = 0; i < rank; i++)
|
||||
dims[i] = dimensions[i];
|
||||
return(rank);
|
||||
// Validate the id first, this object could be a default object
|
||||
if (!p_valid_id(id))
|
||||
throw DataTypeIException("ArrayType::getArrayDims", "ArrayType object is not a valid array type.");
|
||||
|
||||
// If the array's info has not been stored, i.e. "rank" still has its
|
||||
// initial value, -1, and "dimensions" is still NULL, retrieve rank and
|
||||
// dimensions via the C API and store them in this ArrayType object.
|
||||
if (rank < 0 && dimensions == NULL)
|
||||
setArrayInfo();
|
||||
|
||||
// Copy what's in "dimensions" to user's buffer "dims"
|
||||
for (int i = 0; i < rank; i++)
|
||||
dims[i] = dimensions[i];
|
||||
|
||||
return(rank);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -31,6 +31,9 @@ class H5_DLLCPP ArrayType : public DataType {
|
||||
// specified base type.
|
||||
ArrayType(const DataType& base_type, int ndims, const hsize_t* dims);
|
||||
|
||||
// Stores the rank and dimensions in memory.
|
||||
void setArrayInfo();
|
||||
|
||||
// Returns the number of dimensions of this array datatype.
|
||||
int getArrayNDims();
|
||||
|
||||
@@ -49,7 +52,6 @@ class H5_DLLCPP ArrayType : public DataType {
|
||||
// Noop destructor
|
||||
virtual ~ArrayType();
|
||||
|
||||
protected:
|
||||
// Default constructor
|
||||
ArrayType();
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5DataType.h"
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "H5AbstractDs.h"
|
||||
#include "H5FaccProp.h"
|
||||
#include "H5FcreatProp.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5DataType.h"
|
||||
@@ -45,6 +46,7 @@ namespace H5 {
|
||||
#endif
|
||||
|
||||
class H5_DLLCPP H5Object; // forward declaration for UserData4Aiterate
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute default constructor
|
||||
///\brief Default constructor: Creates a stub attribute
|
||||
@@ -74,7 +76,8 @@ Attribute::Attribute(const Attribute& original) : AbstractDs(), IdComponent()
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute::Attribute(const hid_t existing_id) : AbstractDs(), IdComponent()
|
||||
{
|
||||
id = existing_id;
|
||||
id = existing_id;
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -270,8 +273,9 @@ DataSpace Attribute::getSpace() const
|
||||
// If the dataspace id is valid, create and return the DataSpace object
|
||||
if( dataspace_id > 0 )
|
||||
{
|
||||
DataSpace dataspace( dataspace_id );
|
||||
return( dataspace );
|
||||
DataSpace dataspace;
|
||||
f_DataSpace_setId(&dataspace, dataspace_id);
|
||||
return(dataspace);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -392,10 +396,12 @@ H5std_string Attribute::getName() const
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string Attribute::getName(size_t len) const
|
||||
{
|
||||
H5std_string attr_name;
|
||||
ssize_t name_size = getName(attr_name, len);
|
||||
return(attr_name);
|
||||
// let caller catch exception if any
|
||||
H5std_string attr_name;
|
||||
ssize_t name_size = getName(attr_name, len);
|
||||
if (name_size < 0)
|
||||
return("");
|
||||
else
|
||||
return(attr_name);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -31,6 +31,16 @@ namespace H5 {
|
||||
*/
|
||||
class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
|
||||
public:
|
||||
|
||||
// Copy constructor: makes a copy of an existing Attribute object.
|
||||
Attribute( const Attribute& original );
|
||||
|
||||
// Default constructor
|
||||
Attribute();
|
||||
|
||||
// Creates a copy of an existing attribute using the attribute id
|
||||
Attribute( const hid_t attr_id );
|
||||
|
||||
// Closes this attribute.
|
||||
virtual void close();
|
||||
|
||||
@@ -70,23 +80,14 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("Attribute"); }
|
||||
|
||||
// Creates a copy of an existing attribute using the attribute id
|
||||
Attribute( const hid_t attr_id );
|
||||
|
||||
// Copy constructor: makes a copy of an existing Attribute object.
|
||||
Attribute( const Attribute& original );
|
||||
|
||||
// Default constructor
|
||||
Attribute();
|
||||
|
||||
// Gets the attribute id.
|
||||
virtual hid_t getId() const;
|
||||
|
||||
// Destructor: properly terminates access to this attribute.
|
||||
virtual ~Attribute();
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
protected:
|
||||
// Sets the attribute id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
@@ -109,6 +110,10 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
|
||||
|
||||
// do not inherit H5Object::renameAttr
|
||||
void renameAttr() {}
|
||||
|
||||
// Friend function to set Attribute id. For library use only.
|
||||
friend void f_Attribute_setId(Attribute* attr, hid_t new_id);
|
||||
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "H5Object.h"
|
||||
#include "H5FaccProp.h"
|
||||
#include "H5FcreatProp.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DxferProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
@@ -33,9 +34,6 @@
|
||||
#include "H5Alltypes.h"
|
||||
#include "H5private.h" // for HDstrcpy
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
// There are a few comments that are common to most of the functions
|
||||
// defined in this file so they are listed here.
|
||||
// - getLocId is called by all functions, that call a C API, to get
|
||||
@@ -51,6 +49,7 @@ using namespace std;
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -100,7 +99,9 @@ Group CommonFG::createGroup( const char* name, size_t size_hint ) const
|
||||
throwException("createGroup", "H5Gcreate2 failed");
|
||||
|
||||
// No failure, create and return the Group object
|
||||
Group group( group_id );
|
||||
Group group;
|
||||
CommonFG *ptr = &group;
|
||||
ptr->p_setId(group_id);
|
||||
return( group );
|
||||
}
|
||||
|
||||
@@ -136,7 +137,9 @@ Group CommonFG::openGroup( const char* name ) const
|
||||
throwException("openGroup", "H5Gopen2 failed");
|
||||
|
||||
// No failure, create and return the Group object
|
||||
Group group( group_id );
|
||||
Group group;
|
||||
CommonFG *ptr = &group;
|
||||
ptr->p_setId(group_id);
|
||||
return( group );
|
||||
}
|
||||
|
||||
@@ -178,7 +181,8 @@ DataSet CommonFG::createDataSet( const char* name, const DataType& data_type, co
|
||||
throwException("createDataSet", "H5Dcreate2 failed");
|
||||
|
||||
// No failure, create and return the DataSet object
|
||||
DataSet dataset( dataset_id );
|
||||
DataSet dataset;
|
||||
f_DataSet_setId(&dataset, dataset_id);
|
||||
return( dataset );
|
||||
}
|
||||
|
||||
@@ -213,7 +217,8 @@ DataSet CommonFG::openDataSet( const char* name ) const
|
||||
throwException("openDataSet", "H5Dopen2 failed");
|
||||
|
||||
// No failure, create and return the DataSet object
|
||||
DataSet dataset( dataset_id );
|
||||
DataSet dataset;
|
||||
f_DataSet_setId(&dataset, dataset_id);
|
||||
return( dataset );
|
||||
}
|
||||
|
||||
@@ -576,7 +581,8 @@ DataType CommonFG::openDataType( const char* name ) const
|
||||
throwException("openDataType", "H5Topen2 failed");
|
||||
|
||||
// No failure, create and return the DataType object
|
||||
DataType data_type(type_id);
|
||||
DataType data_type;
|
||||
f_DataType_setId(&data_type, type_id);
|
||||
return(data_type);
|
||||
}
|
||||
|
||||
@@ -611,7 +617,8 @@ ArrayType CommonFG::openArrayType( const char* name ) const
|
||||
throwException("openArrayType", "H5Topen2 failed");
|
||||
|
||||
// No failure, create and return the ArrayType object
|
||||
ArrayType array_type (type_id);
|
||||
ArrayType array_type;
|
||||
f_DataType_setId(&array_type, type_id);
|
||||
return(array_type);
|
||||
}
|
||||
|
||||
@@ -646,7 +653,8 @@ CompType CommonFG::openCompType( const char* name ) const
|
||||
throwException("openCompType", "H5Topen2 failed");
|
||||
|
||||
// No failure, create and return the CompType object
|
||||
CompType comp_type(type_id);
|
||||
CompType comp_type;
|
||||
f_DataType_setId(&comp_type, type_id);
|
||||
return(comp_type);
|
||||
}
|
||||
|
||||
@@ -681,7 +689,8 @@ EnumType CommonFG::openEnumType( const char* name ) const
|
||||
throwException("openEnumType", "H5Topen2 failed");
|
||||
|
||||
// No failure, create and return the EnumType object
|
||||
EnumType enum_type(type_id);
|
||||
EnumType enum_type;
|
||||
f_DataType_setId(&enum_type, type_id);
|
||||
return(enum_type);
|
||||
}
|
||||
|
||||
@@ -716,7 +725,8 @@ IntType CommonFG::openIntType( const char* name ) const
|
||||
throwException("openIntType", "H5Topen2 failed");
|
||||
|
||||
// No failure, create and return the IntType object
|
||||
IntType int_type(type_id);
|
||||
IntType int_type;
|
||||
f_DataType_setId(&int_type, type_id);
|
||||
return(int_type);
|
||||
}
|
||||
|
||||
@@ -751,7 +761,8 @@ FloatType CommonFG::openFloatType( const char* name ) const
|
||||
throwException("openFloatType", "H5Topen2 failed");
|
||||
|
||||
// No failure, create and return the FloatType object
|
||||
FloatType float_type(type_id);
|
||||
FloatType float_type;
|
||||
f_DataType_setId(&float_type, type_id);
|
||||
return(float_type);
|
||||
}
|
||||
|
||||
@@ -786,7 +797,8 @@ StrType CommonFG::openStrType( const char* name ) const
|
||||
throwException("openStrType", "H5Topen2 failed");
|
||||
|
||||
// No failure, create and return the StrType object
|
||||
StrType str_type(type_id);
|
||||
StrType str_type;
|
||||
f_DataType_setId(&str_type, type_id);
|
||||
return(str_type);
|
||||
}
|
||||
|
||||
@@ -821,7 +833,8 @@ VarLenType CommonFG::openVarLenType( const char* name ) const
|
||||
throwException("openVarLenType", "H5Topen2 failed");
|
||||
|
||||
// No failure, create and return the VarLenType object
|
||||
VarLenType varlen_type(type_id);
|
||||
VarLenType varlen_type;
|
||||
f_DataType_setId(&varlen_type, type_id);
|
||||
return(varlen_type);
|
||||
}
|
||||
|
||||
@@ -1100,6 +1113,58 @@ H5O_type_t CommonFG::childObjType(hsize_t index, H5_index_t index_type, H5_iter_
|
||||
return(objtype);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::childObjVersion
|
||||
///\brief Returns the object header version of an object in this file/group,
|
||||
/// given the object's name.
|
||||
///\param objname - IN: Name of the object
|
||||
///\return Object version, which can have the following values:
|
||||
/// \li \c H5O_VERSION_1
|
||||
/// \li \c H5O_VERSION_2
|
||||
///\exception H5::FileIException or H5::GroupIException
|
||||
/// Exception will be thrown when:
|
||||
/// - an error returned by the C API
|
||||
/// - version number is not one of the valid values above
|
||||
// Programmer Binh-Minh Ribler - April, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
unsigned CommonFG::childObjVersion(const char* objname) const
|
||||
{
|
||||
H5O_info_t objinfo;
|
||||
unsigned version = 0;
|
||||
|
||||
// Use C API to get information of the object
|
||||
herr_t ret_value = H5Oget_info_by_name(getLocId(), objname, &objinfo, H5P_DEFAULT);
|
||||
|
||||
// Throw exception if C API returns failure
|
||||
if (ret_value < 0)
|
||||
throwException("childObjVersion", "H5Oget_info_by_name failed");
|
||||
// Return a valid version or throw an exception for invalid value
|
||||
else
|
||||
{
|
||||
version = objinfo.hdr.version;
|
||||
if (version != H5O_VERSION_1 && version != H5O_VERSION_2)
|
||||
throwException("childObjVersion", "Invalid version for object");
|
||||
}
|
||||
return(version);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::childObjVersion
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes an \a H5std_string for the object's name.
|
||||
///\brief Returns the type of an object in this group, given the
|
||||
/// object's name.
|
||||
///\param objname - IN: Name of the object (H5std_string&)
|
||||
///\exception H5::FileIException or H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - April, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
unsigned CommonFG::childObjVersion(const H5std_string& objname) const
|
||||
{
|
||||
// Use overloaded function
|
||||
unsigned version = childObjVersion(objname.c_str());
|
||||
return(version);
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -1172,6 +1237,7 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const
|
||||
}
|
||||
return (obj_type);
|
||||
}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
@@ -1189,6 +1255,37 @@ CommonFG::CommonFG() {}
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
CommonFG::~CommonFG() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: f_DataType_setId - friend
|
||||
// Purpose: This function is friend to class H5::DataType so that it
|
||||
// can set DataType::id in order to work around a problem
|
||||
// described in the JIRA issue HDFFV-7947.
|
||||
// Applications shouldn't need to use it.
|
||||
// param dtype - IN/OUT: DataType object to be changed
|
||||
// param new_id - IN: New id to set
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void f_DataType_setId(DataType* dtype, hid_t new_id)
|
||||
{
|
||||
dtype->p_setId(new_id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: f_DataSet_setId - friend
|
||||
// Purpose: This function is friend to class H5::DataSet so that it
|
||||
// can set DataSet::id in order to work around a problem
|
||||
// described in the JIRA issue HDFFV-7947.
|
||||
// Applications shouldn't need to use it.
|
||||
// param dset - IN/OUT: DataSet object to be changed
|
||||
// param new_id - IN: New id to set
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void f_DataSet_setId(DataSet* dset, hid_t new_id)
|
||||
{
|
||||
dset->p_setId(new_id);
|
||||
}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
// Class forwarding
|
||||
class Group;
|
||||
class H5File;
|
||||
class ArrayType;
|
||||
@@ -70,6 +71,11 @@ class H5_DLLCPP CommonFG {
|
||||
H5O_type_t childObjType(const char* objname) const;
|
||||
H5O_type_t childObjType(hsize_t index, H5_index_t index_type=H5_INDEX_NAME, H5_iter_order_t order=H5_ITER_INC, const char* objname=".") const;
|
||||
|
||||
// Returns the object header version of an object in this file or group,
|
||||
// given the object's name.
|
||||
unsigned childObjVersion(const char* objname) const;
|
||||
unsigned childObjVersion(const H5std_string& objname) const;
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Returns the type of an object in this group, given the
|
||||
// object's index.
|
||||
@@ -159,6 +165,10 @@ class H5_DLLCPP CommonFG {
|
||||
|
||||
// Noop destructor.
|
||||
virtual ~CommonFG();
|
||||
|
||||
protected:
|
||||
virtual void p_setId(const hid_t new_id) = 0;
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
}; // end of CommonFG declaration
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5Alltypes.h"
|
||||
@@ -227,11 +228,12 @@ hid_t CompType::p_get_member_type(unsigned member_num) const
|
||||
DataType CompType::getMemberDataType( unsigned member_num ) const
|
||||
{
|
||||
try {
|
||||
DataType datatype(p_get_member_type(member_num));
|
||||
return(datatype);
|
||||
DataType datatype;
|
||||
f_DataType_setId(&datatype, p_get_member_type(member_num));
|
||||
return(datatype);
|
||||
}
|
||||
catch (DataTypeIException E) {
|
||||
throw DataTypeIException("CompType::getMemberDataType", E.getDetailMsg());
|
||||
throw DataTypeIException("CompType::getMemberDataType", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,8 +249,10 @@ DataType CompType::getMemberDataType( unsigned member_num ) const
|
||||
ArrayType CompType::getMemberArrayType( unsigned member_num ) const
|
||||
{
|
||||
try {
|
||||
ArrayType arraytype(p_get_member_type(member_num));
|
||||
return(arraytype);
|
||||
ArrayType arraytype;
|
||||
f_DataType_setId(&arraytype, p_get_member_type(member_num));
|
||||
arraytype.setArrayInfo();
|
||||
return(arraytype);
|
||||
}
|
||||
catch (DataTypeIException E) {
|
||||
throw DataTypeIException("CompType::getMemberArrayType", E.getDetailMsg());
|
||||
@@ -268,6 +272,7 @@ CompType CompType::getMemberCompType( unsigned member_num ) const
|
||||
{
|
||||
try {
|
||||
CompType comptype(p_get_member_type(member_num));
|
||||
f_DataType_setId(&comptype, p_get_member_type(member_num));
|
||||
return(comptype);
|
||||
}
|
||||
catch (DataTypeIException E) {
|
||||
@@ -288,6 +293,7 @@ EnumType CompType::getMemberEnumType( unsigned member_num ) const
|
||||
{
|
||||
try {
|
||||
EnumType enumtype(p_get_member_type(member_num));
|
||||
f_DataType_setId(&enumtype, p_get_member_type(member_num));
|
||||
return(enumtype);
|
||||
}
|
||||
catch (DataTypeIException E) {
|
||||
@@ -308,6 +314,7 @@ IntType CompType::getMemberIntType( unsigned member_num ) const
|
||||
{
|
||||
try {
|
||||
IntType inttype(p_get_member_type(member_num));
|
||||
f_DataType_setId(&inttype, p_get_member_type(member_num));
|
||||
return(inttype);
|
||||
}
|
||||
catch (DataTypeIException E) {
|
||||
@@ -328,6 +335,7 @@ FloatType CompType::getMemberFloatType( unsigned member_num ) const
|
||||
{
|
||||
try {
|
||||
FloatType floatype(p_get_member_type(member_num));
|
||||
f_DataType_setId(&floatype, p_get_member_type(member_num));
|
||||
return(floatype);
|
||||
}
|
||||
catch (DataTypeIException E) {
|
||||
@@ -348,6 +356,7 @@ StrType CompType::getMemberStrType( unsigned member_num ) const
|
||||
{
|
||||
try {
|
||||
StrType strtype(p_get_member_type(member_num));
|
||||
f_DataType_setId(&strtype, p_get_member_type(member_num));
|
||||
return(strtype);
|
||||
}
|
||||
catch (DataTypeIException E) {
|
||||
@@ -368,6 +377,7 @@ VarLenType CompType::getMemberVarLenType( unsigned member_num ) const
|
||||
{
|
||||
try {
|
||||
VarLenType varlentype(p_get_member_type(member_num));
|
||||
f_DataType_setId(&varlentype, p_get_member_type(member_num));
|
||||
return(varlentype);
|
||||
}
|
||||
catch (DataTypeIException E) {
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "H5Object.h"
|
||||
#include "H5AbstractDs.h"
|
||||
#include "H5Attribute.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5DataType.h"
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
* The C++ API provides C++ wrappers for the HDF5 C Library.
|
||||
*
|
||||
* It is assumed that the user has knowledge of the
|
||||
* <a href="http://www.hdfgroup.org/HDF5/doc/H5.format.html">
|
||||
* <a href="https://www.hdfgroup.org/HDF5/doc/H5.format.html">
|
||||
* HDF5 file format</a> and its components.
|
||||
* For more information on the HDF5 C Library, see the
|
||||
* <a href="http://www.hdfgroup.org/HDF5/doc/index.html">
|
||||
* <a href="https://www.hdfgroup.org/HDF5/doc/index.html">
|
||||
* HDF5 Software Documentation</a> page.
|
||||
*
|
||||
* Because the HDF5 C Library maps very well to
|
||||
@@ -57,8 +57,8 @@
|
||||
*
|
||||
* The HDF5 C++ API is included with the HDF5 source code and can
|
||||
* be obtained from
|
||||
* <a href="http://www.hdfgroup.org/HDF5/release/obtainsrc.html">
|
||||
* http://www.hdfgroup.org/HDF5/release/obtainsrc.html</a>.
|
||||
* <a href="https://www.hdfgroup.org/HDF5/release/obtainsrc.html">
|
||||
* https://www.hdfgroup.org/HDF5/release/obtainsrc.html</a>.
|
||||
*
|
||||
* Please refer to the release_docs/INSTALL file under the top directory
|
||||
* of the HDF5 source code for information about installing, building,
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "H5PropList.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DxferProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5FaccProp.h"
|
||||
@@ -52,17 +53,24 @@ namespace H5 {
|
||||
///\brief Default constructor: creates a stub DataSet.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet::DataSet() : AbstractDs(), H5Object(), id(H5I_INVALID_HID) {}
|
||||
DataSet::DataSet() : H5Object(), AbstractDs(), id(H5I_INVALID_HID) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet overloaded constructor
|
||||
///\brief Creates an DataSet object using the id of an existing dataset.
|
||||
///\param existing_id - IN: Id of an existing dataset
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Description
|
||||
// incRefCount() is needed here to prevent the id from being closed
|
||||
// prematurely. That is, when application uses the id of an
|
||||
// existing DataSet object to create another DataSet object. So,
|
||||
// when one of those objects is deleted, the id will be closed if
|
||||
// the reference counter is only 1.
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet::DataSet(const hid_t existing_id) : AbstractDs(), H5Object()
|
||||
DataSet::DataSet(const hid_t existing_id) : H5Object(), AbstractDs()
|
||||
{
|
||||
id = existing_id;
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -71,7 +79,7 @@ DataSet::DataSet(const hid_t existing_id) : AbstractDs(), H5Object()
|
||||
///\param original - IN: DataSet instance to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet::DataSet(const DataSet& original) : AbstractDs(original), H5Object(original)
|
||||
DataSet::DataSet(const DataSet& original) : H5Object(), AbstractDs()
|
||||
{
|
||||
id = original.getId();
|
||||
incRefCount(); // increment number of references to this id
|
||||
@@ -95,7 +103,7 @@ DataSet::DataSet(const DataSet& original) : AbstractDs(original), H5Object(origi
|
||||
// Jul, 2008
|
||||
// Added for application convenience.
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet::DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : AbstractDs(), H5Object(), id(H5I_INVALID_HID)
|
||||
DataSet::DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), AbstractDs(), id(H5I_INVALID_HID)
|
||||
{
|
||||
id = H5Location::p_dereference(loc.getId(), ref, ref_type, plist, "constructor - by dereferenced");
|
||||
}
|
||||
@@ -114,7 +122,7 @@ DataSet::DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type, co
|
||||
// Jul, 2008
|
||||
// Added for application convenience.
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet::DataSet(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : AbstractDs(), H5Object(), id(H5I_INVALID_HID)
|
||||
DataSet::DataSet(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), AbstractDs(), id(H5I_INVALID_HID)
|
||||
{
|
||||
id = H5Location::p_dereference(attr.getId(), ref, ref_type, plist, "constructor - by dereference");
|
||||
}
|
||||
@@ -137,7 +145,8 @@ DataSpace DataSet::getSpace() const
|
||||
throw DataSetIException("DataSet::getSpace", "H5Dget_space failed");
|
||||
}
|
||||
//create dataspace object using the existing id then return the object
|
||||
DataSpace data_space( dataspace_id );
|
||||
DataSpace data_space;
|
||||
f_DataSpace_setId(&data_space, dataspace_id);
|
||||
return( data_space );
|
||||
}
|
||||
|
||||
@@ -169,9 +178,11 @@ DSetCreatPropList DataSet::getCreatePlist() const
|
||||
{
|
||||
throw DataSetIException("DataSet::getCreatePlist", "H5Dget_create_plist failed");
|
||||
}
|
||||
|
||||
// create and return the DSetCreatPropList object
|
||||
DSetCreatPropList create_plist( create_plist_id );
|
||||
return( create_plist );
|
||||
DSetCreatPropList create_plist;
|
||||
f_PropList_setId(&create_plist, create_plist_id);
|
||||
return(create_plist);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -769,6 +780,22 @@ void DataSet::p_setId(const hid_t new_id)
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: f_PropList_setId - friend
|
||||
// Purpose: This function is friend to class H5::PropList so that it
|
||||
// can set PropList::id in order to work around a problem
|
||||
// described in the JIRA issue HDFFV-7947.
|
||||
// Applications shouldn't need to use it.
|
||||
// param dset - IN/OUT: DataSet object to be changed
|
||||
// param new_id - IN: New id to set
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void f_PropList_setId(PropList* plist, hid_t new_id)
|
||||
{
|
||||
plist->p_setId(new_id);
|
||||
}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace H5 {
|
||||
*/
|
||||
class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
|
||||
public:
|
||||
|
||||
// Close this dataset.
|
||||
virtual void close();
|
||||
|
||||
@@ -125,6 +126,10 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
|
||||
// Reads variable or fixed len strings from this dataset.
|
||||
void p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const;
|
||||
void p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const;
|
||||
|
||||
// Friend function to set DataSet id. For library use only.
|
||||
friend void f_DataSet_setId(DataSet* dset, hid_t new_id);
|
||||
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
|
||||
@@ -33,10 +33,60 @@ namespace H5 {
|
||||
#endif // H5_NO_STD
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// This DOXYGEN_SHOULD_SKIP_THIS block is a work-around approach to control
|
||||
// the order of creation and deletion of the global constants. See Design Notes
|
||||
// in "H5PredType.cpp" for information.
|
||||
|
||||
// Initialize a pointer for the constant
|
||||
DataSpace* DataSpace::ALL_ = 0;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
///\brief Constant for default dataspace.
|
||||
// Function: DataSpace::getConstant
|
||||
// Creates a DataSpace object representing the HDF5 constant
|
||||
// H5S_ALL, pointed to by DataSpace::ALL_
|
||||
// Exception H5::DataSpaceIException
|
||||
// Description
|
||||
// If DataSpace::ALL_ already points to an allocated object, throw
|
||||
// a DataSpaceIException. This scenario should not happen.
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
const DataSpace DataSpace::ALL( H5S_ALL );
|
||||
DataSpace* DataSpace::getConstant()
|
||||
{
|
||||
// Tell the C library not to clean up, H5Library::termH5cpp will call
|
||||
// H5close - more dependency if use H5Library::dontAtExit()
|
||||
if (!IdComponent::H5dontAtexit_called)
|
||||
{
|
||||
(void) H5dont_atexit();
|
||||
IdComponent::H5dontAtexit_called = true;
|
||||
}
|
||||
|
||||
// If the constant pointer is not allocated, allocate it. Otherwise,
|
||||
// throw because it shouldn't be.
|
||||
if (ALL_ == 0)
|
||||
ALL_ = new DataSpace(H5S_ALL);
|
||||
else
|
||||
throw DataSpaceIException("DataSpace::getConstant", "DataSpace::getConstant is being invoked on an allocated ALL_");
|
||||
return(ALL_);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSpace::deleteConstants
|
||||
// Purpose: Deletes the constant object that DataSpace::ALL_ points to
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSpace::deleteConstants()
|
||||
{
|
||||
if (ALL_ != 0)
|
||||
delete ALL_;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Purpose Constant for default dataspace.
|
||||
//--------------------------------------------------------------------------
|
||||
const DataSpace& DataSpace::ALL = *getConstant();
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSpace constructor
|
||||
@@ -85,6 +135,7 @@ DataSpace::DataSpace( int rank, const hsize_t * dims, const hsize_t * maxdims) :
|
||||
DataSpace::DataSpace(const hid_t existing_id) : IdComponent()
|
||||
{
|
||||
id = existing_id;
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -93,7 +144,7 @@ DataSpace::DataSpace(const hid_t existing_id) : IdComponent()
|
||||
///\param original - IN: DataSpace object to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpace::DataSpace(const DataSpace& original) : IdComponent(original)
|
||||
DataSpace::DataSpace(const DataSpace& original) : IdComponent()
|
||||
{
|
||||
id = original.getId();
|
||||
incRefCount(); // increment number of references to this id
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace H5 {
|
||||
//! Class DataSpace operates on HDF5 dataspaces.
|
||||
class H5_DLLCPP DataSpace : public IdComponent {
|
||||
public:
|
||||
// Default DataSpace objects
|
||||
static const DataSpace ALL;
|
||||
///\brief Default DataSpace objects
|
||||
static const DataSpace& ALL;
|
||||
|
||||
// Creates a dataspace object given the space type
|
||||
DataSpace(H5S_class_t type = H5S_SCALAR);
|
||||
@@ -118,17 +118,34 @@ class H5_DLLCPP DataSpace : public IdComponent {
|
||||
// Gets the dataspace id.
|
||||
virtual hid_t getId() const;
|
||||
|
||||
// Deletes the global constant
|
||||
static void deleteConstants();
|
||||
|
||||
// Destructor: properly terminates access to this dataspace.
|
||||
virtual ~DataSpace();
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
protected:
|
||||
// Sets the dataspace id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
private:
|
||||
hid_t id; // HDF5 dataspace id
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
static DataSpace* ALL_;
|
||||
|
||||
// Creates the global constant
|
||||
static DataSpace* getConstant();
|
||||
|
||||
// Friend function to set DataSpace id. For library use only.
|
||||
friend void f_DataSpace_setId(DataSpace *dspace, hid_t new_id);
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "H5Object.h"
|
||||
#include "H5FaccProp.h"
|
||||
#include "H5FcreatProp.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5DxferProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
@@ -71,6 +72,7 @@ DataType::DataType() : H5Object(), id(H5I_INVALID_HID) {}
|
||||
DataType::DataType(const hid_t existing_id) : H5Object()
|
||||
{
|
||||
id = existing_id;
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -105,7 +107,7 @@ DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object()
|
||||
// Jul, 2008
|
||||
// Added for application convenience.
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID)
|
||||
DataType::DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object()
|
||||
{
|
||||
id = H5Location::p_dereference(loc.getId(), ref, ref_type, plist, "constructor - by dereference");
|
||||
}
|
||||
@@ -134,12 +136,33 @@ DataType::DataType(const Attribute& attr, const void* ref, H5R_type_t ref_type,
|
||||
///\brief Copy constructor: makes a copy of the original DataType object.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::DataType(const DataType& original) : H5Object(original)
|
||||
DataType::DataType(const DataType& original) : H5Object()
|
||||
{
|
||||
id = original.getId();
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType overloaded constructor
|
||||
///\brief Creates a DataType instance using a predefined type
|
||||
///\param pred_type - IN: Predefined datatype
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
// Description
|
||||
// Copying the type so that when a predefined type is passed in,
|
||||
// a copy of it is made, not just a duplicate of the HDF5 id.
|
||||
// Note: calling DataType::copy will invoke DataType::close()
|
||||
// unnecessarily and will produce undefined behavior.
|
||||
// -BMR, Apr 2015
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::DataType(const PredType& pred_type) : H5Object()
|
||||
{
|
||||
// call C routine to copy the datatype
|
||||
id = H5Tcopy( pred_type.getId() );
|
||||
if (id < 0)
|
||||
throw DataTypeIException("DataType constructor", "H5Tcopy failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::copy
|
||||
///\brief Copies an existing datatype to this datatype object
|
||||
@@ -203,11 +226,21 @@ void DataType::copy(const DataSet& dset)
|
||||
// Makes a copy of the type on the right hand side and stores
|
||||
// the new id in the left hand side object.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// Changed operator= to simply copy the id of rhs instead of
|
||||
// calling H5Tcopy because, when the operator= is invoked, a
|
||||
// different datatype id is created and it won't have the same
|
||||
// characteristics as the original one, specifically, if the
|
||||
// rhs represents a named datatype, "this" would still be a
|
||||
// transient datatype.
|
||||
// BMR - Mar, 2015
|
||||
//--------------------------------------------------------------------------
|
||||
DataType& DataType::operator=( const DataType& rhs )
|
||||
{
|
||||
if (this != &rhs)
|
||||
copy(rhs);
|
||||
{
|
||||
setId(rhs.id);
|
||||
}
|
||||
return(*this);
|
||||
}
|
||||
|
||||
@@ -463,8 +496,9 @@ DataType DataType::getSuper() const
|
||||
// the base type, otherwise, raise exception
|
||||
if( base_type_id > 0 )
|
||||
{
|
||||
DataType base_type( base_type_id );
|
||||
return( base_type );
|
||||
DataType base_type;
|
||||
base_type.p_setId(base_type_id);
|
||||
return(base_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -726,23 +760,17 @@ void DataType::close()
|
||||
// - Added the use of H5CPP_EXITED to terminate the HDF5 library
|
||||
// and elimiate previous memory leaks. See comments in the
|
||||
// header file "H5PredType.h" for details. - BMR, Mar 30, 2012
|
||||
// - Major re-implementation of the global constants was done
|
||||
// to avoid relying on the order of the creation and deletion
|
||||
// of the global constants. Hence, H5CPP_EXITED was removed.
|
||||
// See Design Notes in "H5PredType.cpp" for details.
|
||||
// - BMR, Sep 30, 2015
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::~DataType()
|
||||
{
|
||||
try
|
||||
{
|
||||
/* If this is the object AtExit, terminate the HDF5 library. This is
|
||||
to eliminate memory leaks due to the library being re-initiated
|
||||
(after the program has ended) and not re-terminated. */
|
||||
if (id == H5CPP_EXITED)
|
||||
{
|
||||
herr_t ret_value = H5close();
|
||||
if (ret_value == FAIL)
|
||||
throw DataTypeIException(inMemFunc("~DataType - "), "H5close failed");
|
||||
}
|
||||
// Close the HDF5 datatype
|
||||
else
|
||||
close();
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
cerr << inMemFunc("~DataType - ") << close_error.getDetailMsg() << endl;
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
// Class DataType inherits from H5Object and has several subclasses for
|
||||
// specific HDF5 data types.
|
||||
|
||||
#ifndef __H5DataType_H
|
||||
#define __H5DataType_H
|
||||
|
||||
@@ -36,6 +39,9 @@ class H5_DLLCPP DataType : public H5Object {
|
||||
// Copy constructor: makes a copy of the original object
|
||||
DataType( const DataType& original );
|
||||
|
||||
// Creates a copy of a predefined type
|
||||
DataType(const PredType& pred_type);
|
||||
|
||||
// Creates a datatype by way of dereference.
|
||||
DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
|
||||
DataType(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
|
||||
@@ -133,6 +139,9 @@ class H5_DLLCPP DataType : public H5Object {
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
private:
|
||||
// Friend function to set DataType id. For library use only.
|
||||
friend void f_DataType_setId(DataType* dtype, hid_t new_id);
|
||||
|
||||
void p_commit(hid_t loc_id, const char* name);
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "H5Exception.h"
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
@@ -28,17 +29,70 @@
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// This DOXYGEN_SHOULD_SKIP_THIS block is a work-around approach to control
|
||||
// the order of creation and deletion of the global constants. See Design Notes
|
||||
// in "H5PredType.cpp" for information.
|
||||
|
||||
// Initialize a pointer for the constant
|
||||
DSetCreatPropList* DSetCreatPropList::DEFAULT_ = 0;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
///\brief Constant for dataset creation default property
|
||||
// Function: DSetCreatPropList::getConstant
|
||||
// Purpose: Creates a DSetCreatPropList object representing the HDF5
|
||||
// constant H5P_DATASET_CREATE, pointed to by
|
||||
// DSetCreatPropList::DEFAULT_
|
||||
// exception H5::PropListIException
|
||||
// Description
|
||||
// If DSetCreatPropList::DEFAULT_ already points to an allocated
|
||||
// object, throw a PropListIException. This scenario should
|
||||
// not happen.
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
const DSetCreatPropList DSetCreatPropList::DEFAULT;
|
||||
DSetCreatPropList* DSetCreatPropList::getConstant()
|
||||
{
|
||||
// Tell the C library not to clean up, H5Library::termH5cpp will call
|
||||
// H5close - more dependency if use H5Library::dontAtExit()
|
||||
if (!IdComponent::H5dontAtexit_called)
|
||||
{
|
||||
(void) H5dont_atexit();
|
||||
IdComponent::H5dontAtexit_called = true;
|
||||
}
|
||||
|
||||
// If the constant pointer is not allocated, allocate it. Otherwise,
|
||||
// throw because it shouldn't be.
|
||||
if (DEFAULT_ == 0)
|
||||
DEFAULT_ = new DSetCreatPropList(H5P_DATASET_CREATE);
|
||||
else
|
||||
throw PropListIException("DSetCreatPropList::getConstant", "DSetCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
|
||||
return(DEFAULT_);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetCreatPropList::deleteConstants
|
||||
// Purpose: Deletes the constant object that DSetCreatPropList::DEFAULT_
|
||||
// points to.
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetCreatPropList::deleteConstants()
|
||||
{
|
||||
if (DEFAULT_ != 0)
|
||||
delete DEFAULT_;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Purpose Constant for dataset creation default property
|
||||
//--------------------------------------------------------------------------
|
||||
const DSetCreatPropList& DSetCreatPropList::DEFAULT = *getConstant();
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetCreatPropList default constructor
|
||||
///\brief Default constructor: creates a stub dataset creation property list
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DSetCreatPropList::DSetCreatPropList() : PropList( H5P_DATASET_CREATE) {}
|
||||
DSetCreatPropList::DSetCreatPropList() : ObjCreatPropList(H5P_DATASET_CREATE) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetCreatPropList copy constructor
|
||||
@@ -46,7 +100,7 @@ DSetCreatPropList::DSetCreatPropList() : PropList( H5P_DATASET_CREATE) {}
|
||||
/// DSetCreatPropList object
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DSetCreatPropList::DSetCreatPropList( const DSetCreatPropList& orig ) : PropList( orig ) {}
|
||||
DSetCreatPropList::DSetCreatPropList( const DSetCreatPropList& orig ) : ObjCreatPropList(orig) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetCreatPropList overloaded constructor
|
||||
@@ -54,7 +108,7 @@ DSetCreatPropList::DSetCreatPropList( const DSetCreatPropList& orig ) : PropList
|
||||
/// existing dataset creation property list.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DSetCreatPropList::DSetCreatPropList(const hid_t plist_id) : PropList(plist_id) {}
|
||||
DSetCreatPropList::DSetCreatPropList(const hid_t plist_id) : ObjCreatPropList(plist_id) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetCreatPropList::setChunk
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
// Class DSetCreatPropList represents the HDF5 dataset creation property list
|
||||
// and inherits from PropList.
|
||||
|
||||
#ifndef __H5DSCreatPropList_H
|
||||
#define __H5DSCreatPropList_H
|
||||
|
||||
@@ -25,10 +28,10 @@ namespace H5 {
|
||||
\brief Class DSetCreatPropList represents the dataset creation property
|
||||
list.
|
||||
*/
|
||||
class H5_DLLCPP DSetCreatPropList : public PropList {
|
||||
class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
|
||||
public:
|
||||
// Default dataset creation property list.
|
||||
static const DSetCreatPropList DEFAULT;
|
||||
///\brief Default dataset creation property list.
|
||||
static const DSetCreatPropList& DEFAULT;
|
||||
|
||||
// Creates a dataset creation property list.
|
||||
DSetCreatPropList();
|
||||
@@ -123,6 +126,19 @@ class H5_DLLCPP DSetCreatPropList : public PropList {
|
||||
|
||||
// Noop destructor.
|
||||
virtual ~DSetCreatPropList();
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// Deletes the global constant, should only be used by the library
|
||||
static void deleteConstants();
|
||||
|
||||
private:
|
||||
static DSetCreatPropList* DEFAULT_;
|
||||
|
||||
// Creates the global constant, should only be used by the library
|
||||
static DSetCreatPropList* getConstant();
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
|
||||
@@ -22,24 +22,67 @@
|
||||
#include "H5DxferProp.h"
|
||||
#include "H5private.h" // for HDmemset
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
#ifndef H5_NO_STD
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
#endif // H5_NO_STD
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// This DOXYGEN_SHOULD_SKIP_THIS block is a work-around approach to control
|
||||
// the order of creation and deletion of the global constants. See Design Notes
|
||||
// in "H5PredType.cpp" for information.
|
||||
|
||||
// Initialize a pointer for the constant
|
||||
DSetMemXferPropList* DSetMemXferPropList::DEFAULT_ = 0;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
///\brief Constant for default dataset memory and transfer property list.
|
||||
// Function: DSetMemXferPropList::getConstant
|
||||
// Creates a DSetMemXferPropList object representing the HDF5
|
||||
// constant H5P_DATASET_XFER, pointed to by
|
||||
// DSetMemXferPropList::DEFAULT_
|
||||
// exception H5::PropListIException
|
||||
// Description
|
||||
// If DSetMemXferPropList::DEFAULT_ already points to an allocated
|
||||
// object, throw a PropListIException. This scenario should not
|
||||
// happen.
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
const DSetMemXferPropList DSetMemXferPropList::DEFAULT;
|
||||
DSetMemXferPropList* DSetMemXferPropList::getConstant()
|
||||
{
|
||||
// Tell the C library not to clean up, H5Library::termH5cpp will call
|
||||
// H5close - more dependency if use H5Library::dontAtExit()
|
||||
if (!IdComponent::H5dontAtexit_called)
|
||||
{
|
||||
(void) H5dont_atexit();
|
||||
IdComponent::H5dontAtexit_called = true;
|
||||
}
|
||||
|
||||
// If the constant pointer is not allocated, allocate it. Otherwise,
|
||||
// throw because it shouldn't be.
|
||||
if (DEFAULT_ == 0)
|
||||
DEFAULT_ = new DSetMemXferPropList(H5P_DATASET_XFER);
|
||||
else
|
||||
throw PropListIException("DSetMemXferPropList::getConstant", "DSetMemXferPropList::getConstant is being invoked on an allocated DEFAULT_");
|
||||
return(DEFAULT_);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetMemXferPropList::deleteConstants
|
||||
// Purpose: Deletes the constant object that DSetMemXferPropList::DEFAULT_
|
||||
// points to.
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetMemXferPropList::deleteConstants()
|
||||
{
|
||||
if (DEFAULT_ != 0)
|
||||
delete DEFAULT_;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Purpose Constant for default dataset memory and transfer property list.
|
||||
//--------------------------------------------------------------------------
|
||||
const DSetMemXferPropList& DSetMemXferPropList::DEFAULT = *getConstant();
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function DSetMemXferPropList default constructor
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
// Class DSetMemXferPropList represents the HDF5 dataset transfer property list
|
||||
// and inherits from PropList.
|
||||
|
||||
#ifndef __H5DSetMemXferPropList_H
|
||||
#define __H5DSetMemXferPropList_H
|
||||
|
||||
@@ -27,7 +30,8 @@ namespace H5 {
|
||||
*/
|
||||
class H5_DLLCPP DSetMemXferPropList : public PropList {
|
||||
public:
|
||||
static const DSetMemXferPropList DEFAULT;
|
||||
///\brief Default dataset memory and transfer property list.
|
||||
static const DSetMemXferPropList& DEFAULT;
|
||||
|
||||
// Creates a dataset memory and transfer property list.
|
||||
DSetMemXferPropList();
|
||||
@@ -113,9 +117,21 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
|
||||
|
||||
// Noop destructor
|
||||
virtual ~DSetMemXferPropList();
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// Deletes the global constant, should only be used by the library
|
||||
static void deleteConstants();
|
||||
|
||||
private:
|
||||
static DSetMemXferPropList* DEFAULT_;
|
||||
|
||||
// Creates the global constant, should only be used by the library
|
||||
static DSetMemXferPropList* getConstant();
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif // __H5DSetMemXferPropList_H
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "H5AbstractDs.h"
|
||||
#include "H5DxferProp.h"
|
||||
#include "H5DataSpace.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5DataType.h"
|
||||
|
||||
@@ -35,11 +35,11 @@ Exception::Exception() : detail_message(""), func_name("") {}
|
||||
// Function: Exception overloaded constructor
|
||||
///\brief Creates an exception with the name of the function,
|
||||
/// in which the failure occurs, and an optional detailed message.
|
||||
///\param func_name - IN: Name of the function where failure occurs
|
||||
///\param func - IN: Name of the function where failure occurs
|
||||
///\param message - IN: Message on the failure
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Exception::Exception(const H5std_string& func_name, const H5std_string& message) : detail_message(message), func_name(func_name) {}
|
||||
Exception::Exception(const H5std_string& func, const H5std_string& message) : detail_message(message), func_name(func) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Exception copy constructor
|
||||
@@ -309,9 +309,9 @@ const char* Exception::getCFuncName() const
|
||||
//--------------------------------------------------------------------------
|
||||
void Exception::printErrorStack(FILE* stream, hid_t err_stack)
|
||||
{
|
||||
herr_t ret_value = H5Eprint2(err_stack, stream);
|
||||
if( ret_value < 0 )
|
||||
throw Exception( "Printing error stack", "H5Eprint2 failed" );
|
||||
herr_t ret_value = H5Eprint2(err_stack, stream);
|
||||
if( ret_value < 0 )
|
||||
throw Exception( "Printing error stack", "H5Eprint2 failed" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -350,10 +350,10 @@ FileIException::FileIException():Exception(){}
|
||||
// Function: FileIException overloaded constructor
|
||||
///\brief Creates a FileIException with the name of the function,
|
||||
/// in which the failure occurs, and an optional detailed message.
|
||||
///\param func_name - IN: Name of the function where failure occurs
|
||||
///\param func - IN: Name of the function where failure occurs
|
||||
///\param message - IN: Message on the failure
|
||||
//--------------------------------------------------------------------------
|
||||
FileIException::FileIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
|
||||
FileIException::FileIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileIException destructor
|
||||
///\brief Noop destructor.
|
||||
@@ -373,10 +373,10 @@ GroupIException::GroupIException():Exception(){}
|
||||
// Function: GroupIException overloaded constructor
|
||||
///\brief Creates a GroupIException with the name of the function,
|
||||
/// in which the failure occurs, and an optional detailed message.
|
||||
///\param func_name - IN: Name of the function where failure occurs
|
||||
///\param func - IN: Name of the function where failure occurs
|
||||
///\param message - IN: Message on the failure
|
||||
//--------------------------------------------------------------------------
|
||||
GroupIException::GroupIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
|
||||
GroupIException::GroupIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: GroupIException destructor
|
||||
///\brief Noop destructor.
|
||||
@@ -396,10 +396,10 @@ DataSpaceIException::DataSpaceIException():Exception(){}
|
||||
// Function: DataSpaceIException overloaded constructor
|
||||
///\brief Creates a DataSpaceIException with the name of the function,
|
||||
/// in which the failure occurs, and an optional detailed message.
|
||||
///\param func_name - IN: Name of the function where failure occurs
|
||||
///\param func - IN: Name of the function where failure occurs
|
||||
///\param message - IN: Message on the failure
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpaceIException::DataSpaceIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
|
||||
DataSpaceIException::DataSpaceIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSpaceIException destructor
|
||||
///\brief Noop destructor.
|
||||
@@ -419,10 +419,10 @@ DataTypeIException::DataTypeIException():Exception(){}
|
||||
// Function: DataTypeIException overloaded constructor
|
||||
///\brief Creates a DataTypeIException with the name of the function,
|
||||
/// in which the failure occurs, and an optional detailed message.
|
||||
///\param func_name - IN: Name of the function where failure occurs
|
||||
///\param func - IN: Name of the function where failure occurs
|
||||
///\param message - IN: Message on the failure
|
||||
//--------------------------------------------------------------------------
|
||||
DataTypeIException::DataTypeIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
|
||||
DataTypeIException::DataTypeIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataTypeIException destructor
|
||||
///\brief Noop destructor.
|
||||
@@ -442,10 +442,10 @@ PropListIException::PropListIException():Exception(){}
|
||||
// Function: PropListIException overloaded constructor
|
||||
///\brief Creates a PropListIException with the name of the function,
|
||||
/// in which the failure occurs, and an optional detailed message.
|
||||
///\param func_name - IN: Name of the function where failure occurs
|
||||
///\param func - IN: Name of the function where failure occurs
|
||||
///\param message - IN: Message on the failure
|
||||
//--------------------------------------------------------------------------
|
||||
PropListIException::PropListIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
|
||||
PropListIException::PropListIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: PropListIException destructor
|
||||
///\brief Noop destructor.
|
||||
@@ -465,10 +465,10 @@ DataSetIException::DataSetIException():Exception(){}
|
||||
// Function: DataSetIException overloaded constructor
|
||||
///\brief Creates a DataSetIException with the name of the function,
|
||||
/// in which the failure occurs, and an optional detailed message.
|
||||
///\param func_name - IN: Name of the function where failure occurs
|
||||
///\param func - IN: Name of the function where failure occurs
|
||||
///\param message - IN: Message on the failure
|
||||
//--------------------------------------------------------------------------
|
||||
DataSetIException::DataSetIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
|
||||
DataSetIException::DataSetIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSetIException destructor
|
||||
///\brief Noop destructor.
|
||||
@@ -488,10 +488,10 @@ AttributeIException::AttributeIException():Exception(){}
|
||||
// Function: AttributeIException overloaded constructor
|
||||
///\brief Creates an AttributeIException with the name of the function,
|
||||
/// in which the failure occurs, and an optional detailed message.
|
||||
///\param func_name - IN: Name of the function where failure occurs
|
||||
///\param func - IN: Name of the function where failure occurs
|
||||
///\param message - IN: Message on the failure
|
||||
//--------------------------------------------------------------------------
|
||||
AttributeIException::AttributeIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
|
||||
AttributeIException::AttributeIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: AttributeIException destructor
|
||||
///\brief Noop destructor.
|
||||
@@ -511,10 +511,10 @@ ReferenceException::ReferenceException():Exception(){}
|
||||
// Function: ReferenceException overloaded constructor
|
||||
///\brief Creates a ReferenceException with the name of the function,
|
||||
/// in which the failure occurs, and an optional detailed message.
|
||||
///\param func_name - IN: Name of the function where failure occurs
|
||||
///\param func - IN: Name of the function where failure occurs
|
||||
///\param message - IN: Message on the failure
|
||||
//--------------------------------------------------------------------------
|
||||
ReferenceException::ReferenceException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
|
||||
ReferenceException::ReferenceException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: ReferenceException destructor
|
||||
///\brief Noop destructor.
|
||||
@@ -534,10 +534,10 @@ LibraryIException::LibraryIException():Exception(){}
|
||||
// Function: LibraryIException overloaded constructor
|
||||
///\brief Creates a LibraryIException with the name of the function,
|
||||
/// in which the failure occurs, and an optional detailed message.
|
||||
///\param func_name - IN: Name of the function where failure occurs
|
||||
///\param func - IN: Name of the function where failure occurs
|
||||
///\param message - IN: Message on the failure
|
||||
//--------------------------------------------------------------------------
|
||||
LibraryIException::LibraryIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
|
||||
LibraryIException::LibraryIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: LibraryIException destructor
|
||||
///\brief Noop destructor.
|
||||
@@ -557,10 +557,10 @@ LocationException::LocationException():Exception(){}
|
||||
// Function: LocationException overloaded constructor
|
||||
///\brief Creates a LocationException with the name of the function,
|
||||
/// in which the failure occurs, and an optional detailed message.
|
||||
///\param func_name - IN: Name of the function where failure occurs
|
||||
///\param func - IN: Name of the function where failure occurs
|
||||
///\param message - IN: Message on the failure
|
||||
//--------------------------------------------------------------------------
|
||||
LocationException::LocationException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
|
||||
LocationException::LocationException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: LocationException destructor
|
||||
///\brief Noop destructor.
|
||||
@@ -580,10 +580,10 @@ IdComponentException::IdComponentException(): Exception() {}
|
||||
// Function: IdComponentException overloaded constructor
|
||||
///\brief Creates a IdComponentException with the name of the function,
|
||||
/// in which the failure occurs, and an optional detailed message.
|
||||
///\param func_name - IN: Name of the function where failure occurs
|
||||
///\param func - IN: Name of the function where failure occurs
|
||||
///\param message - IN: Message on the failure
|
||||
//--------------------------------------------------------------------------
|
||||
IdComponentException::IdComponentException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
|
||||
IdComponentException::IdComponentException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponentException destructor
|
||||
///\brief Noop destructor.
|
||||
|
||||
@@ -86,8 +86,8 @@ class H5_DLLCPP Exception {
|
||||
virtual ~Exception() throw();
|
||||
|
||||
protected:
|
||||
// Default value for detail_message
|
||||
static const char DEFAULT_MSG[];
|
||||
// Default value for detail_message
|
||||
static const char DEFAULT_MSG[];
|
||||
|
||||
private:
|
||||
H5std_string detail_message;
|
||||
|
||||
@@ -25,10 +25,63 @@
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// This DOXYGEN_SHOULD_SKIP_THIS block is a work-around approach to control
|
||||
// the order of creation and deletion of the global constants. See Design Notes
|
||||
// in "H5PredType.cpp" for information.
|
||||
|
||||
// Initialize a pointer for the constant
|
||||
FileAccPropList* FileAccPropList::DEFAULT_ = 0;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
///\brief Constant for default property
|
||||
// Function: FileAccPropList::getConstant
|
||||
// Creates a FileAccPropList object representing the HDF5 constant
|
||||
// H5P_FILE_ACCESS, pointed to by FileAccPropList::DEFAULT_
|
||||
// exception H5::PropListIException
|
||||
// Description
|
||||
// If FileAccPropList::DEFAULT_ already points to an allocated
|
||||
// object, throw a PropListIException. This scenario should not
|
||||
// happen.
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
const FileAccPropList FileAccPropList::DEFAULT;
|
||||
FileAccPropList* FileAccPropList::getConstant()
|
||||
{
|
||||
// Tell the C library not to clean up, H5Library::termH5cpp will call
|
||||
// H5close - more dependency if use H5Library::dontAtExit()
|
||||
if (!IdComponent::H5dontAtexit_called)
|
||||
{
|
||||
(void) H5dont_atexit();
|
||||
IdComponent::H5dontAtexit_called = true;
|
||||
}
|
||||
|
||||
// If the constant pointer is not allocated, allocate it. Otherwise,
|
||||
// throw because it shouldn't be.
|
||||
if (DEFAULT_ == 0)
|
||||
DEFAULT_ = new FileAccPropList(H5P_FILE_ACCESS);
|
||||
else
|
||||
throw PropListIException("FileAccPropList::getConstant", "FileAccPropList::getConstant is being invoked on an allocated DEFAULT_");
|
||||
return(DEFAULT_);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileAccPropList::deleteConstants
|
||||
// Purpose: Deletes the constant object that FileAccPropList::DEFAULT_
|
||||
// points to.
|
||||
// exception H5::PropListIException
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::deleteConstants()
|
||||
{
|
||||
if (DEFAULT_ != 0)
|
||||
delete DEFAULT_;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Purpose: Constant for default property
|
||||
//--------------------------------------------------------------------------
|
||||
const FileAccPropList& FileAccPropList::DEFAULT = *getConstant();
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Default Constructor
|
||||
@@ -40,10 +93,10 @@ FileAccPropList::FileAccPropList() : PropList( H5P_FILE_ACCESS ) {}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileAccPropList copy constructor
|
||||
///\brief Copy Constructor: makes a copy of the original
|
||||
/// FileAccPropList object.
|
||||
///\param original - IN: FileAccPropList instance to copy
|
||||
// Programmer: Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
FileAccPropList::FileAccPropList(const FileAccPropList& orig) : PropList(orig) {}
|
||||
FileAccPropList::FileAccPropList(const FileAccPropList& original) : PropList(original) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileAccPropList overloaded constructor
|
||||
@@ -663,6 +716,67 @@ unsigned FileAccPropList::getGcReferences() const
|
||||
return( gc_ref );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileAccPropList::setLibverBounds
|
||||
///\brief Sets bounds on versions of library format to be used when creating
|
||||
/// or writing objects.
|
||||
///\param libver_low - IN: Earliest version of the library that will be
|
||||
/// used for creating or writing objects
|
||||
///\param libver_high - IN: Latest version of the library that will be
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// Valid values of \a libver_low are as follows:
|
||||
/// \li \c H5F_LIBVER_EARLIEST (Default)
|
||||
/// \li \c H5F_LIBVER_18
|
||||
/// \li \c H5F_LIBVER_LATEST
|
||||
///
|
||||
/// Valid values of \a libver_high are as follows:
|
||||
/// \li \c H5F_LIBVER_18
|
||||
/// \li \c H5F_LIBVER_LATEST (Default)
|
||||
///
|
||||
/// For more details, please refer to
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetLibverBounds
|
||||
// Programmer: Binh-Minh Ribler - March, 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_high) const
|
||||
{
|
||||
herr_t ret_value = H5Pset_libver_bounds(id, libver_low, libver_high);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw PropListIException("FileAccPropList::setLibverBounds", "H5Pset_libver_bounds failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileAccPropList::getLibverBounds
|
||||
///\brief Gets the current settings for the library version format bounds
|
||||
/// from a file access property list.
|
||||
///\param libver_low - OUT: Earliest version of the library that will be
|
||||
/// used for creating or writing objects
|
||||
///\param libver_high - OUT: Latest version of the library that will be
|
||||
/// used for creating or writing objects
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// On success, the argument \a libver_low can have the following
|
||||
/// values:
|
||||
/// \li \c H5F_LIBVER_EARLIEST
|
||||
/// \li \c H5F_LIBVER_18
|
||||
/// \li \c H5F_LIBVER_LATEST
|
||||
///
|
||||
/// and \a libver_high:
|
||||
/// \li \c H5F_LIBVER_18
|
||||
/// \li \c H5F_LIBVER_LATEST
|
||||
// Programmer: Binh-Minh Ribler - March, 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::getLibverBounds(H5F_libver_t& libver_low, H5F_libver_t& libver_high) const
|
||||
{
|
||||
herr_t ret_value = H5Pget_libver_bounds(id, &libver_low, &libver_high);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException("FileAccPropList::getLibverBounds", "H5Pget_libver_bounds failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileAccPropList destructor
|
||||
///\brief Noop destructor
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
// Class FileAccPropList represents the HDF5 file access property list and
|
||||
// inherits from DataType.
|
||||
|
||||
#ifndef __H5FileAccPropList_H
|
||||
#define __H5FileAccPropList_H
|
||||
|
||||
@@ -24,7 +27,8 @@ namespace H5 {
|
||||
//! Class FileAccPropList represents the HDF5 file access property list.
|
||||
class H5_DLLCPP FileAccPropList : public PropList {
|
||||
public:
|
||||
static const FileAccPropList DEFAULT;
|
||||
///\brief Default file access property list.
|
||||
static const FileAccPropList& DEFAULT;
|
||||
|
||||
// Creates a file access property list.
|
||||
FileAccPropList();
|
||||
@@ -126,6 +130,13 @@ class H5_DLLCPP FileAccPropList : public PropList {
|
||||
// Returns garbage collecting references setting.
|
||||
unsigned getGcReferences() const;
|
||||
|
||||
// Sets bounds on versions of library format to be used when creating
|
||||
// or writing objects.
|
||||
void setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_high) const;
|
||||
|
||||
// Gets the current settings for the library version format bounds.
|
||||
void getLibverBounds(H5F_libver_t& libver_low, H5F_libver_t& libver_high) const;
|
||||
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("FileAccPropList"); }
|
||||
|
||||
@@ -138,6 +149,20 @@ class H5_DLLCPP FileAccPropList : public PropList {
|
||||
|
||||
// Noop destructor
|
||||
virtual ~FileAccPropList();
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// Deletes the global constant, should only be used by the library
|
||||
static void deleteConstants();
|
||||
|
||||
private:
|
||||
static FileAccPropList* DEFAULT_;
|
||||
|
||||
// Creates the global constant, should only be used by the library
|
||||
static FileAccPropList* getConstant();
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
|
||||
@@ -25,10 +25,61 @@
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// This DOXYGEN_SHOULD_SKIP_THIS block is a work-around approach to control
|
||||
// the order of creation and deletion of the global constants. See Design Notes
|
||||
// in "H5PredType.cpp" for information.
|
||||
|
||||
// Initialize a pointer for the constant
|
||||
FileCreatPropList* FileCreatPropList::DEFAULT_ = 0;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
///\brief Constant for default property
|
||||
// Function: FileCreatPropList::getConstant
|
||||
// Purpose: Creates a FileCreatPropList object representing the HDF5
|
||||
// constant H5P_FILE_ACCESS, pointed to by FileCreatPropList::DEFAULT_
|
||||
// exception H5::PropListIException
|
||||
// Description
|
||||
// If FileCreatPropList::DEFAULT_ already points to an allocated
|
||||
// object, throw a PropListIException. This scenario should not happen.
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
const FileCreatPropList FileCreatPropList::DEFAULT;
|
||||
FileCreatPropList* FileCreatPropList::getConstant()
|
||||
{
|
||||
// Tell the C library not to clean up, H5Library::termH5cpp will call
|
||||
// H5close - more dependency if use H5Library::dontAtExit()
|
||||
if (!IdComponent::H5dontAtexit_called)
|
||||
{
|
||||
(void) H5dont_atexit();
|
||||
IdComponent::H5dontAtexit_called = true;
|
||||
}
|
||||
|
||||
// If the constant pointer is not allocated, allocate it. Otherwise,
|
||||
// throw because it shouldn't be.
|
||||
if (DEFAULT_ == 0)
|
||||
DEFAULT_ = new FileCreatPropList(H5P_FILE_CREATE);
|
||||
else
|
||||
throw PropListIException("FileCreatPropList::getConstant", "FileCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
|
||||
return(DEFAULT_);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileCreatPropList::deleteConstants
|
||||
// Purpose: Deletes the constant object that FileCreatPropList::DEFAULT_
|
||||
// points to.
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void FileCreatPropList::deleteConstants()
|
||||
{
|
||||
if (DEFAULT_ != 0)
|
||||
delete DEFAULT_;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Purpose Constant for default property
|
||||
//--------------------------------------------------------------------------
|
||||
const FileCreatPropList& FileCreatPropList::DEFAULT = *getConstant();
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileCreatPropList default constructor
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace H5 {
|
||||
//! Class FileCreatPropList represents the HDF5 file create property list.
|
||||
class H5_DLLCPP FileCreatPropList : public PropList {
|
||||
public:
|
||||
// Default file creation property list.
|
||||
static const FileCreatPropList DEFAULT;
|
||||
///\brief Default file creation property list.
|
||||
static const FileCreatPropList& DEFAULT;
|
||||
|
||||
// Creates a file create property list.
|
||||
FileCreatPropList();
|
||||
@@ -74,6 +74,20 @@ class H5_DLLCPP FileCreatPropList : public PropList {
|
||||
|
||||
// Noop destructor
|
||||
virtual ~FileCreatPropList();
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// Deletes the global constant, should only be used by the library
|
||||
static void deleteConstants();
|
||||
|
||||
private:
|
||||
static FileCreatPropList* DEFAULT_;
|
||||
|
||||
// Creates the global constant, should only be used by the library
|
||||
static FileCreatPropList* getConstant();
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "H5Object.h"
|
||||
#include "H5FaccProp.h"
|
||||
#include "H5FcreatProp.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DxferProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
@@ -50,7 +51,7 @@ namespace H5 {
|
||||
///\brief Default constructor: creates a stub H5File object.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5File::H5File() : H5Location(), id(H5I_INVALID_HID) {}
|
||||
H5File::H5File() : H5Location(), CommonFG(), id(H5I_INVALID_HID) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File overloaded constructor
|
||||
@@ -73,9 +74,6 @@ H5File::H5File() : H5Location(), id(H5I_INVALID_HID) {}
|
||||
/// exists, and fail, otherwise
|
||||
/// \li \c H5F_ACC_RDWR - Open file for read/write, if it already
|
||||
/// exists, and fail, otherwise
|
||||
/// \li \c H5F_ACC_DEBUG - print debug information. This flag is
|
||||
/// used only by HDF5 library developers; it is neither
|
||||
/// tested nor supported for use in applications.
|
||||
///\par
|
||||
/// For info on file creation in the case of an already-open file,
|
||||
/// please refer to the \b Special \b case section in the C layer
|
||||
@@ -86,7 +84,7 @@ H5File::H5File() : H5Location(), id(H5I_INVALID_HID) {}
|
||||
// to catch then re-throw it. -BMR 2013/03/21
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(), id(H5I_INVALID_HID)
|
||||
H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(), CommonFG(), id(H5I_INVALID_HID)
|
||||
{
|
||||
try {
|
||||
p_get_file(name, flags, create_plist, access_plist);
|
||||
@@ -111,7 +109,7 @@ H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& c
|
||||
// to catch then re-throw it. -BMR 2013/03/21
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5File::H5File( const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(), id(H5I_INVALID_HID)
|
||||
H5File::H5File( const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(), CommonFG(), id(H5I_INVALID_HID)
|
||||
{
|
||||
try {
|
||||
p_get_file(name.c_str(), flags, create_plist, access_plist);
|
||||
@@ -133,7 +131,7 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro
|
||||
{
|
||||
// These bits only set for creation, so if any of them are set,
|
||||
// create the file.
|
||||
if( flags & (H5F_ACC_EXCL|H5F_ACC_TRUNC|H5F_ACC_DEBUG))
|
||||
if( flags & (H5F_ACC_EXCL|H5F_ACC_TRUNC))
|
||||
{
|
||||
hid_t create_plist_id = create_plist.getId();
|
||||
hid_t access_plist_id = access_plist.getId();
|
||||
@@ -155,6 +153,25 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File overloaded constructor
|
||||
///\brief Creates an H5File object using an existing file id.
|
||||
///\param existing_id - IN: Id of an existing file
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
// Description
|
||||
// Mar 29, 2015
|
||||
// Added in responding to a request from user Jason Newton.
|
||||
// However, it is not recommended to use the private member "id"
|
||||
// in applications. Unlike other situations, where similar
|
||||
// constructor is needed by the library in order to return
|
||||
// an object, H5File doesn't need it. -BMR (HDFFV-8766 partially)
|
||||
//--------------------------------------------------------------------------
|
||||
H5File::H5File(hid_t existing_id) : H5Location(), CommonFG()
|
||||
{
|
||||
id = existing_id;
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -164,7 +181,7 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro
|
||||
///\param original - IN: H5File instance to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5File::H5File(const H5File& original) : H5Location(original)
|
||||
H5File::H5File(const H5File& original) : H5Location(), CommonFG()
|
||||
{
|
||||
id = original.getId();
|
||||
incRefCount(); // increment number of references to this id
|
||||
@@ -225,6 +242,13 @@ bool H5File::isHdf5(const H5std_string& name )
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::openFile(const char* name, unsigned int flags, const FileAccPropList& access_plist)
|
||||
{
|
||||
try {
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
throw FileIException("H5File::openFile", close_error.getDetailMsg());
|
||||
}
|
||||
|
||||
hid_t access_plist_id = access_plist.getId();
|
||||
id = H5Fopen (name, flags, access_plist_id);
|
||||
if (id < 0) // throw an exception when open fails
|
||||
@@ -378,25 +402,6 @@ ssize_t H5File::getObjCount(unsigned types) const
|
||||
return (num_objs);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getObjCount
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes no parameter and returns the object count of all
|
||||
/// object types.
|
||||
///\return Number of opened object IDs
|
||||
///\exception H5::FileIException
|
||||
// Programmer Binh-Minh Ribler - May 2004
|
||||
//--------------------------------------------------------------------------
|
||||
ssize_t H5File::getObjCount() const
|
||||
{
|
||||
ssize_t num_objs = H5Fget_obj_count(id, H5F_OBJ_ALL);
|
||||
if( num_objs < 0 )
|
||||
{
|
||||
throw FileIException("H5File::getObjCount", "H5Fget_obj_count failed");
|
||||
}
|
||||
return (num_objs);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getObjIDs
|
||||
///\brief Retrieves a list of opened object IDs (files, datasets,
|
||||
@@ -518,16 +523,16 @@ hsize_t H5File::getFileSize() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getId
|
||||
// Function: H5File::getId
|
||||
///\brief Get the id of this file
|
||||
///\return File identifier
|
||||
// Modification:
|
||||
// May 2008 - BMR
|
||||
// Class hierarchy is revised to address bugzilla 1068. Class
|
||||
// AbstractDS and Attribute are moved out of H5Object. In
|
||||
// addition, member IdComponent::id is moved into subclasses, and
|
||||
// IdComponent::getId now becomes pure virtual function.
|
||||
// Programmer Binh-Minh Ribler - May, 2008
|
||||
// May 2008 - BMR
|
||||
// Class hierarchy is revised to address bugzilla 1068. Class
|
||||
// AbstractDS and Attribute are moved out of H5Object. In
|
||||
// addition, member IdComponent::id is moved into subclasses, and
|
||||
// IdComponent::getId now becomes pure virtual function.
|
||||
// Programmer Binh-Minh Ribler - May, 2008
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t H5File::getId() const
|
||||
{
|
||||
@@ -535,19 +540,6 @@ hid_t H5File::getId() const
|
||||
}
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getLocId
|
||||
// Purpose: Get the id of this file
|
||||
// Description
|
||||
// This function is a redefinition of CommonFG::getLocId. It
|
||||
// is used by CommonFG member functions to get the file id.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t H5File::getLocId() const
|
||||
{
|
||||
return( getId() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::reopen
|
||||
// Purpose: Reopens this file.
|
||||
@@ -562,16 +554,29 @@ void H5File::reopen()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::p_setId (protected)
|
||||
///\brief Sets the identifier of this object to a new value.
|
||||
// Function: H5File::getLocId
|
||||
// Purpose: Get the id of this file
|
||||
// Description
|
||||
// This function is a redefinition of CommonFG::getLocId. It
|
||||
// is used by CommonFG member functions to get the file id.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t H5File::getLocId() const
|
||||
{
|
||||
return( getId() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::p_setId (protected)
|
||||
///\brief Sets the identifier of this object to a new value.
|
||||
///
|
||||
///\exception H5::IdComponentException when the attempt to close the HDF5
|
||||
/// object fails
|
||||
///\exception H5::IdComponentException when the attempt to close the HDF5
|
||||
/// object fails
|
||||
// Description:
|
||||
// The underlaying reference counting in the C library ensures
|
||||
// that the current valid id of this object is properly closed.
|
||||
// Then the object's id is reset to the new id.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// The underlaying reference counting in the C library ensures
|
||||
// that the current valid id of this object is properly closed.
|
||||
// Then the object's id is reset to the new id.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::p_setId(const hid_t new_id)
|
||||
{
|
||||
|
||||
@@ -59,8 +59,7 @@ class H5_DLLCPP H5File : public H5Location, public CommonFG {
|
||||
|
||||
// Returns the number of opened object IDs (files, datasets, groups
|
||||
// and datatypes) in the same file.
|
||||
ssize_t getObjCount(unsigned types) const;
|
||||
ssize_t getObjCount() const;
|
||||
ssize_t getObjCount(unsigned types = H5F_OBJ_ALL) const;
|
||||
|
||||
// Retrieves a list of opened object IDs (files, datasets, groups
|
||||
// and datatypes) in the same file.
|
||||
@@ -84,6 +83,10 @@ class H5_DLLCPP H5File : public H5Location, public CommonFG {
|
||||
// Gets the file id
|
||||
virtual hid_t getLocId() const;
|
||||
|
||||
// Creates an H5File using an existing file id. Not recommended
|
||||
// in applications.
|
||||
H5File(hid_t existing_id);
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
///\brief Returns this class name.
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5DataType.h"
|
||||
|
||||
@@ -24,10 +24,10 @@ namespace H5 {
|
||||
//! Class FloatType operates on HDF5 floating point datatype.
|
||||
class H5_DLLCPP FloatType : public AtomType {
|
||||
public:
|
||||
// Creates a floating-point type using a predefined type
|
||||
FloatType( const PredType& pred_type );
|
||||
// Creates a floating-point type using a predefined type.
|
||||
FloatType( const PredType& pred_type );
|
||||
|
||||
// Gets the floating-point datatype of the specified dataset
|
||||
// Gets the floating-point datatype of the specified dataset.
|
||||
FloatType( const DataSet& dataset );
|
||||
|
||||
// Retrieves the exponent bias of a floating-point type.
|
||||
@@ -60,7 +60,7 @@ class H5_DLLCPP FloatType : public AtomType {
|
||||
// Default constructor
|
||||
FloatType();
|
||||
|
||||
// Creates a floating-point datatype using an existing id
|
||||
// Creates a floating-point datatype using an existing id.
|
||||
FloatType( const hid_t existing_id );
|
||||
|
||||
// Copy constructor: makes a copy of the original FloatType object.
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "H5AbstractDs.h"
|
||||
#include "H5FaccProp.h"
|
||||
#include "H5FcreatProp.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5DxferProp.h"
|
||||
#include "H5DataSpace.h"
|
||||
@@ -51,7 +52,7 @@ namespace H5 {
|
||||
///\brief Default constructor: creates a stub Group.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Group::Group() : H5Object(), id(H5I_INVALID_HID) {}
|
||||
Group::Group() : H5Object(), CommonFG(), id(H5I_INVALID_HID) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group copy constructor
|
||||
@@ -59,7 +60,7 @@ Group::Group() : H5Object(), id(H5I_INVALID_HID) {}
|
||||
///\param original - IN: Original group to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Group::Group(const Group& original) : H5Object(original)
|
||||
Group::Group(const Group& original) : H5Object(), CommonFG()
|
||||
{
|
||||
id = original.getId();
|
||||
incRefCount(); // increment number of references to this id
|
||||
@@ -82,9 +83,10 @@ hid_t Group::getLocId() const
|
||||
///\param existing_id - IN: Id of an existing group
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Group::Group(const hid_t existing_id) : H5Object()
|
||||
Group::Group(const hid_t existing_id) : H5Object(), CommonFG()
|
||||
{
|
||||
id = existing_id;
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -100,7 +102,7 @@ Group::Group(const hid_t existing_id) : H5Object()
|
||||
/// is a datatype that has been named by DataType::commit.
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
//--------------------------------------------------------------------------
|
||||
Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID)
|
||||
Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), CommonFG(), id(H5I_INVALID_HID)
|
||||
{
|
||||
id = H5Location::p_dereference(loc.getId(), ref, ref_type, plist, "constructor - by dereference");
|
||||
}
|
||||
@@ -115,7 +117,7 @@ Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type, const
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
//--------------------------------------------------------------------------
|
||||
Group::Group(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID)
|
||||
Group::Group(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), CommonFG(), id(H5I_INVALID_HID)
|
||||
{
|
||||
id = H5Location::p_dereference(attr.getId(), ref, ref_type, plist, "constructor - by dereference");
|
||||
}
|
||||
|
||||
@@ -13,11 +13,6 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifdef OLD_HEADER_FILENAME
|
||||
#include <iostream.h>
|
||||
#else
|
||||
#include <iostream>
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
#include "H5Include.h"
|
||||
@@ -31,22 +26,30 @@
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent overloaded constructor
|
||||
///\brief Creates an IdComponent object using the id of an existing object.
|
||||
///\param h5_id - IN: Id of an existing object
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
IdComponent::IdComponent(const hid_t h5_id) {}
|
||||
// This flag indicates whether H5Library::initH5cpp has been called to register
|
||||
// the terminating functions with atexit()
|
||||
bool IdComponent::H5cppinit = false;
|
||||
|
||||
// This flag is used to decide whether H5dont_atexit should be called.
|
||||
// Subclasses that have global constants use it. This is a temporary
|
||||
// work-around in 1.8.16. It will be removed after HDFFV-9540 is fixed.
|
||||
bool IdComponent::H5dontAtexit_called = false;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent copy constructor
|
||||
///\brief Copy constructor: makes a copy of the original IdComponent object.
|
||||
///\param original - IN: IdComponent instance to copy
|
||||
// Function: IdComponent overloaded constructor
|
||||
///\brief Creates an IdComponent object using the id of an existing
|
||||
/// object. - Obsolete, will be removed in 1.8.17
|
||||
// Param h5_id - IN: Id of an existing object
|
||||
// Exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//
|
||||
// *** Deprecation warning ***
|
||||
// This constructor is no longer appropriate because the data member "id" had
|
||||
// been moved to the sub-classes. It will be removed in 1.10 release. If its
|
||||
// removal does not raise any problems in 1.10, it will be removed from 1.8 in
|
||||
// subsequent releases.
|
||||
//--------------------------------------------------------------------------
|
||||
IdComponent::IdComponent( const IdComponent& original ) {}
|
||||
IdComponent::IdComponent(const hid_t h5_id) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent::incRefCount
|
||||
@@ -82,12 +85,14 @@ void IdComponent::decRefCount(const hid_t obj_id) const
|
||||
{
|
||||
if (p_valid_id(obj_id))
|
||||
if (H5Idec_ref(obj_id) < 0)
|
||||
{
|
||||
if (H5Iget_ref(obj_id) <= 0)
|
||||
throw IdComponentException(inMemFunc("decRefCount"),
|
||||
"object ref count is 0 or negative");
|
||||
else
|
||||
throw IdComponentException(inMemFunc("decRefCount"),
|
||||
"decrementing object ref count failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -212,7 +217,7 @@ IdComponent& IdComponent::operator=( const IdComponent& rhs )
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent::setId
|
||||
///\brief Sets the identifier of this object to a new value.
|
||||
///
|
||||
///\param new_id - IN: New identifier to be set to
|
||||
///\exception H5::IdComponentException when the attempt to close the HDF5
|
||||
/// object fails
|
||||
// Description:
|
||||
@@ -227,8 +232,8 @@ IdComponent& IdComponent::operator=( const IdComponent& rhs )
|
||||
// C++ API object, which will be destroyed properly, and so
|
||||
// p_setId does not call incRefCount. On the other hand, the
|
||||
// public version setId is used by other applications, in which
|
||||
// the id passed to setId already has a reference count, so setId
|
||||
// must call incRefCount.
|
||||
// the id passed to setId is that of another C++ API object, so
|
||||
// setId must call incRefCount.
|
||||
//--------------------------------------------------------------------------
|
||||
void IdComponent::setId(const hid_t new_id)
|
||||
{
|
||||
@@ -266,15 +271,9 @@ IdComponent::~IdComponent() {}
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string IdComponent::inMemFunc(const char* func_name) const
|
||||
{
|
||||
#ifdef H5_VMS
|
||||
H5std_string full_name = fromClass();
|
||||
full_name.append("::");
|
||||
full_name.append(func_name);
|
||||
#else
|
||||
H5std_string full_name = func_name;
|
||||
full_name.insert(0, "::");
|
||||
full_name.insert(0, fromClass());
|
||||
#endif /*H5_VMS*/
|
||||
return (full_name);
|
||||
}
|
||||
|
||||
@@ -283,7 +282,16 @@ H5std_string IdComponent::inMemFunc(const char* func_name) const
|
||||
///\brief Default constructor.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
IdComponent::IdComponent() {}
|
||||
IdComponent::IdComponent()
|
||||
{
|
||||
// initH5cpp will register the terminating functions with atexit().
|
||||
// This should only be done once.
|
||||
if (!H5cppinit)
|
||||
{
|
||||
H5Library::initH5cpp();
|
||||
H5cppinit = true;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent::p_get_file_name (protected)
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#ifndef __IdComponent_H
|
||||
#define __IdComponent_H
|
||||
|
||||
// IdComponent represents an HDF5 object that has an identifier.
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
@@ -30,7 +32,8 @@ class DataSpace;
|
||||
rarely needs them.
|
||||
*/
|
||||
class H5_DLLCPP IdComponent {
|
||||
public:
|
||||
public:
|
||||
|
||||
// Increment reference counter.
|
||||
void incRefCount(const hid_t obj_id) const;
|
||||
void incRefCount() const;
|
||||
@@ -52,21 +55,27 @@ class H5_DLLCPP IdComponent {
|
||||
// Assignment operator.
|
||||
IdComponent& operator=( const IdComponent& rhs );
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Gets the identifier of this object.
|
||||
virtual hid_t getId () const = 0;
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// Sets the identifier of this object to a new value.
|
||||
void setId(const hid_t new_id);
|
||||
|
||||
// *** Deprecation warning ***
|
||||
// The following two constructors are no longer appropriate after the
|
||||
// data member "id" had been moved to the sub-classes.
|
||||
// The copy constructor is a noop and is removed in 1.8.15 and the
|
||||
// other will be removed from 1.10 release, and then from 1.8 if its
|
||||
// removal does not raise any problems in two 1.10 releases.
|
||||
|
||||
// Creates an object to hold an HDF5 identifier.
|
||||
IdComponent( const hid_t h5_id );
|
||||
|
||||
// Copy constructor: makes copy of the original IdComponent object.
|
||||
IdComponent( const IdComponent& original );
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// Copy constructor: makes copy of the original IdComponent object.
|
||||
// IdComponent( const IdComponent& original ); - removed from 1.8.15
|
||||
|
||||
// Gets the identifier of this object.
|
||||
virtual hid_t getId () const = 0;
|
||||
|
||||
// Pure virtual function for there are various H5*close for the
|
||||
// subclasses.
|
||||
virtual void close() = 0;
|
||||
@@ -83,11 +92,12 @@ class H5_DLLCPP IdComponent {
|
||||
// Destructor
|
||||
virtual ~IdComponent();
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
protected:
|
||||
// Default constructor.
|
||||
IdComponent();
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Gets the name of the file, in which an HDF5 object belongs.
|
||||
H5std_string p_get_file_name() const;
|
||||
|
||||
@@ -98,6 +108,14 @@ class H5_DLLCPP IdComponent {
|
||||
// doesn't increment reference count
|
||||
virtual void p_setId(const hid_t new_id) = 0;
|
||||
|
||||
// This flag is used to decide whether H5dont_atexit should be called
|
||||
static bool H5dontAtexit_called;
|
||||
|
||||
private:
|
||||
// This flag indicates whether H5Library::initH5cpp has been called
|
||||
// to register various terminating functions with atexit()
|
||||
static bool H5cppinit;
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
}; // end class IdComponent
|
||||
|
||||
@@ -28,3 +28,15 @@ typedef int bool;
|
||||
const bool false = 0;
|
||||
const bool true = 1;
|
||||
#endif
|
||||
|
||||
// These are defined in H5Opkg.h, which should not be included in the C++ API,
|
||||
// so re-define them here for now.
|
||||
|
||||
/* Initial version of the object header format */
|
||||
#define H5O_VERSION_1 1
|
||||
|
||||
/* Revised version - leaves out reserved bytes and alignment padding, and adds
|
||||
* magic number as prefix and checksum as suffix for all chunks.
|
||||
*/
|
||||
#define H5O_VERSION_2 2
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5DataType.h"
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace H5 {
|
||||
//! Class IntType operates on HDF5 integer datatype.
|
||||
class H5_DLLCPP IntType : public AtomType {
|
||||
public:
|
||||
// Creates a integer type using a predefined type
|
||||
// Creates an integer type using a predefined type
|
||||
IntType(const PredType& pred_type);
|
||||
|
||||
// Gets the integer datatype of the specified dataset
|
||||
|
||||
@@ -14,10 +14,23 @@
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include <string>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "H5CppDoc.h" // included only for Doxygen to generate part of RM
|
||||
#include "H5CppDoc.h" // included only for Doxygen to generate part of RM
|
||||
#include "H5Include.h"
|
||||
#include "H5Exception.h"
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5FaccProp.h"
|
||||
#include "H5FcreatProp.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DxferProp.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5DataType.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5AtomType.h"
|
||||
#include "H5PredType.h"
|
||||
#include "H5DataSpace.h"
|
||||
#include "H5Library.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
@@ -25,12 +38,14 @@ namespace H5 {
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// This static variable will be set to true when dontAtExit is called
|
||||
|
||||
// This static variable is unused, will be removed in future releases.
|
||||
bool H5Library::need_cleanup = false;
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Library::open
|
||||
// Function: H5Library::open (static)
|
||||
///\brief Initializes the HDF5 library.
|
||||
///
|
||||
///\exception H5::LibraryIException
|
||||
@@ -46,7 +61,7 @@ void H5Library::open()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Library::close
|
||||
// Function: H5Library::close (static)
|
||||
///\brief Flushes all data to disk, closes files, and cleans up memory.
|
||||
///
|
||||
///\exception H5::LibraryIException
|
||||
@@ -62,23 +77,22 @@ void H5Library::close()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Library::dontAtExit
|
||||
///\brief Instructs library not to install \c atexit cleanup routine
|
||||
// Function: H5Library::dontAtExit (static)
|
||||
///\brief Instructs library not to install the C \c atexit cleanup routine
|
||||
///
|
||||
///\exception H5::LibraryIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// Removed the check for failure returned from H5dont_atexit.
|
||||
// will be fixed to not fail (HDFFV-9540)
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Library::dontAtExit()
|
||||
{
|
||||
herr_t ret_value = H5dont_atexit();
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw LibraryIException("H5Library::dontAtExit", "H5dont_atexit failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Library::getLibVersion
|
||||
// Function: H5Library::getLibVersion (static)
|
||||
///\brief Returns the HDF library release number.
|
||||
///\param majnum - OUT: Major version of the library
|
||||
///\param minnum - OUT: Minor version of the library
|
||||
@@ -96,7 +110,7 @@ void H5Library::getLibVersion( unsigned& majnum, unsigned& minnum, unsigned& rel
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Library::checkVersion
|
||||
// Function: H5Library::checkVersion (static)
|
||||
///\brief Verifies that the arguments match the version numbers
|
||||
/// compiled into the library
|
||||
///\param majnum - IN: Major version of the library
|
||||
@@ -119,7 +133,7 @@ void H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Library::garbageCollect
|
||||
// Function: H5Library::garbageCollect (static)
|
||||
///\brief Walks through all the garbage collection routines for the
|
||||
/// library, which are supposed to free any unused memory they
|
||||
/// have allocated.
|
||||
@@ -148,7 +162,79 @@ void H5Library::garbageCollect()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Library::setFreeListLimits
|
||||
// Function: H5Library::initH5cpp (static)
|
||||
///\brief Initializes C++ library and registers terminating functions at
|
||||
/// exit. Only for the library functions, not for user-defined
|
||||
/// functions.
|
||||
// Description
|
||||
// initH5cpp registers the following functions with std::atexit():
|
||||
// termH5cpp() - calls H5close() after all cleanup in
|
||||
// the C++ library is done
|
||||
// <classname>::deleteConstants - deletes all references
|
||||
// for <classname> global constants
|
||||
///\exception H5::LibraryIException
|
||||
//
|
||||
// Programmer Binh-Minh Ribler - September, 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Library::initH5cpp()
|
||||
{
|
||||
// Register terminating functions with atexit(); they will be invoked in
|
||||
// the reversed order
|
||||
int ret_value = 0;
|
||||
ret_value = std::atexit(termH5cpp);
|
||||
if (ret_value != 0)
|
||||
throw LibraryIException("H5Library::initH5cpp", "Registrating termH5cpp failed");
|
||||
|
||||
ret_value = std::atexit(PredType::deleteConstants);
|
||||
if (ret_value != 0)
|
||||
throw LibraryIException("H5Library::initH5cpp", "Registrating PredType::deleteConstants failed");
|
||||
|
||||
ret_value = std::atexit(PropList::deleteConstants);
|
||||
if (ret_value != 0)
|
||||
throw LibraryIException("H5Library::initH5cpp", "Registrating PropList::deleteConstants failed");
|
||||
|
||||
ret_value = std::atexit(FileAccPropList::deleteConstants);
|
||||
if (ret_value != 0)
|
||||
throw LibraryIException("H5Library::initH5cpp", "Registrating FileAccPropList::deleteConstants failed");
|
||||
|
||||
ret_value = std::atexit(FileCreatPropList::deleteConstants);
|
||||
if (ret_value != 0)
|
||||
throw LibraryIException("H5Library::initH5cpp", "Registrating FileCreatPropList::deleteConstants failed");
|
||||
|
||||
ret_value = std::atexit(DSetMemXferPropList::deleteConstants);
|
||||
if (ret_value != 0)
|
||||
throw LibraryIException("H5Library::initH5cpp", "Registrating DSetMemXferPropList::deleteConstants failed");
|
||||
|
||||
ret_value = std::atexit(DSetCreatPropList::deleteConstants);
|
||||
if (ret_value != 0)
|
||||
throw LibraryIException("H5Library::initH5cpp", "Registrating DSetCreatPropList::deleteConstants failed");
|
||||
|
||||
ret_value = std::atexit(ObjCreatPropList::deleteConstants);
|
||||
if (ret_value != 0)
|
||||
throw LibraryIException("H5Library::initH5cpp", "Registrating ObjCreatPropList::deleteConstants failed");
|
||||
|
||||
ret_value = std::atexit(DataSpace::deleteConstants);
|
||||
if (ret_value != 0)
|
||||
throw LibraryIException("H5Library::initH5cpp", "Registrating DataSpace::deleteConstants failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Library::termH5cpp (static)
|
||||
///\brief Sends request for the C layer to terminate.
|
||||
///\par Description
|
||||
/// If the C library fails to terminate, exit with a failure.
|
||||
// Programmer Binh-Minh Ribler - September, 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Library::termH5cpp()
|
||||
{
|
||||
// Close the C library
|
||||
herr_t ret_value = H5close();
|
||||
if (ret_value == -1)
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Library::setFreeListLimits (static)
|
||||
///\brief Sets limits on the different kinds of free lists.
|
||||
///\param reg_global_lim - IN: Limit on all "regular" free list memory used
|
||||
///\param reg_list_lim - IN: Limit on memory used in each "regular" free list
|
||||
@@ -174,6 +260,13 @@ void H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim,
|
||||
throw LibraryIException("H5Library::setFreeListLimits", "H5set_free_list_limits failed");
|
||||
}
|
||||
}
|
||||
|
||||
// Default constructor - private
|
||||
H5Library::H5Library(){}
|
||||
|
||||
// Destructor - private
|
||||
H5Library::~H5Library(){}
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
} // end namespace
|
||||
#endif
|
||||
|
||||
@@ -21,14 +21,6 @@
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
#define NOTATEXIT (-10) // just in case the HDF5 library use more
|
||||
// negative constants. Note: the solution used for the atexit/global
|
||||
// destructors is not reliable, and desperately needs improvement
|
||||
// It is not even working, inifiteloop message still printed when
|
||||
// calling H5close
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
/*! \class H5Library
|
||||
\brief Class H5Library operates the HDF5 library globably.
|
||||
|
||||
@@ -38,7 +30,8 @@ namespace H5 {
|
||||
class H5_DLLCPP H5Library {
|
||||
public:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
static bool need_cleanup; // indicates if H5close should be called
|
||||
static bool need_cleanup; // indicates if H5close should be called
|
||||
// - unused, will be removed in future releases.
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// Initializes the HDF5 library.
|
||||
@@ -65,9 +58,23 @@ class H5_DLLCPP H5Library {
|
||||
static void setFreeListLimits(int reg_global_lim, int reg_list_lim, int
|
||||
arr_global_lim, int arr_list_lim, int blk_global_lim, int blk_list_lim);
|
||||
|
||||
// Initializes C++ library and registers terminating functions at exit.
|
||||
// Only for the library functions, not for user-defined functions.
|
||||
static void initH5cpp(void);
|
||||
|
||||
// Sends request for terminating the HDF5 library.
|
||||
static void termH5cpp(void);
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
private:
|
||||
// Default constructor - no instance ever created
|
||||
H5Library() {};
|
||||
|
||||
// Default constructor - no instance ever created from outsiders
|
||||
H5Library();
|
||||
|
||||
// Destructor
|
||||
~H5Library();
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "H5PropList.h"
|
||||
#include "H5Location.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5DxferProp.h"
|
||||
#include "H5FaccProp.h"
|
||||
@@ -33,9 +34,6 @@
|
||||
#include "H5DataSet.h"
|
||||
#include "H5Attribute.h"
|
||||
#include "H5private.h" // for HDmemset
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
@@ -70,17 +68,28 @@ H5Location::H5Location() : IdComponent() {}
|
||||
// object.
|
||||
// Parameters object_id - IN: Id of an existing HDF5 object
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
|
||||
// *** Deprecation warning ***
|
||||
// This constructor is no longer appropriate because the data member "id" had
|
||||
// been moved to the sub-classes. It will be removed in 1.10 release. If its
|
||||
// removal does not raise any problems in 1.10, it will be removed from 1.8 in
|
||||
// subsequent releases.
|
||||
//--------------------------------------------------------------------------
|
||||
H5Location::H5Location(const hid_t object_id) : IdComponent(object_id) {}
|
||||
H5Location::H5Location(const hid_t object_id) : IdComponent() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location copy constructor
|
||||
///\brief Copy constructor: makes a copy of the original H5Location
|
||||
/// instance.
|
||||
// Purpose: This noop copy constructor is removed as a result of the data
|
||||
// member "id" being moved down to sub-classes. (Mar 2015)
|
||||
///\param original - IN: H5Location instance to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//
|
||||
// *** Deprecation warning ***
|
||||
// This constructor is no longer appropriate because the data member "id" had
|
||||
// been moved to the sub-classes. It is removed from 1.8.15 because it is
|
||||
// a noop and it can be generated by the compiler if needed.
|
||||
//--------------------------------------------------------------------------
|
||||
H5Location::H5Location( const H5Location& original ) : IdComponent( original ) {}
|
||||
// H5Location::H5Location(const H5Location& original) : IdComponent() {}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
@@ -115,8 +124,9 @@ Attribute H5Location::createAttribute( const char* name, const DataType& data_ty
|
||||
// If the attribute id is valid, create and return the Attribute object
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
return( attr );
|
||||
Attribute attr;
|
||||
f_Attribute_setId(&attr, attr_id);
|
||||
return( attr );
|
||||
}
|
||||
else
|
||||
throw AttributeIException(inMemFunc("createAttribute"), "H5Acreate2 failed");
|
||||
@@ -147,8 +157,9 @@ Attribute H5Location::openAttribute( const char* name ) const
|
||||
hid_t attr_id = H5Aopen(getId(), name, H5P_DEFAULT);
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
return( attr );
|
||||
Attribute attr;
|
||||
f_Attribute_setId(&attr, attr_id);
|
||||
return( attr );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -182,12 +193,13 @@ Attribute H5Location::openAttribute( const unsigned int idx ) const
|
||||
H5_ITER_INC, (hsize_t)idx, H5P_DEFAULT, H5P_DEFAULT);
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
return( attr );
|
||||
Attribute attr;
|
||||
f_Attribute_setId(&attr, attr_id);
|
||||
return(attr);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen_by_idx failed");
|
||||
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen_by_idx failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -893,6 +905,12 @@ H5O_type_t H5Location::p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const
|
||||
///\return DataSpace object
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
// Modification
|
||||
// Mar 29, 2015
|
||||
// Used friend function to set id for DataSpace instead of the
|
||||
// existing id constructor or the setId method to avoid incrementing
|
||||
// ref count, as a work-around for a problem described in the JIRA
|
||||
// issue HDFFV-7947. -BMR
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpace H5Location::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
@@ -902,8 +920,9 @@ DataSpace H5Location::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
throw ReferenceException(inMemFunc("getRegion"), "H5Rget_region failed");
|
||||
}
|
||||
try {
|
||||
DataSpace dataspace(space_id);
|
||||
return(dataspace);
|
||||
DataSpace dataspace;
|
||||
f_DataSpace_setId(&dataspace, space_id);
|
||||
return(dataspace);
|
||||
}
|
||||
catch (DataSpaceIException E) {
|
||||
throw ReferenceException(inMemFunc("getRegion"), E.getDetailMsg());
|
||||
@@ -918,6 +937,36 @@ DataSpace H5Location::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
//--------------------------------------------------------------------------
|
||||
H5Location::~H5Location() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: f_Attribute_setId - friend
|
||||
// Purpose: This function is friend to class H5::Attribute so that it
|
||||
// can set Attribute::id in order to work around a problem
|
||||
// described in the JIRA issue HDFFV-7947.
|
||||
// Applications shouldn't need to use it.
|
||||
// param attr - IN/OUT: Attribute object to be changed
|
||||
// param new_id - IN: New id to set
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void f_Attribute_setId(Attribute* attr, hid_t new_id)
|
||||
{
|
||||
attr->p_setId(new_id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: f_DataSpace_setId - friend
|
||||
// Purpose: This function is friend to class H5::DataSpace so that it can
|
||||
// can set DataSpace::id in order to work around a problem
|
||||
// described in the JIRA issue HDFFV-7947.
|
||||
// Applications shouldn't need to use it.
|
||||
// param dspace - IN/OUT: DataSpace object to be changed
|
||||
// param new_id - IN: New id to set
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void f_DataSpace_setId(DataSpace* dspace, hid_t new_id)
|
||||
{
|
||||
dspace->p_setId(new_id);
|
||||
}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
||||
@@ -138,13 +138,18 @@ class H5_DLLCPP H5Location : public IdComponent {
|
||||
// Default constructor
|
||||
H5Location();
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// *** Deprecation warning ***
|
||||
// The following two constructors are no longer appropriate after the
|
||||
// data member "id" had been moved to the sub-classes.
|
||||
// The copy constructor is a noop and is removed in 1.8.15 and the
|
||||
// other will be removed from 1.10 release, and then from 1.8 if its
|
||||
// removal does not raise any problems in two 1.10 releases.
|
||||
|
||||
// Creates a copy of an existing object giving the location id.
|
||||
H5Location(const hid_t loc_id);
|
||||
|
||||
// Copy constructor.
|
||||
H5Location(const H5Location& original);
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Creates a reference to an HDF5 object or a dataset region.
|
||||
void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
|
||||
|
||||
@@ -159,6 +164,10 @@ class H5_DLLCPP H5Location : public IdComponent {
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5O_type_t p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const;
|
||||
|
||||
// Sets the identifier of this object to a new value. - this one
|
||||
// doesn't increment reference count
|
||||
virtual void p_setId(const hid_t new_id) = 0;
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// Noop destructor.
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5DxferProp.h"
|
||||
#include "H5FaccProp.h"
|
||||
@@ -50,8 +51,26 @@ H5Object::H5Object() : H5Location() {}
|
||||
// object.
|
||||
// Parameters object_id - IN: Id of an existing HDF5 object
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// *** Deprecation warning ***
|
||||
// This constructor is no longer appropriate because the data member "id" had
|
||||
// been moved to the sub-classes. It will be removed in 1.10 release. If its
|
||||
// removal does not raise any problems in 1.10, it will be removed from 1.8 in
|
||||
// subsequent releases.
|
||||
//--------------------------------------------------------------------------
|
||||
H5Object::H5Object( const hid_t object_id ) : H5Location( object_id ) {}
|
||||
H5Object::H5Object(const hid_t object_id) : H5Location() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object copy constructor
|
||||
///\brief Copy constructor: makes a copy of the original H5Object
|
||||
/// instance.
|
||||
///\param original - IN: H5Object instance to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// *** Deprecation warning ***
|
||||
// This constructor is no longer appropriate because the data member "id" had
|
||||
// been moved to the sub-classes. It is removed from 1.8.15 because it is
|
||||
// a noop and it can be generated by the compiler if needed.
|
||||
//--------------------------------------------------------------------------
|
||||
// H5Object::H5Object(const H5Object& original) : H5Location() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: getObjName
|
||||
@@ -164,15 +183,6 @@ ssize_t H5Object::getObjName(H5std_string& obj_name, size_t len) const
|
||||
return(name_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object copy constructor
|
||||
///\brief Copy constructor: makes a copy of the original H5Object
|
||||
/// instance.
|
||||
///\param original - IN: H5Object instance to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Object::H5Object( const H5Object& original ) : H5Location( original ) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object destructor
|
||||
///\brief Noop destructor.
|
||||
|
||||
@@ -47,9 +47,6 @@ namespace H5 {
|
||||
class H5_DLLCPP H5Object : public H5Location {
|
||||
public:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Copy constructor: makes copy of an H5Object object.
|
||||
H5Object(const H5Object& original);
|
||||
|
||||
// Gets the name of this HDF5 object, i.e., Group, DataSet, or
|
||||
// DataType.
|
||||
ssize_t getObjName(char *obj_name, size_t buf_size = 0) const;
|
||||
@@ -63,9 +60,19 @@ class H5_DLLCPP H5Object : public H5Location {
|
||||
// Default constructor
|
||||
H5Object();
|
||||
|
||||
// *** Deprecation warning ***
|
||||
// The following two constructors are no longer appropriate after the
|
||||
// data member "id" had been moved to the sub-classes.
|
||||
// The copy constructor is a noop and is removed in 1.8.15 and the
|
||||
// other will be removed from 1.10 release, and then from 1.8 if its
|
||||
// removal does not raise any problems in two 1.10 releases.
|
||||
|
||||
// Creates a copy of an existing object giving the object id
|
||||
H5Object( const hid_t object_id );
|
||||
|
||||
// Copy constructor: makes copy of an H5Object object.
|
||||
// H5Object(const H5Object& original);
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
}; /* end class H5Object */
|
||||
|
||||
222
c++/src/H5OcreatProp.cpp
Normal file
222
c++/src/H5OcreatProp.cpp
Normal file
@@ -0,0 +1,222 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "H5Include.h"
|
||||
#include "H5Exception.h"
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5FaccProp.h"
|
||||
#include "H5OcreatProp.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// This DOXYGEN_SHOULD_SKIP_THIS block is a work-around approach to control
|
||||
// the order of creation and deletion of the global constants. See Design Notes
|
||||
// in "H5PredType.cpp" for information.
|
||||
|
||||
// Initialize a pointer for the constant
|
||||
ObjCreatPropList* ObjCreatPropList::DEFAULT_ = 0;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: ObjCreatPropList::getConstant
|
||||
// Creates a ObjCreatPropList object representing the HDF5 constant
|
||||
// H5P_FILE_ACCESS, pointed to by ObjCreatPropList::DEFAULT_
|
||||
// exception H5::PropListIException
|
||||
// Description
|
||||
// If ObjCreatPropList::DEFAULT_ already points to an allocated
|
||||
// object, throw a PropListIException. This scenario should not
|
||||
// happen.
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
ObjCreatPropList* ObjCreatPropList::getConstant()
|
||||
{
|
||||
// Tell the C library not to clean up, H5Library::termH5cpp will call
|
||||
// H5close - more dependency if use H5Library::dontAtExit()
|
||||
if (!IdComponent::H5dontAtexit_called)
|
||||
{
|
||||
(void) H5dont_atexit();
|
||||
IdComponent::H5dontAtexit_called = true;
|
||||
}
|
||||
|
||||
// If the constant pointer is not allocated, allocate it. Otherwise,
|
||||
// throw because it shouldn't be.
|
||||
if (DEFAULT_ == 0)
|
||||
DEFAULT_ = new ObjCreatPropList(H5P_OBJECT_CREATE);
|
||||
else
|
||||
throw PropListIException("ObjCreatPropList::getConstant", "ObjCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
|
||||
return(DEFAULT_);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: ObjCreatPropList::deleteConstants
|
||||
// Purpose: Deletes the constant object that ObjCreatPropList::DEFAULT_
|
||||
// points to.
|
||||
// exception H5::PropListIException
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void ObjCreatPropList::deleteConstants()
|
||||
{
|
||||
if (DEFAULT_ != 0)
|
||||
delete DEFAULT_;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Purpose: Constant for default property
|
||||
//--------------------------------------------------------------------------
|
||||
const ObjCreatPropList& ObjCreatPropList::DEFAULT = *getConstant();
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Default Constructor
|
||||
///\brief Creates a file access property list
|
||||
// Programmer: Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
ObjCreatPropList::ObjCreatPropList() : PropList(H5P_OBJECT_CREATE) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: ObjCreatPropList copy constructor
|
||||
///\brief Copy Constructor: makes a copy of the original
|
||||
///\param original - IN: ObjCreatPropList instance to copy
|
||||
// Programmer: Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
ObjCreatPropList::ObjCreatPropList(const ObjCreatPropList& original) : PropList(original) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: ObjCreatPropList overloaded constructor
|
||||
///\brief Creates a file access property list using the id of an
|
||||
/// existing one.
|
||||
// Programmer: Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
ObjCreatPropList::ObjCreatPropList(const hid_t plist_id) : PropList(plist_id) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: ObjCreatPropList::setAttrPhaseChange
|
||||
///\brief Sets attribute storage phase change thresholds.
|
||||
///\param max_compact - IN: Maximum number of attributes to be stored in
|
||||
/// compact storage. Default to 8
|
||||
///\param min_dense - IN: Minimum number of attributes to be stored in
|
||||
/// dense storage. Default to 6
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// If \c max_compact is set to 0, dense storage will be used.
|
||||
/// For more detail about on attribute storage, please refer to the
|
||||
/// C layer Reference Manual at:
|
||||
/// https://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetAttrPhaseChange
|
||||
// Programmer: Binh-Minh Ribler - September 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void ObjCreatPropList::setAttrPhaseChange(unsigned max_compact, unsigned min_dense) const
|
||||
{
|
||||
herr_t ret_value = H5Pset_attr_phase_change(id, max_compact, min_dense);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw PropListIException("ObjCreatPropList::setAttrPhaseChange", "H5Pset_attr_phase_change failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: ObjCreatPropList::getAttrPhaseChange
|
||||
///\brief Gets attribute storage phase change thresholds.
|
||||
///\param max_compact - OUT: Maximum number of attributes to be stored in
|
||||
/// compact storage.
|
||||
///\param min_dense - OUT: Minimum number of attributes to be stored in
|
||||
/// dense storage.
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// If \c max_compact is set to 0, dense storage will be used.
|
||||
/// For more detail about on attribute storage, please refer to the
|
||||
/// C layer Reference Manual at:
|
||||
/// https://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetAttrPhaseChange
|
||||
// Programmer: Binh-Minh Ribler - September 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void ObjCreatPropList::getAttrPhaseChange(unsigned& max_compact, unsigned& min_dense) const
|
||||
{
|
||||
herr_t ret_value;
|
||||
ret_value = H5Pget_attr_phase_change(id, &max_compact, &min_dense);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw PropListIException("ObjCreatPropList::getAttrPhaseChange", "H5Pget_attr_phase_change failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: ObjCreatPropList::setAttrCrtOrder
|
||||
///\brief Sets tracking and indexing of attribute creation order.
|
||||
///\param crt_order_flags - IN: Flags specifying whether to track and
|
||||
/// index attribute creation order. Default: No flag set
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// Valid flags are:
|
||||
/// \li \c H5P_CRT_ORDER_TRACKED - Attribute creation order is tracked
|
||||
/// \li \c H5P_CRT_ORDER_INDEXED - Attribute creation order is
|
||||
/// indexed (requires H5P_CRT_ORDER_TRACKED).
|
||||
/// When no flag is set, attribute creation order is neither
|
||||
/// tracked not indexed. Note that HDF5 currently provides no
|
||||
/// mechanism to turn on attribute creation order tracking at object
|
||||
/// creation time and to build the index later.
|
||||
/// The C layer Reference Manual at can be found at:
|
||||
/// https://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetAttrCreationOrder
|
||||
// Programmer: Binh-Minh Ribler - September 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const
|
||||
{
|
||||
herr_t ret_value = H5Pset_attr_creation_order(id, crt_order_flags);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw PropListIException("ObjCreatPropList::setAttrCrtOrder", "H5Pset_attr_creation_order failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: ObjCreatPropList::getAttrCrtOrder
|
||||
///\brief Gets tracking and indexing settings for attribute
|
||||
/// creation order.
|
||||
///\param crt_order_flags - OUT: Flags specifying whether to track and
|
||||
/// index attribute creation order
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// When no flag is set, i.e. crt_order_flags = 0, attribute
|
||||
/// creation order is neither tracked not indexed.
|
||||
/// The C layer Reference Manual at can be found at:
|
||||
/// https://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetAttrCreationOrder
|
||||
// Programmer: Binh-Minh Ribler - September 2015
|
||||
//--------------------------------------------------------------------------
|
||||
unsigned ObjCreatPropList::getAttrCrtOrder() const
|
||||
{
|
||||
herr_t ret_value;
|
||||
unsigned crt_order_flags = 0;
|
||||
ret_value = H5Pget_attr_creation_order(id, &crt_order_flags);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw PropListIException("ObjCreatPropList::getAttrCrtOrder", "H5Pget_attr_creation_order failed");
|
||||
}
|
||||
return(crt_order_flags);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: ObjCreatPropList destructor
|
||||
///\brief Noop destructor
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
ObjCreatPropList::~ObjCreatPropList() {}
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
} // end namespace
|
||||
#endif
|
||||
76
c++/src/H5OcreatProp.h
Normal file
76
c++/src/H5OcreatProp.h
Normal file
@@ -0,0 +1,76 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef __H5ObjCreatPropList_H
|
||||
#define __H5ObjCreatPropList_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
//! Class ObjCreatPropList represents the HDF5 object creation property list.
|
||||
class H5_DLLCPP ObjCreatPropList : public PropList {
|
||||
public:
|
||||
///\brief Default object creation property list.
|
||||
static const ObjCreatPropList& DEFAULT;
|
||||
|
||||
// Creates a object creation property list.
|
||||
ObjCreatPropList();
|
||||
|
||||
// Sets attribute storage phase change thresholds.
|
||||
void setAttrPhaseChange(unsigned max_compact = 8, unsigned min_dense = 6) const;
|
||||
|
||||
// Gets attribute storage phase change thresholds.
|
||||
void getAttrPhaseChange(unsigned& max_compact, unsigned& min_dense) const;
|
||||
|
||||
// Sets tracking and indexing of attribute creation order.
|
||||
void setAttrCrtOrder(unsigned crt_order_flags) const;
|
||||
|
||||
// Gets tracking and indexing settings for attribute creation order.
|
||||
unsigned getAttrCrtOrder() const;
|
||||
|
||||
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("ObjCreatPropList"); }
|
||||
|
||||
// Copy constructor: creates a copy of a ObjCreatPropList object.
|
||||
ObjCreatPropList( const ObjCreatPropList& original );
|
||||
|
||||
// Creates a copy of an existing object creation property list
|
||||
// using the property list id.
|
||||
ObjCreatPropList (const hid_t plist_id);
|
||||
|
||||
// Noop destructor
|
||||
virtual ~ObjCreatPropList();
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// Deletes the global constant, should only be used by the library
|
||||
static void deleteConstants();
|
||||
|
||||
private:
|
||||
static ObjCreatPropList* DEFAULT_;
|
||||
|
||||
// Creates the global constant, should only be used by the library
|
||||
static ObjCreatPropList* getConstant();
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif // __H5ObjCreatPropList_H
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,16 +21,6 @@
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
/* This constant is defined for a workaround to eliminate memory leaks due to
|
||||
the library being re-initiated when PredType destructors are invoked. A
|
||||
PredType instant with H5CPP_EXITED as the value of its "id" is constructed
|
||||
before the other PredType objects are created. At exit, when this special
|
||||
PredType object is to be destructed, no HDF5 library function will be called
|
||||
and the library will be terminated. -BMR, Mar 30, 2012 */
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
#define H5CPP_EXITED -3 // -3 is less likely to be used elsewhere
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
/*! \class PredType
|
||||
\brief Class PredType holds the definition of all the HDF5 predefined
|
||||
datatypes.
|
||||
@@ -53,183 +43,6 @@ class H5_DLLCPP PredType : public AtomType {
|
||||
// Noop destructor
|
||||
virtual ~PredType();
|
||||
|
||||
// Declaration of predefined types; their definition is in H5PredType.cpp
|
||||
static const PredType STD_I8BE;
|
||||
static const PredType STD_I8LE;
|
||||
static const PredType STD_I16BE;
|
||||
static const PredType STD_I16LE;
|
||||
static const PredType STD_I32BE;
|
||||
static const PredType STD_I32LE;
|
||||
static const PredType STD_I64BE;
|
||||
static const PredType STD_I64LE;
|
||||
static const PredType STD_U8BE;
|
||||
static const PredType STD_U8LE;
|
||||
static const PredType STD_U16BE;
|
||||
static const PredType STD_U16LE;
|
||||
static const PredType STD_U32BE;
|
||||
static const PredType STD_U32LE;
|
||||
static const PredType STD_U64BE;
|
||||
static const PredType STD_U64LE;
|
||||
static const PredType STD_B8BE;
|
||||
static const PredType STD_B8LE;
|
||||
static const PredType STD_B16BE;
|
||||
static const PredType STD_B16LE;
|
||||
static const PredType STD_B32BE;
|
||||
static const PredType STD_B32LE;
|
||||
static const PredType STD_B64BE;
|
||||
static const PredType STD_B64LE;
|
||||
static const PredType STD_REF_OBJ;
|
||||
static const PredType STD_REF_DSETREG;
|
||||
|
||||
static const PredType C_S1;
|
||||
static const PredType FORTRAN_S1;
|
||||
|
||||
static const PredType IEEE_F32BE;
|
||||
static const PredType IEEE_F32LE;
|
||||
static const PredType IEEE_F64BE;
|
||||
static const PredType IEEE_F64LE;
|
||||
|
||||
static const PredType UNIX_D32BE;
|
||||
static const PredType UNIX_D32LE;
|
||||
static const PredType UNIX_D64BE;
|
||||
static const PredType UNIX_D64LE;
|
||||
|
||||
static const PredType INTEL_I8;
|
||||
static const PredType INTEL_I16;
|
||||
static const PredType INTEL_I32;
|
||||
static const PredType INTEL_I64;
|
||||
static const PredType INTEL_U8;
|
||||
static const PredType INTEL_U16;
|
||||
static const PredType INTEL_U32;
|
||||
static const PredType INTEL_U64;
|
||||
static const PredType INTEL_B8;
|
||||
static const PredType INTEL_B16;
|
||||
static const PredType INTEL_B32;
|
||||
static const PredType INTEL_B64;
|
||||
static const PredType INTEL_F32;
|
||||
static const PredType INTEL_F64;
|
||||
|
||||
static const PredType ALPHA_I8;
|
||||
static const PredType ALPHA_I16;
|
||||
static const PredType ALPHA_I32;
|
||||
static const PredType ALPHA_I64;
|
||||
static const PredType ALPHA_U8;
|
||||
static const PredType ALPHA_U16;
|
||||
static const PredType ALPHA_U32;
|
||||
static const PredType ALPHA_U64;
|
||||
static const PredType ALPHA_B8;
|
||||
static const PredType ALPHA_B16;
|
||||
static const PredType ALPHA_B32;
|
||||
static const PredType ALPHA_B64;
|
||||
static const PredType ALPHA_F32;
|
||||
static const PredType ALPHA_F64;
|
||||
|
||||
static const PredType MIPS_I8;
|
||||
static const PredType MIPS_I16;
|
||||
static const PredType MIPS_I32;
|
||||
static const PredType MIPS_I64;
|
||||
static const PredType MIPS_U8;
|
||||
static const PredType MIPS_U16;
|
||||
static const PredType MIPS_U32;
|
||||
static const PredType MIPS_U64;
|
||||
static const PredType MIPS_B8;
|
||||
static const PredType MIPS_B16;
|
||||
static const PredType MIPS_B32;
|
||||
static const PredType MIPS_B64;
|
||||
static const PredType MIPS_F32;
|
||||
static const PredType MIPS_F64;
|
||||
|
||||
static const PredType NATIVE_CHAR;
|
||||
static const PredType NATIVE_SCHAR;
|
||||
static const PredType NATIVE_UCHAR;
|
||||
static const PredType NATIVE_SHORT;
|
||||
static const PredType NATIVE_USHORT;
|
||||
static const PredType NATIVE_INT;
|
||||
static const PredType NATIVE_UINT;
|
||||
static const PredType NATIVE_LONG;
|
||||
static const PredType NATIVE_ULONG;
|
||||
static const PredType NATIVE_LLONG;
|
||||
static const PredType NATIVE_ULLONG;
|
||||
static const PredType NATIVE_FLOAT;
|
||||
static const PredType NATIVE_DOUBLE;
|
||||
static const PredType NATIVE_LDOUBLE;
|
||||
static const PredType NATIVE_B8;
|
||||
static const PredType NATIVE_B16;
|
||||
static const PredType NATIVE_B32;
|
||||
static const PredType NATIVE_B64;
|
||||
static const PredType NATIVE_OPAQUE;
|
||||
static const PredType NATIVE_HSIZE;
|
||||
static const PredType NATIVE_HSSIZE;
|
||||
static const PredType NATIVE_HERR;
|
||||
static const PredType NATIVE_HBOOL;
|
||||
|
||||
static const PredType NATIVE_INT8;
|
||||
static const PredType NATIVE_UINT8;
|
||||
static const PredType NATIVE_INT16;
|
||||
static const PredType NATIVE_UINT16;
|
||||
static const PredType NATIVE_INT32;
|
||||
static const PredType NATIVE_UINT32;
|
||||
static const PredType NATIVE_INT64;
|
||||
static const PredType NATIVE_UINT64;
|
||||
|
||||
// LEAST types
|
||||
#if H5_SIZEOF_INT_LEAST8_T != 0
|
||||
static const PredType NATIVE_INT_LEAST8;
|
||||
#endif /* H5_SIZEOF_INT_LEAST8_T */
|
||||
#if H5_SIZEOF_UINT_LEAST8_T != 0
|
||||
static const PredType NATIVE_UINT_LEAST8;
|
||||
#endif /* H5_SIZEOF_UINT_LEAST8_T */
|
||||
|
||||
#if H5_SIZEOF_INT_LEAST16_T != 0
|
||||
static const PredType NATIVE_INT_LEAST16;
|
||||
#endif /* H5_SIZEOF_INT_LEAST16_T */
|
||||
#if H5_SIZEOF_UINT_LEAST16_T != 0
|
||||
static const PredType NATIVE_UINT_LEAST16;
|
||||
#endif /* H5_SIZEOF_UINT_LEAST16_T */
|
||||
|
||||
#if H5_SIZEOF_INT_LEAST32_T != 0
|
||||
static const PredType NATIVE_INT_LEAST32;
|
||||
#endif /* H5_SIZEOF_INT_LEAST32_T */
|
||||
#if H5_SIZEOF_UINT_LEAST32_T != 0
|
||||
static const PredType NATIVE_UINT_LEAST32;
|
||||
#endif /* H5_SIZEOF_UINT_LEAST32_T */
|
||||
|
||||
#if H5_SIZEOF_INT_LEAST64_T != 0
|
||||
static const PredType NATIVE_INT_LEAST64;
|
||||
#endif /* H5_SIZEOF_INT_LEAST64_T */
|
||||
#if H5_SIZEOF_UINT_LEAST64_T != 0
|
||||
static const PredType NATIVE_UINT_LEAST64;
|
||||
#endif /* H5_SIZEOF_UINT_LEAST64_T */
|
||||
|
||||
// FAST types
|
||||
#if H5_SIZEOF_INT_FAST8_T != 0
|
||||
static const PredType NATIVE_INT_FAST8;
|
||||
#endif /* H5_SIZEOF_INT_FAST8_T */
|
||||
#if H5_SIZEOF_UINT_FAST8_T != 0
|
||||
static const PredType NATIVE_UINT_FAST8;
|
||||
#endif /* H5_SIZEOF_UINT_FAST8_T */
|
||||
|
||||
#if H5_SIZEOF_INT_FAST16_T != 0
|
||||
static const PredType NATIVE_INT_FAST16;
|
||||
#endif /* H5_SIZEOF_INT_FAST16_T */
|
||||
#if H5_SIZEOF_UINT_FAST16_T != 0
|
||||
static const PredType NATIVE_UINT_FAST16;
|
||||
#endif /* H5_SIZEOF_UINT_FAST16_T */
|
||||
|
||||
#if H5_SIZEOF_INT_FAST32_T != 0
|
||||
static const PredType NATIVE_INT_FAST32;
|
||||
#endif /* H5_SIZEOF_INT_FAST32_T */
|
||||
#if H5_SIZEOF_UINT_FAST32_T != 0
|
||||
static const PredType NATIVE_UINT_FAST32;
|
||||
#endif /* H5_SIZEOF_UINT_FAST32_T */
|
||||
|
||||
#if H5_SIZEOF_INT_FAST64_T != 0
|
||||
static const PredType NATIVE_INT_FAST64;
|
||||
#endif /* H5_SIZEOF_INT_FAST64_T */
|
||||
#if H5_SIZEOF_UINT_FAST64_T != 0
|
||||
static const PredType NATIVE_UINT_FAST64;
|
||||
#endif /* H5_SIZEOF_UINT_FAST64_T */
|
||||
|
||||
/*! \brief This dummy function do not inherit from DataType - it will
|
||||
throw a DataTypeIException if invoked.
|
||||
*/
|
||||
@@ -243,21 +56,387 @@ class H5_DLLCPP PredType : public AtomType {
|
||||
*/
|
||||
bool committed();
|
||||
|
||||
protected:
|
||||
///\brief PredType constants
|
||||
static const PredType& STD_I8BE;
|
||||
static const PredType& STD_I8LE;
|
||||
static const PredType& STD_I16BE;
|
||||
static const PredType& STD_I16LE;
|
||||
static const PredType& STD_I32BE;
|
||||
static const PredType& STD_I32LE;
|
||||
static const PredType& STD_I64BE;
|
||||
static const PredType& STD_I64LE;
|
||||
static const PredType& STD_U8BE;
|
||||
static const PredType& STD_U8LE;
|
||||
static const PredType& STD_U16BE;
|
||||
static const PredType& STD_U16LE;
|
||||
static const PredType& STD_U32BE;
|
||||
static const PredType& STD_U32LE;
|
||||
static const PredType& STD_U64BE;
|
||||
static const PredType& STD_U64LE;
|
||||
static const PredType& STD_B8BE;
|
||||
static const PredType& STD_B8LE;
|
||||
static const PredType& STD_B16BE;
|
||||
static const PredType& STD_B16LE;
|
||||
static const PredType& STD_B32BE;
|
||||
static const PredType& STD_B32LE;
|
||||
static const PredType& STD_B64BE;
|
||||
static const PredType& STD_B64LE;
|
||||
static const PredType& STD_REF_OBJ;
|
||||
static const PredType& STD_REF_DSETREG;
|
||||
|
||||
static const PredType& C_S1;
|
||||
static const PredType& FORTRAN_S1;
|
||||
|
||||
static const PredType& IEEE_F32BE;
|
||||
static const PredType& IEEE_F32LE;
|
||||
static const PredType& IEEE_F64BE;
|
||||
static const PredType& IEEE_F64LE;
|
||||
|
||||
static const PredType& UNIX_D32BE;
|
||||
static const PredType& UNIX_D32LE;
|
||||
static const PredType& UNIX_D64BE;
|
||||
static const PredType& UNIX_D64LE;
|
||||
|
||||
static const PredType& INTEL_I8;
|
||||
static const PredType& INTEL_I16;
|
||||
static const PredType& INTEL_I32;
|
||||
static const PredType& INTEL_I64;
|
||||
static const PredType& INTEL_U8;
|
||||
static const PredType& INTEL_U16;
|
||||
static const PredType& INTEL_U32;
|
||||
static const PredType& INTEL_U64;
|
||||
static const PredType& INTEL_B8;
|
||||
static const PredType& INTEL_B16;
|
||||
static const PredType& INTEL_B32;
|
||||
static const PredType& INTEL_B64;
|
||||
static const PredType& INTEL_F32;
|
||||
static const PredType& INTEL_F64;
|
||||
|
||||
static const PredType& ALPHA_I8;
|
||||
static const PredType& ALPHA_I16;
|
||||
static const PredType& ALPHA_I32;
|
||||
static const PredType& ALPHA_I64;
|
||||
static const PredType& ALPHA_U8;
|
||||
static const PredType& ALPHA_U16;
|
||||
static const PredType& ALPHA_U32;
|
||||
static const PredType& ALPHA_U64;
|
||||
static const PredType& ALPHA_B8;
|
||||
static const PredType& ALPHA_B16;
|
||||
static const PredType& ALPHA_B32;
|
||||
static const PredType& ALPHA_B64;
|
||||
static const PredType& ALPHA_F32;
|
||||
static const PredType& ALPHA_F64;
|
||||
|
||||
static const PredType& MIPS_I8;
|
||||
static const PredType& MIPS_I16;
|
||||
static const PredType& MIPS_I32;
|
||||
static const PredType& MIPS_I64;
|
||||
static const PredType& MIPS_U8;
|
||||
static const PredType& MIPS_U16;
|
||||
static const PredType& MIPS_U32;
|
||||
static const PredType& MIPS_U64;
|
||||
static const PredType& MIPS_B8;
|
||||
static const PredType& MIPS_B16;
|
||||
static const PredType& MIPS_B32;
|
||||
static const PredType& MIPS_B64;
|
||||
static const PredType& MIPS_F32;
|
||||
static const PredType& MIPS_F64;
|
||||
|
||||
static const PredType& NATIVE_CHAR;
|
||||
static const PredType& NATIVE_SCHAR;
|
||||
static const PredType& NATIVE_UCHAR;
|
||||
static const PredType& NATIVE_SHORT;
|
||||
static const PredType& NATIVE_USHORT;
|
||||
static const PredType& NATIVE_INT;
|
||||
static const PredType& NATIVE_UINT;
|
||||
static const PredType& NATIVE_LONG;
|
||||
static const PredType& NATIVE_ULONG;
|
||||
static const PredType& NATIVE_LLONG;
|
||||
static const PredType& NATIVE_ULLONG;
|
||||
static const PredType& NATIVE_FLOAT;
|
||||
static const PredType& NATIVE_DOUBLE;
|
||||
static const PredType& NATIVE_LDOUBLE;
|
||||
static const PredType& NATIVE_B8;
|
||||
static const PredType& NATIVE_B16;
|
||||
static const PredType& NATIVE_B32;
|
||||
static const PredType& NATIVE_B64;
|
||||
static const PredType& NATIVE_OPAQUE;
|
||||
static const PredType& NATIVE_HSIZE;
|
||||
static const PredType& NATIVE_HSSIZE;
|
||||
static const PredType& NATIVE_HERR;
|
||||
static const PredType& NATIVE_HBOOL;
|
||||
|
||||
static const PredType& NATIVE_INT8;
|
||||
static const PredType& NATIVE_UINT8;
|
||||
static const PredType& NATIVE_INT16;
|
||||
static const PredType& NATIVE_UINT16;
|
||||
static const PredType& NATIVE_INT32;
|
||||
static const PredType& NATIVE_UINT32;
|
||||
static const PredType& NATIVE_INT64;
|
||||
static const PredType& NATIVE_UINT64;
|
||||
|
||||
// LEAST types
|
||||
#if H5_SIZEOF_INT_LEAST8_T != 0
|
||||
static const PredType& NATIVE_INT_LEAST8;
|
||||
#endif /* H5_SIZEOF_INT_LEAST8_T */
|
||||
#if H5_SIZEOF_UINT_LEAST8_T != 0
|
||||
static const PredType& NATIVE_UINT_LEAST8;
|
||||
#endif /* H5_SIZEOF_UINT_LEAST8_T */
|
||||
|
||||
#if H5_SIZEOF_INT_LEAST16_T != 0
|
||||
static const PredType& NATIVE_INT_LEAST16;
|
||||
#endif /* H5_SIZEOF_INT_LEAST16_T */
|
||||
#if H5_SIZEOF_UINT_LEAST16_T != 0
|
||||
static const PredType& NATIVE_UINT_LEAST16;
|
||||
#endif /* H5_SIZEOF_UINT_LEAST16_T */
|
||||
|
||||
#if H5_SIZEOF_INT_LEAST32_T != 0
|
||||
static const PredType& NATIVE_INT_LEAST32;
|
||||
#endif /* H5_SIZEOF_INT_LEAST32_T */
|
||||
#if H5_SIZEOF_UINT_LEAST32_T != 0
|
||||
static const PredType& NATIVE_UINT_LEAST32;
|
||||
#endif /* H5_SIZEOF_UINT_LEAST32_T */
|
||||
|
||||
#if H5_SIZEOF_INT_LEAST64_T != 0
|
||||
static const PredType& NATIVE_INT_LEAST64;
|
||||
#endif /* H5_SIZEOF_INT_LEAST64_T */
|
||||
#if H5_SIZEOF_UINT_LEAST64_T != 0
|
||||
static const PredType& NATIVE_UINT_LEAST64;
|
||||
#endif /* H5_SIZEOF_UINT_LEAST64_T */
|
||||
|
||||
// FAST types
|
||||
#if H5_SIZEOF_INT_FAST8_T != 0
|
||||
static const PredType& NATIVE_INT_FAST8;
|
||||
#endif /* H5_SIZEOF_INT_FAST8_T */
|
||||
#if H5_SIZEOF_UINT_FAST8_T != 0
|
||||
static const PredType& NATIVE_UINT_FAST8;
|
||||
#endif /* H5_SIZEOF_UINT_FAST8_T */
|
||||
|
||||
#if H5_SIZEOF_INT_FAST16_T != 0
|
||||
static const PredType& NATIVE_INT_FAST16;
|
||||
#endif /* H5_SIZEOF_INT_FAST16_T */
|
||||
#if H5_SIZEOF_UINT_FAST16_T != 0
|
||||
static const PredType& NATIVE_UINT_FAST16;
|
||||
#endif /* H5_SIZEOF_UINT_FAST16_T */
|
||||
|
||||
#if H5_SIZEOF_INT_FAST32_T != 0
|
||||
static const PredType& NATIVE_INT_FAST32;
|
||||
#endif /* H5_SIZEOF_INT_FAST32_T */
|
||||
#if H5_SIZEOF_UINT_FAST32_T != 0
|
||||
static const PredType& NATIVE_UINT_FAST32;
|
||||
#endif /* H5_SIZEOF_UINT_FAST32_T */
|
||||
|
||||
#if H5_SIZEOF_INT_FAST64_T != 0
|
||||
static const PredType& NATIVE_INT_FAST64;
|
||||
#endif /* H5_SIZEOF_INT_FAST64_T */
|
||||
#if H5_SIZEOF_UINT_FAST64_T != 0
|
||||
static const PredType& NATIVE_UINT_FAST64;
|
||||
#endif /* H5_SIZEOF_UINT_FAST64_T */
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// Deletes the PredType global constants
|
||||
static void deleteConstants();
|
||||
|
||||
// Dummy constant
|
||||
static const PredType& PREDTYPE_CONST; // dummy constant
|
||||
|
||||
protected:
|
||||
// Default constructor
|
||||
PredType();
|
||||
|
||||
// Creates a pre-defined type using an HDF5 pre-defined constant
|
||||
PredType( const hid_t predtype_id ); // used by the library only
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
private:
|
||||
// Added this to work around the atexit/global destructor problem.
|
||||
// It'll help to terminate the library after other PredType instances
|
||||
// are closed. -BMR, Mar 30, 2012
|
||||
static const PredType AtExit;
|
||||
// Activates the creation of the PredType global constants
|
||||
static PredType* getPredTypes();
|
||||
|
||||
// Dynamically allocates PredType global constants
|
||||
static void makePredTypes();
|
||||
|
||||
// Dummy constant
|
||||
static PredType* PREDTYPE_CONST_;
|
||||
|
||||
// Declaration of pointers to constants
|
||||
static PredType* STD_I8BE_;
|
||||
static PredType* STD_I8LE_;
|
||||
static PredType* STD_I16BE_;
|
||||
static PredType* STD_I16LE_;
|
||||
static PredType* STD_I32BE_;
|
||||
static PredType* STD_I32LE_;
|
||||
static PredType* STD_I64BE_;
|
||||
static PredType* STD_I64LE_;
|
||||
static PredType* STD_U8BE_;
|
||||
static PredType* STD_U8LE_;
|
||||
static PredType* STD_U16BE_;
|
||||
static PredType* STD_U16LE_;
|
||||
static PredType* STD_U32BE_;
|
||||
static PredType* STD_U32LE_;
|
||||
static PredType* STD_U64BE_;
|
||||
static PredType* STD_U64LE_;
|
||||
static PredType* STD_B8BE_;
|
||||
static PredType* STD_B8LE_;
|
||||
static PredType* STD_B16BE_;
|
||||
static PredType* STD_B16LE_;
|
||||
static PredType* STD_B32BE_;
|
||||
static PredType* STD_B32LE_;
|
||||
static PredType* STD_B64BE_;
|
||||
static PredType* STD_B64LE_;
|
||||
static PredType* STD_REF_OBJ_;
|
||||
static PredType* STD_REF_DSETREG_;
|
||||
|
||||
static PredType* C_S1_;
|
||||
static PredType* FORTRAN_S1_;
|
||||
|
||||
static PredType* IEEE_F32BE_;
|
||||
static PredType* IEEE_F32LE_;
|
||||
static PredType* IEEE_F64BE_;
|
||||
static PredType* IEEE_F64LE_;
|
||||
|
||||
static PredType* UNIX_D32BE_;
|
||||
static PredType* UNIX_D32LE_;
|
||||
static PredType* UNIX_D64BE_;
|
||||
static PredType* UNIX_D64LE_;
|
||||
|
||||
static PredType* INTEL_I8_;
|
||||
static PredType* INTEL_I16_;
|
||||
static PredType* INTEL_I32_;
|
||||
static PredType* INTEL_I64_;
|
||||
static PredType* INTEL_U8_;
|
||||
static PredType* INTEL_U16_;
|
||||
static PredType* INTEL_U32_;
|
||||
static PredType* INTEL_U64_;
|
||||
static PredType* INTEL_B8_;
|
||||
static PredType* INTEL_B16_;
|
||||
static PredType* INTEL_B32_;
|
||||
static PredType* INTEL_B64_;
|
||||
static PredType* INTEL_F32_;
|
||||
static PredType* INTEL_F64_;
|
||||
|
||||
static PredType* ALPHA_I8_;
|
||||
static PredType* ALPHA_I16_;
|
||||
static PredType* ALPHA_I32_;
|
||||
static PredType* ALPHA_I64_;
|
||||
static PredType* ALPHA_U8_;
|
||||
static PredType* ALPHA_U16_;
|
||||
static PredType* ALPHA_U32_;
|
||||
static PredType* ALPHA_U64_;
|
||||
static PredType* ALPHA_B8_;
|
||||
static PredType* ALPHA_B16_;
|
||||
static PredType* ALPHA_B32_;
|
||||
static PredType* ALPHA_B64_;
|
||||
static PredType* ALPHA_F32_;
|
||||
static PredType* ALPHA_F64_;
|
||||
|
||||
static PredType* MIPS_I8_;
|
||||
static PredType* MIPS_I16_;
|
||||
static PredType* MIPS_I32_;
|
||||
static PredType* MIPS_I64_;
|
||||
static PredType* MIPS_U8_;
|
||||
static PredType* MIPS_U16_;
|
||||
static PredType* MIPS_U32_;
|
||||
static PredType* MIPS_U64_;
|
||||
static PredType* MIPS_B8_;
|
||||
static PredType* MIPS_B16_;
|
||||
static PredType* MIPS_B32_;
|
||||
static PredType* MIPS_B64_;
|
||||
static PredType* MIPS_F32_;
|
||||
static PredType* MIPS_F64_;
|
||||
|
||||
static PredType* NATIVE_CHAR_;
|
||||
static PredType* NATIVE_SCHAR_;
|
||||
static PredType* NATIVE_UCHAR_;
|
||||
static PredType* NATIVE_SHORT_;
|
||||
static PredType* NATIVE_USHORT_;
|
||||
static PredType* NATIVE_INT_;
|
||||
static PredType* NATIVE_UINT_;
|
||||
static PredType* NATIVE_LONG_;
|
||||
static PredType* NATIVE_ULONG_;
|
||||
static PredType* NATIVE_LLONG_;
|
||||
static PredType* NATIVE_ULLONG_;
|
||||
static PredType* NATIVE_FLOAT_;
|
||||
static PredType* NATIVE_DOUBLE_;
|
||||
static PredType* NATIVE_LDOUBLE_;
|
||||
static PredType* NATIVE_B8_;
|
||||
static PredType* NATIVE_B16_;
|
||||
static PredType* NATIVE_B32_;
|
||||
static PredType* NATIVE_B64_;
|
||||
static PredType* NATIVE_OPAQUE_;
|
||||
static PredType* NATIVE_HSIZE_;
|
||||
static PredType* NATIVE_HSSIZE_;
|
||||
static PredType* NATIVE_HERR_;
|
||||
static PredType* NATIVE_HBOOL_;
|
||||
|
||||
static PredType* NATIVE_INT8_;
|
||||
static PredType* NATIVE_UINT8_;
|
||||
static PredType* NATIVE_INT16_;
|
||||
static PredType* NATIVE_UINT16_;
|
||||
static PredType* NATIVE_INT32_;
|
||||
static PredType* NATIVE_UINT32_;
|
||||
static PredType* NATIVE_INT64_;
|
||||
static PredType* NATIVE_UINT64_;
|
||||
|
||||
// LEAST types
|
||||
#if H5_SIZEOF_INT_LEAST8_T != 0
|
||||
static PredType* NATIVE_INT_LEAST8_;
|
||||
#endif /* H5_SIZEOF_INT_LEAST8_T */
|
||||
#if H5_SIZEOF_UINT_LEAST8_T != 0
|
||||
static PredType* NATIVE_UINT_LEAST8_;
|
||||
#endif /* H5_SIZEOF_UINT_LEAST8_T */
|
||||
|
||||
#if H5_SIZEOF_INT_LEAST16_T != 0
|
||||
static PredType* NATIVE_INT_LEAST16_;
|
||||
#endif /* H5_SIZEOF_INT_LEAST16_T */
|
||||
#if H5_SIZEOF_UINT_LEAST16_T != 0
|
||||
static PredType* NATIVE_UINT_LEAST16_;
|
||||
#endif /* H5_SIZEOF_UINT_LEAST16_T */
|
||||
|
||||
#if H5_SIZEOF_INT_LEAST32_T != 0
|
||||
static PredType* NATIVE_INT_LEAST32_;
|
||||
#endif /* H5_SIZEOF_INT_LEAST32_T */
|
||||
#if H5_SIZEOF_UINT_LEAST32_T != 0
|
||||
static PredType* NATIVE_UINT_LEAST32_;
|
||||
#endif /* H5_SIZEOF_UINT_LEAST32_T */
|
||||
|
||||
#if H5_SIZEOF_INT_LEAST64_T != 0
|
||||
static PredType* NATIVE_INT_LEAST64_;
|
||||
#endif /* H5_SIZEOF_INT_LEAST64_T */
|
||||
#if H5_SIZEOF_UINT_LEAST64_T != 0
|
||||
static PredType* NATIVE_UINT_LEAST64_;
|
||||
#endif /* H5_SIZEOF_UINT_LEAST64_T */
|
||||
|
||||
// FAST types
|
||||
#if H5_SIZEOF_INT_FAST8_T != 0
|
||||
static PredType* NATIVE_INT_FAST8_;
|
||||
#endif /* H5_SIZEOF_INT_FAST8_T */
|
||||
#if H5_SIZEOF_UINT_FAST8_T != 0
|
||||
static PredType* NATIVE_UINT_FAST8_;
|
||||
#endif /* H5_SIZEOF_UINT_FAST8_T */
|
||||
|
||||
#if H5_SIZEOF_INT_FAST16_T != 0
|
||||
static PredType* NATIVE_INT_FAST16_;
|
||||
#endif /* H5_SIZEOF_INT_FAST16_T */
|
||||
#if H5_SIZEOF_UINT_FAST16_T != 0
|
||||
static PredType* NATIVE_UINT_FAST16_;
|
||||
#endif /* H5_SIZEOF_UINT_FAST16_T */
|
||||
|
||||
#if H5_SIZEOF_INT_FAST32_T != 0
|
||||
static PredType* NATIVE_INT_FAST32_;
|
||||
#endif /* H5_SIZEOF_INT_FAST32_T */
|
||||
#if H5_SIZEOF_UINT_FAST32_T != 0
|
||||
static PredType* NATIVE_UINT_FAST32_;
|
||||
#endif /* H5_SIZEOF_UINT_FAST32_T */
|
||||
|
||||
#if H5_SIZEOF_INT_FAST64_T != 0
|
||||
static PredType* NATIVE_INT_FAST64_;
|
||||
#endif /* H5_SIZEOF_INT_FAST64_T */
|
||||
#if H5_SIZEOF_UINT_FAST64_T != 0
|
||||
static PredType* NATIVE_UINT_FAST64_;
|
||||
#endif /* H5_SIZEOF_UINT_FAST64_T */
|
||||
// End of Declaration of pointers
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
||||
@@ -36,10 +36,60 @@ namespace H5 {
|
||||
#endif // H5_NO_STD
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// This DOXYGEN_SHOULD_SKIP_THIS block is a work-around approach to control
|
||||
// the order of creation and deletion of the global constants. See Design Notes
|
||||
// in "H5PredType.cpp" for information.
|
||||
|
||||
// Initialize a pointer for the constant
|
||||
PropList* PropList::DEFAULT_ = 0;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
///\brief Constant for default property.
|
||||
// Function: PropList::getConstant
|
||||
// Purpose: Creates a PropList object representing the HDF5 constant
|
||||
// H5P_DEFAULT, pointed to by PropList::DEFAULT_.
|
||||
// Exception H5::PropListIException
|
||||
// Description
|
||||
// If PropList::DEFAULT_ already points to an allocated object,
|
||||
// throw a PropListIException. This scenario should not happen.
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
const PropList PropList::DEFAULT;
|
||||
PropList* PropList::getConstant()
|
||||
{
|
||||
// Tell the C library not to clean up, H5Library::termH5cpp will call
|
||||
// H5close - more dependency if use H5Library::dontAtExit()
|
||||
if (!IdComponent::H5dontAtexit_called)
|
||||
{
|
||||
(void) H5dont_atexit();
|
||||
IdComponent::H5dontAtexit_called = true;
|
||||
}
|
||||
|
||||
// If the constant pointer is not allocated, allocate it. Otherwise,
|
||||
// throw because it shouldn't be.
|
||||
if (DEFAULT_ == 0)
|
||||
DEFAULT_ = new PropList(H5P_DEFAULT);
|
||||
else
|
||||
throw PropListIException("PropList::getConstant", "PropList::getConstant is being invoked on an allocated DEFAULT_");
|
||||
return(DEFAULT_);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: PropList::deleteConstants
|
||||
// Purpose: Deletes the constant object that PropList::DEFAULT_ points to.
|
||||
// Programmer Binh-Minh Ribler - 2015
|
||||
//--------------------------------------------------------------------------
|
||||
void PropList::deleteConstants()
|
||||
{
|
||||
if (DEFAULT_ != 0)
|
||||
delete DEFAULT_;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Purpose Constant for default property.
|
||||
//--------------------------------------------------------------------------
|
||||
const PropList& PropList::DEFAULT = *getConstant();
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function Default constructor
|
||||
@@ -54,7 +104,7 @@ PropList::PropList() : IdComponent(), id(H5P_DEFAULT) {}
|
||||
///\param original - IN: The original property list to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
PropList::PropList(const PropList& original) : IdComponent(original)
|
||||
PropList::PropList(const PropList& original) : IdComponent()
|
||||
{
|
||||
id = original.getId();
|
||||
incRefCount(); // increment number of references to this id
|
||||
@@ -258,6 +308,7 @@ void PropList::p_setId(const hid_t new_id)
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace H5 {
|
||||
//! Class PropList provides operations for generic property lists.
|
||||
class H5_DLLCPP PropList : public IdComponent {
|
||||
public:
|
||||
// Default property list
|
||||
static const PropList DEFAULT;
|
||||
///\brief Default property list
|
||||
static const PropList& DEFAULT;
|
||||
|
||||
// Creates a property list of a given type or creates a copy of an
|
||||
// existing property list giving the property list id.
|
||||
@@ -110,12 +110,26 @@ class H5_DLLCPP PropList : public IdComponent {
|
||||
// Destructor: properly terminates access to this property list.
|
||||
virtual ~PropList();
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// Deletes the PropList global constant
|
||||
static void deleteConstants();
|
||||
|
||||
protected:
|
||||
hid_t id; // HDF5 property list id
|
||||
|
||||
// Sets the property list id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
|
||||
private:
|
||||
static PropList* DEFAULT_;
|
||||
|
||||
// Dynamically allocates the PropList global constant
|
||||
static PropList* getConstant();
|
||||
|
||||
// Friend function to set PropList id. For library use only.
|
||||
friend void f_PropList_setId(PropList* plist, hid_t new_id);
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
};
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5DataType.h"
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5OcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5DataType.h"
|
||||
|
||||
@@ -40,7 +40,6 @@ class H5_DLLCPP VarLenType : public DataType {
|
||||
// Noop destructor
|
||||
virtual ~VarLenType();
|
||||
|
||||
protected:
|
||||
// Default constructor
|
||||
VarLenType();
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user