Feature Request: Proper handling of debug libraries / Windows

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Feature Request: Proper handling of debug libraries / Windows

Robert Hauck
Hi all

I'm wondering if it would be possible to extend the CMake build system to properly handle debug libraries under Windows. The reason is, it would be much easier to build Equalizer with CMake externalProject if we could separate debug from release libs.

I think, (at least) two things have to be implemented:
- change <EQUALIZER>\libs\eq\client\client.cpp, ln 132 to something that differs between release and debug (adding a debug postfix)
- change all FindXXX.cmake to properly search for debug libraries under Windows in gpusd, equalizer etc. This could be done by something like
FIND_LIBRARY(EQUALIZER equalizer)
FIND_LIBRARY(EQUALIZER_DEBUG equalizerd)
if(EQUALIZER and EQUALIZER_DEBUG )
set(EQUALIZER_LIBRARIES optimized ... debug ...)
(test for all three possibilities)

The debug postfix has to be discussed, could be d, _d, _debug or whatever, I think mostly used is the postfix d.

This wouldn't affect unix or apple.

Another possibility would be is to install into different directories, but I haven't managed to create a working CMake file which can be used for multi-configuration generators such as for VS.

What is your opinion?

Cheers,
Robert
Reply | Threaded
Open this post in threaded view
|

Re: Feature Request: Proper handling of debug libraries / Windows

purpleKarrot
2012/8/5 Robert Hauck <[hidden email]>:

> Hi all
>
> I'm wondering if it would be possible to extend the CMake build system to
> properly handle debug libraries under Windows. The reason is, it would be
> much easier to build Equalizer with CMake externalProject if we could
> separate debug from release libs.
>
> I think, (at least) two things have to be implemented:
> - change <EQUALIZER>\libs\eq\client\client.cpp, ln 132 to something that
> differs between release and debug (adding a debug postfix)
> - change all FindXXX.cmake to properly search for debug libraries under
> Windows in gpusd, equalizer etc. This could be done by something like
> FIND_LIBRARY(EQUALIZER equalizer)
> FIND_LIBRARY(EQUALIZER_DEBUG equalizerd)
> if(EQUALIZER and EQUALIZER_DEBUG )
> set(EQUALIZER_LIBRARIES optimized ... debug ...)
> (test for all three possibilities)

Hi Robert,

This might be of interest:
http://www.cmake.org/pipermail/cmake/2009-April/028504.html

cheers, Daniel

> The debug postfix has to be discussed, could be d, _d, _debug or whatever, I
> think mostly used is the postfix d.
>
> This wouldn't affect unix or apple.
>
> Another possibility would be is to install into different directories, but I
> haven't managed to create a working CMake file which can be used for
> multi-configuration generators such as for VS.
>
> What is your opinion?
>
> Cheers,
> Robert
>
>
>
> --
> View this message in context: http://software.1713.n2.nabble.com/Feature-Request-Proper-handling-of-debug-libraries-Windows-tp7580968.html
> Sent from the Equalizer - Parallel Rendering mailing list archive at Nabble.com.
>
> _______________________________________________
> eq-dev mailing list
> [hidden email]
> http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
> http://www.equalizergraphics.com

_______________________________________________
eq-dev mailing list
[hidden email]
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com
Reply | Threaded
Open this post in threaded view
|

Re: Feature Request: Proper handling of debug libraries / Windows

Stefan Eilemann
In reply to this post by Robert Hauck

On 5. Aug 2012, at 13:55, Robert Hauck [via Software] wrote:

> Hi all
>
> I'm wondering if it would be possible to extend the CMake build system to properly handle debug libraries under Windows. The reason is, it would be much easier to build Equalizer with CMake externalProject if we could separate debug from release libs.

My understanding is that this is only a problem for install/package results, right?

My personal preference would be:

<inst>/lib/libFoo.dso
<inst>/lib/debug/libFoo.dso
<inst>/bin/fooApp
<inst>/bin/debug/fooApp
<inst>/include/foo

...which allows dynamically using debug libraries if needed. Of course, VS doesn't support that.

I understand the Windows way is:
<inst>/lib/libFoo.dso
<inst>/lib/libFoo.dbg.dso
<inst>/bin/fooApp
<inst>/bin/fooApp.dbg
<inst>/include/foo

...which is broken, but out of our hands. The first approach would be cross-platform, the second more Windows-ish. Since I am not the major stake holder here, I leave the final call up to Robert.


Cheers,

Stefan.

Reply | Threaded
Open this post in threaded view
|

Re: Feature Request: Proper handling of debug libraries / Windows

Stefan Eilemann
In reply to this post by purpleKarrot
Hi Daniel,

On 5. Aug 2012, at 22:48, purpleKarrot [via Software] wrote:

> This might be of interest:
> http://www.cmake.org/pipermail/cmake/2009-April/028504.html

This is interesting, but would require quite some .cmake generation in addition to the install(EXPORT ...), namely options.cmake, ...Version.cmake and potentially the multi-lib/module support. I'm fine to merge the changes if somebody wants to go all the way to switch from the current FindLibraryPackage.cmake approach.


Cheers,

Stefan.