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

Support isolated component build #1204

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

jason-ha
Copy link
Contributor

@jason-ha jason-ha commented Jul 23, 2019

support for feature request #68
Add build option CPPREST_ISOLATE_COMPONENTS to build cpprest sub-components as individual libraries. They are not installed, but are tested individually and can be directly targeted as external CMake projects.
Doing so allows consumption of smaller code and use of options such as CPPREST_FORCE_NARROW_STRINGS that are not supported across all parts of cpprest.

This PR also includes changes from PR 1199
To see changes with that PR as baseline review jason-ha#1.

jason-ha added 20 commits July 19, 2019 11:15
 independent of UNICODE vs MBCS setting
Set CPPREST_FORCE_NARROW_STRINGS=ON to enable.

Simplistic cleanup throughout project is not possible as some Windows APIs require utf16 such as HTTPSPolicyCallbackData in http_client_winhttp.cpp.
HTTP related code is not completely updated so a full package may not be produced, though settings exist to have a clean build. Use:
 -DCPPREST_FORCE_NARROW_STRING=ON -DCPPREST_EXCLUDE_WEBSOCKETS=ON -DCPPREST_HTTP_LISTENER_IMPL=none -DBUILD_SAMPLES=OFF
…omponents like just json support

extractions from asyncrt_utils.h:
  base64_utils.h (to/form base64)
  memory_utils.h (details::make_unique)
  string_utils.cpp (string utils)

asyncrt_utils retains error, date-time, and nounce utils
…braries

fixup includes from not using a common precompiled header
 - separate windows header config to be usable outside of pch
 - missing headers (stl/config dependent)
 - correct install for static lib builds

also add isolation build to Ubuntu Vcpkg and break up Ubuntu Apt
- more explicit includes

+cmake comment tweak
…afx.h's include of everything

The exact dependency was not reviewed when making this fix.
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.

1 participant