[Ctk-developers] CTK Update to latest DCMTK

OFFIS DICOM Team dicom at offis.de
Mon Aug 1 17:41:25 EDT 2011


Hi,

Am 01.08.2011 20:41, schrieb Jean-Christophe Fillion-Robin:

> We already have a WITH_THREADS flag in DCMTK which adds libpthread if
> existing/necessary. Usually, with threads is turned on.
>
> Does it mean that turning WITH_THREAD OFF won't append the /MT or /MTd
> flags ?

No, on Windows we usually use /MT and /MTd in DCMTK. For CTK, we now (since
today) use the flags automatically determined by CMake, i.e. /MD and /MDd
for compilation. In both cases we do not care about whether
DCMTK_WITH_THREADS is on or off. Both, /MT(d) and /MD(d) flags, select a
microsoft runtime library including threaded versions, as far as I (and you
probably) know:

http://msdn.microsoft.com/en-us/library/2kzt1wy3(v=vs.71).aspx

If WITH_THREADS is off, DCMTK's thread classes like OFThread are not
compiled, and pthread and the like are not added to the linker.

> I could commit it any time/immediately in DCMTK. My colleague noted that
> we should take care that we only put -fPIC into effect if it is
> understood by the compiler and needed, so I wonder whether "IF(UNIX" is
> a sufficient guard. Any hints or recommendations?
>
>
> You could for example do: [...]

I inserted a flag DCMTK_FORCE_FPIC_ON_UNIX in DCMTK [1] which can be set
from CTK's DCMTK.cmake via CMAKE_ARGS. If this makes sense, I can change the
DCMTK.cmake accordingly. Also, I removed mktemp from the tparser.cc [2] so
the warning an unix should be gone now.

Thanks for helping!

Michael

[1]
http://git.dcmtk.org/web?p=dcmtk.git;a=commitdiff;h=09db15ff595da6c35330fd7f63669aeb9952e015

[2] 
http://git.dcmtk.org/web?p=dcmtk.git;a=commitdiff;h=96ce7c46b48245512385170bfb72ec3cdc32a3a6

-- 
OFFIS DICOM Team, Escherweg 2, 26121 Oldenburg, Germany
E-Mail: dicom at offis.de, URL: http://dicom.offis.de



More information about the Ctk-developers mailing list