[Insight-users] Re: CMAKE_DEBUG_POSTFIX
Rupert Brooks
rupe.brooks at gmail.com
Fri Feb 15 18:02:07 EST 2008
Hi again,
I will answer my own question as the workaround is far simpler than i
thought. Set the ITK_NO_LIBRARY_DEPENDS to 1. Then set up a list of
libraries to link to in my CMakeLists.txt with all the libraries
listed as debug and optimized versions, and TARGET_LINK_LIBRARIES
that. A little tedious, as it seems the list of system libraries
varies from platform to platform, but i only need to do it once. Seems
to work so far.
I guess its still a little imperfect, in that the itk cmake files are
a little wrong, but i dont know if its serious enough to worry about.
Sorry for the email noise,
Rupert
On Fri, Feb 15, 2008 at 4:27 PM, Rupert Brooks <rupe.brooks at gmail.com> wrote:
> Hello,
>
> Recently I've been trying to set up my ITK build so that it will
> append a "d" to the end of the debug libraries and install them in the
> same place as the release ones, so that my debug and release builds
> can coexist properly. CMake supports this with a the
> CMAKE_DEBUG_POSTFIX option - which i added to the CMakeLists.txt.
> However, the UseITK.cmake, ITKConfig.cmake, etc always use the library
> names without the "d". Thus for the debug build, these files are just
> plain wrong - for example they will say to link against
> itkStatistics.lib which was never built - itkStatisticsd.lib was
> built. There is then the further problem that the debug build of
> these files overwrites the release build of it.
>
> I can probably slog my way through a workaround, but is anyone else
> doing this, or perhaps is there a better way to do what i want to do?
> Should this be a requested feature?
>
> The technical details: Im using Visual Studio 2005 Express on Windows
> XP, with CMake 2.4.8. I'm building ITK3.4.
>
> Rupert
> --
> --------------------------------------------------------------
> Rupert Brooks
> McGill Centre for Intelligent Machines (www.cim.mcgill.ca)
> Ph.D Student, Electrical and Computer Engineering
> http://www.cyberus.ca/~rbrooks
>
--
--------------------------------------------------------------
Rupert Brooks
McGill Centre for Intelligent Machines (www.cim.mcgill.ca)
Ph.D Student, Electrical and Computer Engineering
http://www.cyberus.ca/~rbrooks
More information about the Insight-users
mailing list