Skip to content

Commit

Permalink
Add 'curlpp/' from commit '5fa2ea6982e0819ec689bb9e2bb5e65200aefe9a'
Browse files Browse the repository at this point in the history
git-subtree-dir: curlpp
git-subtree-mainline: 2423dc1
git-subtree-split: 5fa2ea6
  • Loading branch information
metiscus committed Feb 8, 2018
2 parents 2423dc1 + 5fa2ea6 commit 1306c4a
Show file tree
Hide file tree
Showing 93 changed files with 11,469 additions and 0 deletions.
47 changes: 47 additions & 0 deletions curlpp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
*.Po
*.o
*.a
*.la
*.lo
*.Plo
*.dylib
*.lai
Makefile
*~

build/
m4/
CMakeFiles/

examples/example01
examples/example02
examples/example03
examples/example04
examples/example05
examples/example06
examples/example07
examples/example08
examples/example09
examples/example10
examples/example11
examples/example12
examples/example13
examples/example14
examples/example15
examples/example16
examples/example17
examples/example18
examples/example19
examples/example20
examples/example21
examples/example22
examples/example23
examples/example24
examples/example25

*.exe
CMakeCache.txt

conanbuildinfo.cmake
conaninfo.txt
bin/
23 changes: 23 additions & 0 deletions curlpp/.hgignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
(^|/)\.svn($|/)
(^|/)\.hg($|/)
(^|/)\.hgtags($|/)
^curlpp-svn.log$
^tailor.state$
^tailor.state.old$
^tailor.state.journal$
.*\.o
.*\.lo
.*\.a
.*\.la
.*\.Plo
.*\.Po
#.*#$
Makefile$
Makefile.in$
include/curlpp/config.h.in
include/curlpp/config.h
^examples/example[0-9]*$
aclocal.m4$
.dylib$
curlpp.pc$
curlpp.spec$
54 changes: 54 additions & 0 deletions curlpp/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
language: cpp

# precise gcc doesn't have c++11 support

matrix:
include:
- os: linux
dist: trusty
compiler: clang
env: NAME="trusty"
- os: linux
dist: trusty
compiler: gcc
env: NAME="trusty"
- os: linux
dist: precise
compiler: clang
env: NAME="precise"
- os: osx
osx_image: xcode7.2
- os: osx
compiler: clang
- os: osx
compiler: gcc

addons:
apt:
packages:
- libcurl4-openssl-dev

before_script:
- mkdir build && cd build
- cmake ../

script:
- make && sudo make install
- cd ../examples && mkdir build && cd build
- cmake ../
- make


install:
- echo install-----------------------------------------------------------------
# Download and install libcurl
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then
brew update;
brew install curl;
fi
# install cmake 3.2 for precise
- if [[ $NAME == "precise" ]]; then
sudo add-apt-repository ppa:george-edison55/precise-backports --yes;
sudo apt-get update;
sudo apt-get install cmake-data cmake;
fi
115 changes: 115 additions & 0 deletions curlpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
project(curlpp)


# In response to CMake 3.0 generating warnings regarding policy CMP0042,
# the OSX RPATH settings have been updated per recommendations found
# in the CMake Wiki:
# http://www.cmake.org/Wiki/CMake_RPATH_handling#Mac_OS_X_and_the_RPATH
if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH
set(CMAKE_MACOSX_RPATH TRUE)
endif()

# for unix platform, define install directories.
include(GNUInstallDirs)

if(WIN32)
# cmake 3.4 is required for CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
cmake_minimum_required(VERSION 3.4)

# c++ 11 support from cmake 3.4 or newer
set(CMAKE_CXX_STANDARD 11) # C++11...
set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required...
set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
else()
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 3.1)
cmake_minimum_required(VERSION 2.8)
# c++11 support for cmake 2.8.12 - 3.0.x
#
# for non-windows platform we try to keep cmake 2.8 support
# since entreprise distribution tends to have 2.8 version.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else()
# c++ 11 support from cmake 3.1 or newer
set(CMAKE_CXX_STANDARD 11) # C++11...
set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required...
set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11
endif()
endif()


# Conan.io integration
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
endif()

# extra (pkg-config-related files)
add_subdirectory(extras)

#########################################################################################
# Look for dependencies

# Documented at https://cmake.org/cmake/help/v3.0/module/FindCURL.html?highlight=curlpp
# Seems simple.

message(STATUS "Looking for CURL")
include(FindCURL)
find_package(CURL REQUIRED)

if(CURL_FOUND)
message(STATUS "Found CURL version: ${CURL_VERSION_STRING}")
message(STATUS "Using CURL include dir(s): ${CURL_INCLUDE_DIRS}")
message(STATUS "Using CURL lib(s): ${CURL_LIBRARIES}")
else()
message(FATAL_ERROR "Could not find CURL")
endif()

# All following targets should search these directories for headers
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/include
${CURL_INCLUDE_DIRS}
)

#########################################################################################
# Define Targets

# If building on windows, install path will be in build/winbuild
if(CMAKE_SYSTEM MATCHES "Windows")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "winbuild")
endif()
endif()

file(GLOB_RECURSE HeaderFileList "${CMAKE_CURRENT_SOURCE_DIR}/include/*")
file(GLOB_RECURSE SourceFileList "${CMAKE_CURRENT_SOURCE_DIR}/src/*")
add_library(${PROJECT_NAME} SHARED ${HeaderFileList} ${SourceFileList})
target_link_libraries(${PROJECT_NAME} ${CURL_LIBRARIES} ${CONAN_LIBS})
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 1 VERSION 1.0.0)

add_library(${PROJECT_NAME}_static STATIC ${HeaderFileList} ${SourceFileList})

# Make sure that on unix-platforms shared and static libraries have
# the same root name, but different suffixes.
#
# (solution taken from https://cmake.org/Wiki/CMake_FAQ#How_do_I_make_my_shared_and_static_libraries_have_the_same_root_name.2C_but_different_suffixes.3F)
#
# Making shared and static libraries have the same root name, but different suffixes
SET_TARGET_PROPERTIES(${PROJECT_NAME}_static PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
# Now the library target "curlpp_static" will be named "curlpp.lib" with MS tools.
# This conflicts with the "curlpp.lib" import library corresponding to "curlpp.dll",
# so we add a "lib" prefix (which is default on other platforms anyway):
SET_TARGET_PROPERTIES(${PROJECT_NAME}_static PROPERTIES PREFIX "lib")
target_link_libraries(${PROJECT_NAME}_static ${CURL_LIBRARIES} ${CONAN_LIBS})

# install headers
install(DIRECTORY include/utilspp/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/utilspp")
install(DIRECTORY include/curlpp/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/curlpp")

install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_static
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})

1 change: 1 addition & 0 deletions curlpp/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
www.curlpp.org
34 changes: 34 additions & 0 deletions curlpp/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Travis CI](https://img.shields.io/travis/jpbarrette/curlpp.svg)](https://travis-ci.org/jpbarrette/curlpp) [![AppVeyor CI](https://img.shields.io/appveyor/ci/jpbarrette/curlpp.svg)](https://ci.appveyor.com/project/jpbarrette/curlpp)

# Description

[cURLpp](http://www.curlpp.org) is a C++ wrapper for libcURL. libcURL is described as:

<cite>
a free and easy-to-use client-side URL transfer library, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos, HTTP form based upload, proxies, cookies, user+password authentication, file transfer resume, http proxy tunneling and more!
</cite>

<cite>
libcurl is highly portable, it builds and works identically on numerous platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX, IRIX, AIX, Tru64, Linux, Windows, Amiga, OS/2, BeOs, Mac OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS and more...
</cite>

<cite>
libcurl is free, thread-safe, IPv6 compatible, feature rich, well supported and fast.
</cite>

First, I need to quote Daniel Stenberg, the maintener of libcURL:
<cite>You can use libcURL instantly from within your C++ programs. You don't need cURLpp for that, cURLpp just adds an OO'ified layer that libcURL doesn't normally provide.</cite> It means that you need to be sure that you need, or want, cURLpp features. If not, I suggest to use directly the libcURL library. So, what are thoses features that cURLpp offers?

* You can query handles for option values (version 0.5.x and newer only).
* It uses the C++ standard library structures instead of home made ones.
* It is exception safe.
* It is type safe.

# Download

Latest version is available on GitHub [here](https://github.com/jpbarrette/curlpp/releases/latest).

# Documentation

The programming guide is [here](https://github.com/jpbarrette/curlpp/tree/master/doc/guide.pdf). This guide is greatly inspired by the libcURL guide, that I strongly suggest to read. There's also some examples in the "[examples](http://github.com/jpbarrette/curlpp/tree/master/examples)/" source directory of cURLpp.

1 change: 1 addition & 0 deletions curlpp/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-minimal
45 changes: 45 additions & 0 deletions curlpp/appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: '0.7.4.{build}'

environment:
matrix:
- PRJ_GEN: "Visual Studio 11 2012 Win64"
BDIR: msvc2012
PRJ_CFG: Release
PRJ_GEN_VERSION: 11
- PRJ_GEN: "Visual Studio 12 2013 Win64"
BDIR: msvc2013
PRJ_CFG: Release
PRJ_GEN_VERSION: 12
- PRJ_GEN: "Visual Studio 14 2015 Win64"
BDIR: msvc2015
PRJ_CFG: Release
PRJ_GEN_VERSION: 14
- PRJ_GEN: "Visual Studio 11 2012 Win64"
BDIR: msvc2012
PRJ_CFG: Debug
PRJ_GEN_VERSION: 11
- PRJ_GEN: "Visual Studio 12 2013 Win64"
BDIR: msvc2013
PRJ_CFG: Debug
PRJ_GEN_VERSION: 12
- PRJ_GEN: "Visual Studio 14 2015 Win64"
BDIR: msvc2015
PRJ_CFG: Debug
PRJ_GEN_VERSION: 14

install:
- cmd: echo "Downloading conan..."
- cmd: set PATH=%PATH%;%PYTHON%/Scripts/
- cmd: pip.exe install conan
- cmd: conan user # Create the conan data directory
- cmd: conan --version

build_script:
- mkdir build.%BDIR%
- IF %PRJ_GEN_VERSION% == 11 call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\vsvars32.bat"
- conan install --build=missing -s compiler="Visual Studio" -s compiler.version=%PRJ_GEN_VERSION% -s build_type=%PRJ_CFG% .
- cd build.%BDIR%
- cmake .. -G"%PRJ_GEN%"
- cmake --build . --config %PRJ_CFG% --clean-first


5 changes: 5 additions & 0 deletions curlpp/conanfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[requires]
libcurl/7.50.3@lasote/stable

[generators]
cmake
13 changes: 13 additions & 0 deletions curlpp/doc/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Eric Lavigne (erlavigne at wanadoo.fr)
Jean-Philippe Barrette-LaPierre (jpb at rrette.com)

Thanks to some patch providers:
Thomas Boutry
Jonathan Wakely
Peter Krumins
Ben Golding
Glenn <crass_no_spam at users dot berlios dot de>
Hoef Jan
Gisle Vanem
Paul Lacy
Nicolas Le Goff
21 changes: 21 additions & 0 deletions curlpp/doc/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files
(cURLpp), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Loading

0 comments on commit 1306c4a

Please sign in to comment.