Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cmake option to compile library in shared or static #358

Merged

Conversation

Alex-PLACET
Copy link
Collaborator

No description provided.

@Alex-PLACET Alex-PLACET self-assigned this Feb 18, 2025
Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.67%. Comparing base (bf3a430) to head (18eb394).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #358   +/-   ##
=======================================
  Coverage   89.67%   89.67%           
=======================================
  Files          88       88           
  Lines        6622     6622           
=======================================
  Hits         5938     5938           
  Misses        684      684           
Flag Coverage Δ
unittests 89.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Alex-PLACET Alex-PLACET marked this pull request as ready for review February 18, 2025 14:44
Copy link
Collaborator

@JohanMabille JohanMabille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the static library and dynamic library on Windows should be different, otherwise it is impossible to build both of them at the same time.

EDIT: if this is urgent for the conan recipe, this can be done in a future PR, no need to block this one. There won't be any issue on Windows since the stati and dynamic builds are exclusive.

message(STATUS "🔧 Build static library")
set(SPARROW_LIBRARY_TYPE STATIC)
list(APPEND SPARROW_COMPILE_DEFINITIONS SPARROW_STATIC_LIB)
endif()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why making the static and dynamic builds exclusive?

@Alex-PLACET
Copy link
Collaborator Author

@JohanMabille #359

@Alex-PLACET Alex-PLACET merged commit 2843af5 into man-group:main Feb 19, 2025
89 checks passed
@Alex-PLACET Alex-PLACET deleted the cmake_add_option_shared_static_library branch February 19, 2025 10:13
@SylvainCorlay
Copy link
Collaborator

I think that SPARROW_BUILD_SHARED and SPARROW_BUILD_STATIC should be settable independently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants