Fixes (?) to add_debug_variants#201
Conversation
|
I'll have a deeper look into this: I also noticed that add_debug_variants() in malfunctioning in general and the Debug-Release switching is broken. I'll dig into this in conjunction with VS 2017 support work. |
|
@Stinkfist0 that would be great. Just fixed the PR to work on nix. |
|
@Stinkfist0 did you manage to have a look? |
|
Sorry, got derailed with this, I'll try to take a look tonight and report back. |
|
No worries, not urgent |
|
Unfortunately I didn't have still time to look into this properly, but I think the root of the Release/Debug switching problems is the point when usage of |
|
OK, finally have the time to properly look into this. Should be done by tonight. |
Well, I agree the amount of custom code to do some simple library linking doesn't feel right. The commit you are referring to is e9bd18f based on this issue #111 The problem being solved there is that if you refer to libs as a pair of Also note the CMake docs recommending against
So, with #217 this can be closed? [1] https://cmake.org/cmake/help/v3.2/command/link_directories.html |
|
Yeah, upon more thought specifying the full filename of the library feels better than the path-filename pair. Maybe in the future we can cook up a bit nicer and cleaner unified approach for this as the current CMake script is becoming quite convoluted. If the new PR looks good enough (better than this PR), yeah, this can be closed. |
@Stinkfist0 I ran into this problem, that if CMake runs against debug libraries of OCCT, that already have a
_dpostfix, it would try to link toTKerneldd.lib, i.e. double d.Perhaps in this particular case, no release libs where available in the dir, so
FIND_LIBRARY(libTKernel NAMES TKernel TKerneldcan only return theTKerneld.lib.Then in [1] (which I believe was added by me after your
add_debug_variants()) this_dis not accounted for.Somehow I ended making more changes than I anticipated, because I kept ending up with a structure like:
TKernel.lib GENERAL TKernel.lib DEBUG TKernel.lib. So overcautiously I made sureadd_debug_variants()does not append to a pre-existing list.Does this look somewhat reasonable to you?
[1]