[Insight-users] Feature Request: Adding "Debug" filename decorations to installed libraries

Wen Shi wsa18 at sfu.ca
Wed Sep 9 14:33:17 EDT 2009


I vote for this insight suggestion!!!!!!!!!!!!!!!!!!!!!

----- Original Message -----
From: "Michael Jackson" <mike.jackson at bluequartz.net>
To: "itk Users" <insight-users at itk.org>
Sent: Wednesday, September 9, 2009 9:12:36 AM GMT -08:00 US/Canada Pacific
Subject: [Insight-users] Feature Request: Adding "Debug" filename decorations to installed libraries

Reading the recent thread "Speeding up the evaluation of the  
itk::Gaussian?" the original poster is going through some of the same  
trials and tribulations that I went through on Windows in the last  
month or so. The root of the problem with Visual Studio builds is that  
you can not combine a debug build of ITK with Release build of your  
own application/library. Doing this will cause all sorts of endless  
heartaches.

   So what you can do is build ITK twice, once in Debug mode and once  
in Release mode. Install each to their own installation prefixes and  
now you have both. But the next problem is that with your own project  
you will need to have 2 separate CMake Build directories. One that has  
ITK_DIR pointing to the Debug ITK installation and the other build  
directory where the ITK_DIR points to the release build. This creates  
2 VS Solution files and is kind of cumbersome to manage. Instead of  
just using the Drop down combo box in Visual Studio, I have to  
actually load up a completely separate solution file. This probably  
isn't the most efficient use of my time.

  What would be AWESOME is if the ITK libraries had some sort of  
filename decoration (like boost and Qt) where "d" or "_debug" or  
something is added into the filenames. This would allow for an  
installation of BOTH Debug and Release builds of ITK in the same  
location. The "UseITK.cmake" file that comes with an ITK installation  
can have all the appropriate entries to pick up the proper libraries  
for each configuration of a project. This works really well for Boost  
and Qt and I have adopted it for my own projects.

  Now I know it is technically possible to do this with CMake. My  
question is: Is there interest from the ITK community to have this  
"feature" added with the ability to turn it "off" if it is not wanted  
by a programming team. What are the perils of having both the debug  
and release builds in the same install prefix. ( I can probably come  
up with a contrived case that might break things).

  My own experience was that I lost about 2 days of developer time  
because I "forgot" my ITK was installed in Debug mode so when I went  
to build and package a "Release" build and then tested the installer,  
I was treated to the "Your application is broken" error message, went  
down the road of the MS Redistributable.exe deal and a bunch of other  
stuff until a I finally realized what the true problem was. Just  
hoping it would save someone else the time in the future.

  Either the above or I have fundamentally setup my development  
environment incorrectly....

Comments and thoughts or suggestions are definitely welcomed and  
encouraged.

_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio

_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list