Skip to content

Commit 51cbda5

Browse files
committed
Merge branch 'develop' for release 1.2.2
2 parents 70c4420 + e38d6fe commit 51cbda5

File tree

122 files changed

+9314
-4494
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+9314
-4494
lines changed

.travis.yml

+26-37
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,38 @@
11
language: cpp
2+
dist: trusty
3+
sudo: false
4+
group: beta
5+
6+
addons:
7+
apt:
8+
sources:
9+
- 'ubuntu-toolchain-r-test'
10+
- 'boost-latest'
11+
packages:
12+
- 'g++-multilib'
13+
- 'libboost-serialization-dev'
14+
# - 'libboost-test-dev'
215

316
compiler:
4-
# TODO: Clang is currently giving issues
5-
#- clang
617
- gcc
718

8-
before_install:
9-
# Always install g++4.8.1
10-
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
11-
12-
# Install recent version of Boost
13-
- sudo add-apt-repository -y ppa:boost-latest/ppa
19+
matrix:
20+
include:
21+
- os: linux
22+
compiler: clang
23+
env: CMAKE_OPTIONS="-DSKIP_PORTABILITY_TEST=ON"
1424

15-
# clang 3.3
16-
- if [ "$CXX" == "clang++" ]; then sudo add-apt-repository -y ppa:h-rayflood/llvm; fi
25+
# TODO: Add an entry for valgrind
26+
# after_script: make valgrind
1727

18-
- sudo apt-get update -qq
19-
20-
install:
21-
- sudo apt-get install cmake
22-
- sudo apt-get install libboost1.54-all-dev
23-
24-
# Always install valgrind
25-
- sudo apt-get install valgrind
26-
27-
# Always install g++4.8.1
28-
- sudo apt-get install -qq g++-4.8
29-
- sudo apt-get install -qq g++-4.8-multilib
30-
- if [ "$CXX" = "g++" ]; then export CMAKE_CXX_COMPILER="g++-4.8"; fi
31-
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; fi
32-
33-
# clang 3.3
34-
- if [ "$CXX" == "clang++" ]; then sudo apt-get install --allow-unauthenticated -qq clang-3.3; fi
35-
- if [ "$CXX" == "clang++" ]; then export CMAKE_CXX_COMPILER="clang++-3.3"; fi
36-
- if [ "$CXX" == "clang++" ]; then export CXX="clang++-3.3"; fi
28+
- os: osx
29+
osx_image: xcode8
30+
compiler: clang
3731

3832
script:
39-
- mkdir build
40-
- cd build
41-
- cmake ..
42-
- make
43-
44-
after_script:
45-
- ctest .
46-
# - make valgrind
33+
- mkdir build && cd build
34+
- cmake ${CMAKE_OPTIONS} .. && make -j4
35+
- ctest . --output-on-failure
4736

4837
branches:
4938
only:

CMakeLists.txt

+15-24
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required (VERSION 2.6.2)
22
project (cereal)
33

4-
option(SKIP_PORTABILITY_TEST "Skip portability tests" OFF)
4+
option(SKIP_PORTABILITY_TEST "Skip portability (32 bit) tests" OFF)
55
if(NOT CMAKE_VERSION VERSION_LESS 3.0) # installing cereal requires INTERFACE lib
66
option(JUST_INSTALL_CEREAL "Don't do anything besides installing the library" OFF)
77
endif()
@@ -14,8 +14,14 @@ else()
1414
set(CEREAL_THREAD_LIBS "")
1515
endif()
1616

17-
if(NOT MSVC)
18-
set(CMAKE_CXX_FLAGS "-Wall -Werror -g -Wextra -Wshadow -pedantic ${CMAKE_CXX_FLAGS}")
17+
if(MSVC)
18+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj /W3 /WX")
19+
else()
20+
set(CMAKE_CXX_FLAGS "-Wall -g -Wextra -Wshadow -pedantic -Wold-style-cast ${CMAKE_CXX_FLAGS}")
21+
option(WITH_WERROR "Compile with '-Werror' C++ compiler flag" ON)
22+
if(WITH_WERROR)
23+
set(CMAKE_CXX_FLAGS "-Werror ${CMAKE_CXX_FLAGS}")
24+
endif(WITH_WERROR)
1925
if(CMAKE_VERSION VERSION_LESS 3.1)
2026
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
2127
else()
@@ -45,31 +51,16 @@ endif()
4551

4652
include_directories(./include)
4753

48-
find_package(Boost COMPONENTS serialization unit_test_framework)
54+
# Boost serialization for performance sandbox
55+
find_package(Boost COMPONENTS serialization)
4956

5057
if(Boost_FOUND)
5158
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
52-
enable_testing()
53-
add_subdirectory(unittests)
5459
endif(Boost_FOUND)
60+
61+
enable_testing()
62+
add_subdirectory(unittests)
5563

5664
add_subdirectory(sandbox)
5765

58-
find_package(Doxygen)
59-
if(DOXYGEN_FOUND)
60-
61-
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen.in" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg" @ONLY)
62-
add_custom_target(doc
63-
COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg"
64-
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
65-
COMMENT "Generating API documentation with Doxygen" VERBATIM
66-
)
67-
68-
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/updatedoc.in" "${CMAKE_CURRENT_BINARY_DIR}/updatedoc.sh" @ONLY)
69-
add_custom_target(update-doc
70-
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/updatedoc.sh"
71-
DEPENDS doc
72-
COMMENT "Copying documentation to gh-pages branch" VERBATIM
73-
)
74-
75-
endif(DOXYGEN_FOUND)
66+
add_subdirectory(doc)

appveyor.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# can use variables like {build} and {branch}
2+
version: 1.2.{build}
3+
pull_requests:
4+
do_not_increment_build_number: true
5+
6+
branches:
7+
only:
8+
- develop
9+
10+
configuration:
11+
- Debug
12+
- Release
13+
14+
environment:
15+
matrix:
16+
- VS_VERSION_MAJOR: 12
17+
- VS_VERSION_MAJOR: 14
18+
BOOST_ROOT: C:\Libraries\boost_1_59_0
19+
20+
platform:
21+
- Win32
22+
- x64
23+
24+
before_build: "scripts\\appveyor.bat"
25+
26+
build:
27+
parallel: true
28+
project: build/cereal.sln
29+
verbosity: minimal
30+
31+
test_script: "scripts\\appveyor.bat test"
32+
33+
artifacts:
34+
- path: build\Testing
35+
- path: out

doc/CMakeLists.txt

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
find_package(Doxygen)
2+
if(DOXYGEN_FOUND)
3+
4+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doxygen.in" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg" @ONLY)
5+
add_custom_target(doc
6+
COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg"
7+
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.."
8+
COMMENT "Generating API documentation with Doxygen" VERBATIM
9+
)
10+
11+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../scripts/updatedoc.in" "${CMAKE_CURRENT_BINARY_DIR}/updatedoc.sh" @ONLY)
12+
add_custom_target(update-doc
13+
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/updatedoc.sh"
14+
DEPENDS doc
15+
COMMENT "Copying documentation to gh-pages branch" VERBATIM
16+
)
17+
18+
endif(DOXYGEN_FOUND)

doc/doxygen.in

+8-8
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ PROJECT_LOGO =
5252
# If a relative path is entered, it will be relative to the location
5353
# where doxygen was started. If left blank the current directory will be used.
5454

55-
OUTPUT_DIRECTORY = doc
55+
OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/
5656

5757
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
5858
# 4096 sub-directories (in 2 levels) under the output directory of each output
@@ -595,7 +595,7 @@ FILE_VERSION_FILTER =
595595
# You can optionally specify a file name after the option, if omitted
596596
# DoxygenLayout.xml will be used as the name of the layout file.
597597

598-
LAYOUT_FILE = "@CMAKE_CURRENT_SOURCE_DIR@/doc/DoxygenLayout.xml"
598+
LAYOUT_FILE = "@CMAKE_CURRENT_SOURCE_DIR@/DoxygenLayout.xml"
599599

600600
# The CITE_BIB_FILES tag can be used to specify one or more bib files
601601
# containing the references data. This must be a list of .bib files. The
@@ -668,7 +668,7 @@ WARN_LOGFILE =
668668
# directories like "/usr/src/myproject". Separate the files or directories
669669
# with spaces.
670670

671-
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/include @CMAKE_CURRENT_SOURCE_DIR@/doc #include doc
671+
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/../include @CMAKE_CURRENT_SOURCE_DIR@/
672672

673673
# This tag can be used to specify the character encoding of the source files
674674
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@@ -701,7 +701,7 @@ RECURSIVE = YES
701701
# Note that relative paths are relative to the directory from which doxygen is
702702
# run.
703703

704-
EXCLUDE = external
704+
EXCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/../external
705705

706706
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
707707
# directories that are symbolic links (a Unix file system feature) are excluded
@@ -911,7 +911,7 @@ HTML_HEADER =
911911
# each generated HTML page. If it is left blank doxygen will generate a
912912
# standard footer.
913913

914-
HTML_FOOTER ="@CMAKE_CURRENT_SOURCE_DIR@/doc/footer.html"
914+
HTML_FOOTER ="@CMAKE_CURRENT_SOURCE_DIR@/footer.html"
915915

916916
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
917917
# style sheet that is used by each HTML page. It can be used to
@@ -1476,13 +1476,13 @@ XML_OUTPUT = xml
14761476
# which can be used by a validating XML parser to check the
14771477
# syntax of the XML files.
14781478

1479-
XML_SCHEMA =
1479+
# XML_SCHEMA =
14801480

14811481
# The XML_DTD tag can be used to specify an XML DTD,
14821482
# which can be used by a validating XML parser to check the
14831483
# syntax of the XML files.
14841484

1485-
XML_DTD =
1485+
# XML_DTD =
14861486

14871487
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
14881488
# dump the program listings (including syntax highlighting
@@ -1626,7 +1626,7 @@ TAGFILES =
16261626
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
16271627
# a tag file that is based on the input files it reads.
16281628

1629-
GENERATE_TAGFILE =
1629+
GENERATE_TAGFILE = cereal.doxytags
16301630

16311631
# If the ALLEXTERNALS tag is set to YES all external classes will be listed
16321632
# in the class index. If set to NO only the inherited external classes

include/cereal/access.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
#include <cstdint>
3535
#include <functional>
3636

37-
#include <cereal/macros.hpp>
38-
#include <cereal/details/helpers.hpp>
37+
#include "cereal/macros.hpp"
38+
#include "cereal/details/helpers.hpp"
3939

4040
namespace cereal
4141
{

include/cereal/archives/adapters.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#ifndef CEREAL_ARCHIVES_ADAPTERS_HPP_
3131
#define CEREAL_ARCHIVES_ADAPTERS_HPP_
3232

33-
#include <cereal/details/helpers.hpp>
33+
#include "cereal/details/helpers.hpp"
3434
#include <utility>
3535

3636
namespace cereal

include/cereal/archives/binary.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#ifndef CEREAL_ARCHIVES_BINARY_HPP_
3030
#define CEREAL_ARCHIVES_BINARY_HPP_
3131

32-
#include <cereal/cereal.hpp>
32+
#include "cereal/cereal.hpp"
3333
#include <sstream>
3434

3535
namespace cereal

0 commit comments

Comments
 (0)