Adding optional configuration for building as a shared library vs static?
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cmake, cpp
- Domain
- build-system
Research direction
Start by locating the CMake configuration containing the GDeflate add_library definition, then inspect 3rdparty/libdeflate.cmake. Configure the project with BUILD_SHARED_LIBS enabled and disabled, and verify that both configurations produce the intended library types without requiring manual edits.
Written by the indexing model from the issue text.
Description
I needed to build a shared library version of GDeflate to satisfy a dependency, but currently the CMake configuration only builds a static version. I was able to fix this by replacing
add_library(GDeflate STATIC ${SOURCES} ${HEADERS} ${PUBLIC_HEADERS})
with
if(BUILD_SHARED_LIBS)
add_library(GDeflate SHARED ${SOURCES} ${HEADERS} ${PUBLIC_HEADERS})
else()
add_library(GDeflate STATIC ${SOURCES} ${HEADERS} ${PUBLIC_HEADERS})
endif()
I also had to change this in 3rdparty/libdeflate.cmake, ending up with two shared libraries. It's a small change but I wanted to propose a PR for it in case it would be useful for anyone else? Let me know what you think.
- Dominant language
- C++
- Stars
- 897
- Forks
- 111
- Avg merge
- 13h 58m
- Merged PRs (30d)
- 12
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/DirectStorage
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
microsoft/DirectStorage#137 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/DirectStorage#101 ·
-
can't compile? Open
Difficulty 4/5 3-5 days Newbie friendliness 20/100
microsoft/DirectStorage#58 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
microsoft/DirectStorage#56 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/DirectStorage#52 · 7 comments ·
All issues in microsoft/DirectStorage
Similar issues
-
ai_reviewed
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ydb-platform/ydb#53869 · 3 comments ·
-
bug cert blocker needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
project-chip/connectedhomeip#74373 ·
-
upstream update
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
conan-io/conan-center-index#31035 ·
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
vllm-project/vllm-ascend#17329 ·