Following commit commontk/CTK@12c052 fixing a packaging Debian bug, the DCMTK_DEFINITIONS was set directly inside the FindDCMTK.cmake module using "add_definitions". When used outside of this project, setting automatically the definition could have some unintended effects. For example, by globally adding DCMTK_DEFINITIONS (and more specifically HAVE_CONFIG_H), it prevented from compiling successfully program against the "tclap" library. Compile errors like the following occurred: // ------------------ In file included from <DIR>/SlicerExecutionModel/tclap/include/tclap/CmdLine.h:27:0, from <DIR>/Slicer-build/Modules/CLI/CheckerBoardFilter/CheckerBoardFilterCLP.h:13, from <SRC>/Modules/CLI/CheckerBoardFilter/CheckerBoardFilter.cxx:23: <DIR>/SlicerExecutionModel/tclap/include/tclap/MultiSwitchArg.h:44:2: error: #error "Need a stringstream (sstream or strstream) to compile!" #error "Need a stringstream (sstream or strstream) to compile!" ^ <DIR>/SlicerExecutionModel/tclap/include/tclap/MultiSwitchArg.h:171:2: error: #error "Need a stringstream (sstream or strstream) to compile!" #error "Need a stringstream (sstream or strstream) to compile!" ^ In file included from <DIR>/SlicerExecutionModel/tclap/include/tclap/UnlabeledValueArg.h:30:0, from <DIR>/SlicerExecutionModel/tclap/include/tclap/CmdLine.h:28, from <DIR>/Slicer-build/Modules/CLI/CheckerBoardFilter/CheckerBoardFilterCLP.h:13, from <SRC>/Modules/CLI/CheckerBoardFilter/CheckerBoardFilter.cxx:23: <DIR>/SlicerExecutionModel/tclap/include/tclap/ValueArg.h:43:2: error: #error "Need a stringstream (sstream or strstream) to compile!" #error "Need a stringstream (sstream or strstream) to compile!" ^ <DIR>/SlicerExecutionModel/tclap/include/tclap/ValueArg.h:97:2: error: #error "Need a stringstream (sstream or strstream) to compile!" #error "Need a stringstream (sstream or strstream) to compile!" ^ // ------------------ See #382
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|