Closed mehdi-benallegue closed 4 years ago
Sure. The main issue in Windows is that you cannot mix STL types from Debug and Release builds but afaik this doesn't have any effect on other platforms. At the time, this was introduced for consistency across platforms and because this allowed to generated distinct .pc
for debug and release build. The drawback is obviously what you are facing now. I generally find that RelWithDebInfo
is enough for debugging.
We can make the debug postifx Windows-specific now that we only rely on CMake to find the dependency and not on pkg-config anymore.
Optionally, you can simply remove this line in your local debug build
I use a kind of RelWithDebInfo
(my own flags) in general, but sometimes I prefer the asserts to be tested.
For the solution, since we distribute this code to more than our team, I think the best is to make it Windows-specific.
I discussed with @aescande about the postfix
_d
added to the library in debug mode https://github.com/jrl-umi3218/sch-core/blob/bc6db7a1fd6811a097064eb0656120ef2ac13ba9/CMakeLists.txt#L17He explained that it is mainly useful in windows where debug and release projects cannot be mixed in the same binary.
However I need to be able to debug on linux separate packages without having to rebuild the entire framework in debug, and sch-core is one of them. Especially since this package is used by other people not aware of this convention. Can we make this line Windows-specific?