Skip to content

Turning off dynamic (or static) library target #161

@jamesETsmith

Description

@jamesETsmith

General

I'm working on a team implementing the GraphBLAS standard for some custom hardware. Our build system is only ideal for statically linked libraries right now and LAGraph currently supports dynamic and static linking. By default, LAGraph links the benchmarks and tests to the dynamically linked LAGraph library which causes some problems for us. We can work around them by modifying the cmake files to link all executables to the static library instead, but that's a pretty hacky solution. I understand this is a unique situation, but it would be a handy feature if we could choose a single type of LAGraph library to compile, e.g. dynamic or static, and have all executables link to that library.

Proposal

I have two options in mind, but I'm open to other suggestions.

  1. Allow users to choose either static or dynamic linking. This approach will be fairly simple and shouldn't add too much complexity to the build system, but it will make the build system a little less flexible. Users must build the static and dynamic libraries separately if they want/need both.
  2. Allow users to choose a combination of static and dynamic linking. This approach will require more cmake code to handle the variety of options for users but will give them greater flexibility to configure their builds.

Next Steps

If people think this would be helpful, I'd be glad to open a PR. Just let me know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions