[Insight-developers] Problems with Visual Studio 2010 linkage -- any experts?
Bill Hoffman
bill.hoffman at kitware.com
Fri Nov 2 16:19:38 EDT 2012
On 11/2/2012 3:09 PM, Félix C. Morency wrote:
> I'm no expert but watch out for the DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS
> in the CMakeLists.txt that will overwrite any compiler flags you might
> customize.
>
> -F
Yes, that would do it. The cache would no longer be the main source of
the flags. That is why I asked about the generator being used. If IDE
I would say go into the properties for both and see the final link and
compile lines. If nmake, run with VERBOSE makefiles and compare.
http://support.dcmtk.org/wiki/dcmtk/howto/cmakeconfiguration360
DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS: This is only interesting if you
are going to compile with Visual Studio on Windows. The DCMTK CMake
default configuration sets compiler flags that are known to work on
windows systems. However, if you are an expert, you may want to set the
compiler flags yourself. If so, you must unselect this checkbox. Only do
so, if you know what you are doing!
IF(DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS)
IF(DCMTK_LINK_DLL)
SET(DCMTK_CRT_FLAG_DEBUG "/MTd")
SET(DCMTK_CRT_FLAG "/MT")
ELSE(DCMTK_LINK_DLL)
SET(DCMTK_CRT_FLAG_DEBUG "/MDd")
SET(DCMTK_CRT_FLAG "/MD")
ENDIF(DCMTK_LINK_DLL)
This is why this does not hold true:
> . But I've looked at the CMakeCache.txt for both
> projects and all the
> compiler and linker flags are identical.
:)
--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
More information about the Insight-developers
mailing list