[eq-dev] Feature Request: Proper handling of debug libraries / Windows

7 views
Skip to first unread message

Robert Hauck

unread,
Aug 5, 2012, 7:55:57 AM8/5/12
to eq-...@equalizergraphics.com
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



--
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
eq-...@equalizergraphics.com
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com

Daniel Pfeifer

unread,
Aug 5, 2012, 4:47:19 PM8/5/12
to Equalizer Developer List
2012/8/5 Robert Hauck <hu...@bfh.ch>:
> 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

Stefan Eilemann

unread,
Aug 6, 2012, 4:36:38 AM8/6/12
to eq-...@equalizergraphics.com

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.





--
View this message in context: http://software.1713.n2.nabble.com/Feature-Request-Proper-handling-of-debug-libraries-Windows-tp7580968p7580976.html

Stefan Eilemann

unread,
Aug 6, 2012, 4:39:19 AM8/6/12
to eq-...@equalizergraphics.com
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.





--
View this message in context: http://software.1713.n2.nabble.com/Feature-Request-Proper-handling-of-debug-libraries-Windows-tp7580968p7580977.html
Reply all
Reply to author
Forward
0 new messages