majintao0131 / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Feature: Exclude parts of YAML-CPP lib from building #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Would the possibility to exclude parts of YAML-CPP lib make sense?

This would result in an extremely small build, that could be used for embedded 
development or by projects with static linking using only the basic features 
(e.g. BUILD_ONLY_BASICS cmake option).
A first step could be to disable contrib code via a CMake option (e.g. 
BUILD_NO_CONTRIB or similar).

Just doing some brainstorming for possible enhancements.

Original issue reported on code.google.com by matthias...@gmail.com on 3 Mar 2011 at 8:38

GoogleCodeExporter commented 9 years ago
It's possible someone might only want to build the parser (or only the 
emitter); I've thought about separating those two. (The contrib code, on the 
other hand, is pretty small - I dunno how much benefit you'd get from that.)

Other than that, there's not really much extraneous stuff. It just does what it 
does. Did you have anything in mind?

Original comment by jbe...@gmail.com on 4 Mar 2011 at 2:30

GoogleCodeExporter commented 9 years ago
In our project we just parse existing YAML files, nothing more.
So when more and more contrib stuff gets added, then our executable would grow 
in size too.
Otherwise I did not have anything special in mind, just brainstorming how to 
make YAML-CPP even more attractive to developers.

With the information you gave I think splitting in "parser", "emitter" and 
"contrib" would be way enough to make everybody happy regarding the lib size.
And these three divisions will serve well for a very long time.
I will try to enhance the CMakeLists.txt to allow disabling contrib stuff.

Original comment by matthias...@gmail.com on 4 Mar 2011 at 5:57

GoogleCodeExporter commented 9 years ago
Tests with disabling the contrib stuff went very well. Patch is attached.
The same way should work for splitting parser and emitter, just separate them 
into subfolders.

Could you also set some properties on all text files (incl. sources/headers):
svn:eol-style = native
svn:mime-type = text/plain

This helps to keep END-OF-LINEs consistent over all platforms.

Original comment by matthias...@gmail.com on 4 Mar 2011 at 7:17

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Merged this patch (and set eol-style to native) in r472. I'm closing this case 
and opening issue 100 for splitting the emitter and parser code.

Original comment by jbe...@gmail.com on 16 Mar 2011 at 1:18