Commit f08a836
committed
COMP: Build in-scope DCMTK alongside MINC on MSVC
Building DCMTK in ITK's shared CMake scope (FetchContent + add_subdirectory)
runs DCMTK's CHECK_*_EXISTS probes in that scope, with two effects on
sibling third-party modules:
- Leftover CMAKE_REQUIRED_* state from DCMTK's probes. Snapshot and restore
it around FetchContent_MakeAvailable(dcmtk).
- DCMTK caches HAVE_TMPNAM=0 on MSVC (its tmpnam probe, like MINC's, uses
CHECK_FUNCTION_EXISTS, which cannot detect MSVC CRT functions). MINC then
inherits the cached 0 and its config.h selects none of mkstemp/tempnam/
tmpnam, tripping the "System defines neither ..." #error. tmpnam() does
exist in the MSVC CRT, so assert HAVE_TMPNAM directly for MSVC (matching
MINC's own config.h.msvc-win32); the local set() also overrides any value
left in the shared cache.1 parent 33f964d commit f08a836
2 files changed
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
270 | 286 | | |
271 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
272 | 294 | | |
273 | 295 | | |
274 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
145 | 153 | | |
146 | 154 | | |
147 | 155 | | |
| |||
0 commit comments