Skip to content

Commit

Permalink
Merge branch 'develop' for release 1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AzothAmmo committed Feb 12, 2017
2 parents 70c4420 + e38d6fe commit 51cbda5
Show file tree
Hide file tree
Showing 122 changed files with 9,314 additions and 4,494 deletions.
63 changes: 26 additions & 37 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,38 @@
language: cpp
dist: trusty
sudo: false
group: beta

addons:
apt:
sources:
- 'ubuntu-toolchain-r-test'
- 'boost-latest'
packages:
- 'g++-multilib'
- 'libboost-serialization-dev'
# - 'libboost-test-dev'

compiler:
# TODO: Clang is currently giving issues
#- clang
- gcc

before_install:
# Always install g++4.8.1
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test

# Install recent version of Boost
- sudo add-apt-repository -y ppa:boost-latest/ppa
matrix:
include:
- os: linux
compiler: clang
env: CMAKE_OPTIONS="-DSKIP_PORTABILITY_TEST=ON"

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

- sudo apt-get update -qq

install:
- sudo apt-get install cmake
- sudo apt-get install libboost1.54-all-dev

# Always install valgrind
- sudo apt-get install valgrind

# Always install g++4.8.1
- sudo apt-get install -qq g++-4.8
- sudo apt-get install -qq g++-4.8-multilib
- if [ "$CXX" = "g++" ]; then export CMAKE_CXX_COMPILER="g++-4.8"; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; fi

# clang 3.3
- if [ "$CXX" == "clang++" ]; then sudo apt-get install --allow-unauthenticated -qq clang-3.3; fi
- if [ "$CXX" == "clang++" ]; then export CMAKE_CXX_COMPILER="clang++-3.3"; fi
- if [ "$CXX" == "clang++" ]; then export CXX="clang++-3.3"; fi
- os: osx
osx_image: xcode8
compiler: clang

script:
- mkdir build
- cd build
- cmake ..
- make

after_script:
- ctest .
# - make valgrind
- mkdir build && cd build
- cmake ${CMAKE_OPTIONS} .. && make -j4
- ctest . --output-on-failure

branches:
only:
Expand Down
39 changes: 15 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required (VERSION 2.6.2)
project (cereal)

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

if(NOT MSVC)
set(CMAKE_CXX_FLAGS "-Wall -Werror -g -Wextra -Wshadow -pedantic ${CMAKE_CXX_FLAGS}")
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj /W3 /WX")
else()
set(CMAKE_CXX_FLAGS "-Wall -g -Wextra -Wshadow -pedantic -Wold-style-cast ${CMAKE_CXX_FLAGS}")
option(WITH_WERROR "Compile with '-Werror' C++ compiler flag" ON)
if(WITH_WERROR)
set(CMAKE_CXX_FLAGS "-Werror ${CMAKE_CXX_FLAGS}")
endif(WITH_WERROR)
if(CMAKE_VERSION VERSION_LESS 3.1)
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
else()
Expand Down Expand Up @@ -45,31 +51,16 @@ endif()

include_directories(./include)

find_package(Boost COMPONENTS serialization unit_test_framework)
# Boost serialization for performance sandbox
find_package(Boost COMPONENTS serialization)

if(Boost_FOUND)
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
enable_testing()
add_subdirectory(unittests)
endif(Boost_FOUND)

enable_testing()
add_subdirectory(unittests)

add_subdirectory(sandbox)

find_package(Doxygen)
if(DOXYGEN_FOUND)

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen.in" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg" @ONLY)
add_custom_target(doc
COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMENT "Generating API documentation with Doxygen" VERBATIM
)

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/updatedoc.in" "${CMAKE_CURRENT_BINARY_DIR}/updatedoc.sh" @ONLY)
add_custom_target(update-doc
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/updatedoc.sh"
DEPENDS doc
COMMENT "Copying documentation to gh-pages branch" VERBATIM
)

endif(DOXYGEN_FOUND)
add_subdirectory(doc)
35 changes: 35 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# can use variables like {build} and {branch}
version: 1.2.{build}
pull_requests:
do_not_increment_build_number: true

branches:
only:
- develop

configuration:
- Debug
- Release

environment:
matrix:
- VS_VERSION_MAJOR: 12
- VS_VERSION_MAJOR: 14
BOOST_ROOT: C:\Libraries\boost_1_59_0

platform:
- Win32
- x64

before_build: "scripts\\appveyor.bat"

build:
parallel: true
project: build/cereal.sln
verbosity: minimal

test_script: "scripts\\appveyor.bat test"

artifacts:
- path: build\Testing
- path: out
18 changes: 18 additions & 0 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
find_package(Doxygen)
if(DOXYGEN_FOUND)

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doxygen.in" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg" @ONLY)
add_custom_target(doc
COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.."
COMMENT "Generating API documentation with Doxygen" VERBATIM
)

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../scripts/updatedoc.in" "${CMAKE_CURRENT_BINARY_DIR}/updatedoc.sh" @ONLY)
add_custom_target(update-doc
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/updatedoc.sh"
DEPENDS doc
COMMENT "Copying documentation to gh-pages branch" VERBATIM
)

endif(DOXYGEN_FOUND)
16 changes: 8 additions & 8 deletions doc/doxygen.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ PROJECT_LOGO =
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.

OUTPUT_DIRECTORY = doc
OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/

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

LAYOUT_FILE = "@CMAKE_CURRENT_SOURCE_DIR@/doc/DoxygenLayout.xml"
LAYOUT_FILE = "@CMAKE_CURRENT_SOURCE_DIR@/DoxygenLayout.xml"

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

INPUT = @CMAKE_CURRENT_SOURCE_DIR@/include @CMAKE_CURRENT_SOURCE_DIR@/doc #include doc
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/../include @CMAKE_CURRENT_SOURCE_DIR@/

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

EXCLUDE = external
EXCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/../external

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

HTML_FOOTER ="@CMAKE_CURRENT_SOURCE_DIR@/doc/footer.html"
HTML_FOOTER ="@CMAKE_CURRENT_SOURCE_DIR@/footer.html"

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

XML_SCHEMA =
# XML_SCHEMA =

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

XML_DTD =
# XML_DTD =

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

GENERATE_TAGFILE =
GENERATE_TAGFILE = cereal.doxytags

# If the ALLEXTERNALS tag is set to YES all external classes will be listed
# in the class index. If set to NO only the inherited external classes
Expand Down
4 changes: 2 additions & 2 deletions include/cereal/access.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#include <cstdint>
#include <functional>

#include <cereal/macros.hpp>
#include <cereal/details/helpers.hpp>
#include "cereal/macros.hpp"
#include "cereal/details/helpers.hpp"

namespace cereal
{
Expand Down
2 changes: 1 addition & 1 deletion include/cereal/archives/adapters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#ifndef CEREAL_ARCHIVES_ADAPTERS_HPP_
#define CEREAL_ARCHIVES_ADAPTERS_HPP_

#include <cereal/details/helpers.hpp>
#include "cereal/details/helpers.hpp"
#include <utility>

namespace cereal
Expand Down
2 changes: 1 addition & 1 deletion include/cereal/archives/binary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#ifndef CEREAL_ARCHIVES_BINARY_HPP_
#define CEREAL_ARCHIVES_BINARY_HPP_

#include <cereal/cereal.hpp>
#include "cereal/cereal.hpp"
#include <sstream>

namespace cereal
Expand Down
Loading

0 comments on commit 51cbda5

Please sign in to comment.