Skip to content
Snippets Groups Projects

CMakeDetectLibraryType: add module to detect library types

Closed Ben Boeckel requested to merge ben.boeckel/cmake:detect-library-type-module into master

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ben Boeckel
  • 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 :")
    • To provide a feature like this in upstream CMake, I'd much rather it be in the C++ implementation and provided by a command, as we do for file(GET_RUNTIME_DEPENDENCIES).

    • Author Developer

      Is file(DETECT_LIBRARY_TYPE) sufficient? In any case, nailing the test suite down with CMake code seems like a good first step.

    • That name is fine for now.

      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?

    • Author Developer

      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?).

    • I don't think our nightly tests have any Windows machines with non-English locales.

    • Anyway, go ahead and stage this when CI is happy.

    • I added the blocked label as a reminder not to merge this until the implementation is updated.

    • Please register or sign in to reply
  • Brad King added workflow:in-review label and removed workflow:wip label

    added workflow:in-review label and removed workflow:wip label

  • Ben Boeckel added 1 commit

    added 1 commit

    • abd7713c - CMakeDetectLibraryType: add module to detect library types

    Compare with previous version

  • Ben Boeckel added 1 commit

    added 1 commit

    • aa3dbbd6 - CMakeDetectLibraryType: add module to detect library types

    Compare with previous version

  • Ben Boeckel added 1 commit

    added 1 commit

    • f5c93b50 - CMakeDetectLibraryType: add module to detect library types

    Compare with previous version

  • Ben Boeckel added 1 commit

    added 1 commit

    • e2e34de4 - CMakeDetectLibraryType: add module to detect library types

    Compare with previous version

  • Brad King
  • added workflow:wip label and removed workflow:nightly-testing label

  • Closing for now. Please re-open when ready to continue work.

  • closed

  • Brad King added workflow:expired label and removed workflow:wip label

    added workflow:expired label and removed workflow:wip label

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading