CMakeDetectLibraryType: add module to detect library types
Merge request reports
Activity
changed milestone to %3.21.0
added workflow:wip label
- Resolved by Ben Boeckel
- Resolved by Ben Boeckel
- Modules/CMakeDetectLibraryType.cmake 0 → 100644
55 NAMES dumpbin 56 DOC "Path to the dumpbin executable") 57 mark_as_advanced(CDLT_DUMPBIN_EXECUTABLE) 58 execute_process( 59 COMMAND "${CDLT_DUMPBIN_EXECUTABLE}" 60 /HEADERS 61 "${cdlt_PATH}" 62 OUTPUT_VARIABLE cdlt_out 63 ERROR_VARIABLE cdlt_err 64 RESULT_VARIABLE cdlt_res) 65 if (cdlt_res) 66 message(WARNING 67 "Failed to run `dumpbin` on ${cdlt_PATH}. Cannot determine " 68 "shared/static library type: ${cdlt_err}") 69 else () 70 if (cdlt_out MATCHES "DLL name :") Do you mean you want to stage this with the module's implementation to get the test suite working, and then port to C++ before merging?
Yes. I'm sure there are platforms which mirror Windows and need tooling to determine the difference since the static library suffix is the same as the import library suffix. AIX comes to mind, but there are likely others.
Knowing if that
DLL name
string is locale-dependent would also be nice (the stage has different locale envs, right?).
added workflow:in-review label and removed workflow:wip label
added triage:blocked label
added 1 commit
- abd7713c - CMakeDetectLibraryType: add module to detect library types
added 1 commit
- aa3dbbd6 - CMakeDetectLibraryType: add module to detect library types
added 1 commit
- f5c93b50 - CMakeDetectLibraryType: add module to detect library types
added 1 commit
- e2e34de4 - CMakeDetectLibraryType: add module to detect library types
Issues found (CDash link):
- warnings from the example code (fixed locally)
- nmake outputs a path to stderr? (!5828 (merged))
- cygwin logic needs fixed (needs investigation)
- bcc has no dumpbin (deferring to the C++ impl)
-
watcom did not make a
.lib
file (symbol export details; fixed locally)
Edited by Ben BoeckelMmm, fun. What to do about the watcom missing the
.lib
file? IsCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
not working with that compiler?I think the Cygwin test could be fixed by testing the longest extensions before the shorter extensions. Not sure how to silence the
llvm-nm.exe
output from nmake though.The
llvm-nm
output is due to leftover debugging code. !5828 (merged) removes it. If you stop usingCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
and add proper dllexport markup, that code path won't be used anyway.
added workflow:nightly-testing label and removed workflow:in-review label
- Resolved by Ben Boeckel
added workflow:wip label and removed workflow:nightly-testing label
added workflow:expired label and removed workflow:wip label