Comments (2)
Thanks for the suggestions. None of our use cases ever use the shared library or install it, so it really hasn't gotten much attention.
We pretty much static link it as a submodule or just include the code directly. C++ shared libraries are always a bit dicey in my opinion. But regardless seems like it could be done better.
Would you propose disabling the ability to make both the static and shared libraries at the same time? If not how would you distinguish between them?
from units.
@phlptp thank you for a quick reply,
Would you propose disabling the ability to make both the static and shared libraries at the same time? If not how would you distinguish between them?
In my experience there were no necessarity to create both static and shared libs at the same time. But I have seen such option few times even in quite big libraries (as I remember VTK
provides this but I may be mistaken)
I think that units
can be built static
by default (i.e. when UNITS_BUILD_SHARED_LIBRARY=OFF
) and only if UNITS_BUILD_SHARED_LIBRARY=ON
then units
should be built in shared mode.
BUT regarding how UNITS_HEADER_ONLY
var is working the above proposition can be modified in the following way:
if I understand correct UNITS_HEADER_ONLY
makes units
to build and install headers only (something like copy include directories to install folder). In this case I think if UNITS_BUILD_SHARED_LIBRARY=ON
then there is no need to process UNITS_HEADER_ONLY
var because include folder will be copied anyway.
If UNITS_HEADER_ONLY=ON
and UNITS_BUILD_SHARED_LIBRARY=OFF
then we don't want to build neither static
nor shared
library and we install only include folder.
If UNITS_HEADER_ONLY=OFF
and UNITS_BUILD_SHARED_LIBRARY=OFF
then we build static
library because there is nothinh else user can expect from building.
Also I expect that if a library provides all the three header only/shared/static
mode then I don't want to distinguish my cmake code and C++ code with thoughts like: "What if my user wants to build my library and link to shared units
library then I need... Or if he wants to link to static units
...". This is super annoying :)
from units.
Related Issues (20)
- Conan package HOT 12
- Convert to inverse unit incorrect HOT 1
- Issues with parsing single-letter prefixes such as for `atto` HOT 7
- CleanUnitString breaks on 0.2 and 0.3 HOT 1
- Strange choice of units in to_string HOT 6
- Your units conversion service seems to be down... HOT 11
- "kg m" is parsed as "kg" HOT 1
- Surprising parse results with `.` and `-` HOT 4
- Question about to_string() function HOT 8
- Format arbitrary unit nicely HOT 4
- Degrees celsius get converted to Kelvin in operations HOT 6
- Function to remove a single user defined unit HOT 2
- Try to start a PR for adding support for KPa, MPa, GPa but permission denied HOT 3
- Using to_string for scalars causes crashes HOT 2
- Use of uninitialised memory in unit maps HOT 7
- "Stress testing" units' string parsing HOT 8
- Favoring SI base units in string formatting? HOT 3
- to_string strange output HOT 4
- expression did not evaluate to a constant HOT 4
- Unary negation of measurements HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from units.