Skip to content

Commit

Permalink
release: Merge branch 'bleeding'.
Browse files Browse the repository at this point in the history
This is the v2.3.0 release merge.
  • Loading branch information
Snaipe committed Dec 7, 2016
2 parents bddeda4 + 7d614a1 commit 4e3fbde
Show file tree
Hide file tree
Showing 306 changed files with 17,189 additions and 6,196 deletions.
25 changes: 21 additions & 4 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
[bumpversion]
current_version = 2.2.2
current_version = 2.3.0
commit = False
parse = ^
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+) # minimum 'N.N.N'
(?:
-(?:-)?(?P<prerel>[a-zA-Z]+) # 'rc' = release candidate, 'dev' = dev branch
(?:
(?P<prerelversion>\d+)
)?
)?
serialize =
{major}.{minor}.{patch}-{prerel}{prerelversion}
{major}.{minor}.{patch}-{prerel}
{major}.{minor}.{patch}

[bumpversion:file:CMakeLists.txt]
[bumpversion:part:prerel]
optional_value = release
values =
dev
rc
release

[bumpversion:file:.cmake/Modules/Properties.cmake]

[bumpversion:file:doc/conf.py]

[bumpversion:file:appveyor.yml]

[bumpversion:file:README.md]

95 changes: 88 additions & 7 deletions .cmake/Modules/Capabilities.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,93 @@
# Copyright (C) 2015 Franklin "Snaipe" Mathieu.
# Copyright (C) 2015-2016 Franklin "Snaipe" Mathieu.
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the LICENSE file distributed with Criterion.

include(CheckPrototypeDefinition)
include(CheckLibraryExists)
include(CheckFunctionExists)
include(CheckSymbolExists)
include(CheckIncludeFile)
include(PackageUtils)

check_prototype_definition(
strtok_s
"char *strtok_s(char *strToken, const char *strDelimit, char **context)"
NULL
"string.h"
HAVE_STRTOK_S)
# Set definitions

if (WIN32)
add_definitions (-D_CRT_SECURE_NO_WARNINGS=1)
add_definitions (-DVC_EXTRALEAN)
add_definitions (-DWIN32_LEAN_AND_MEAN)
add_definitions (-D_WIN32_WINNT=0x600)
endif ()

# Check for packages

cr_find_package (Gettext)
cr_find_package (Libintl)

if (I18N AND GETTEXT_FOUND AND LIBINTL_LIB_FOUND)
set (GettextTranslate_ALL 1)
set (GettextTranslate_GMO_BINARY 1)
set (ENABLE_NLS 1)
endif ()

# Check for functions

check_function_exists(strtok_s HAVE_STRTOK_S)
check_function_exists(strtok_r HAVE_STRTOK_R)

check_library_exists (anl getaddrinfo_a "" HAVE_GETADDRINFO_A)

check_function_exists(funopen HAVE_FUNOPEN)
check_function_exists(fopencookie HAVE_FOPENCOOKIE)
check_function_exists(open_memstream HAVE_OPEN_MEMSTREAM)

check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME_RT)
if (HAVE_CLOCK_GETTIME_RT AND NOT HAVE_LIBRT)
set (HAVE_LIBRT 1)
endif ()

if (NOT HAVE_CLOCK_GETTIME_RT)
check_symbol_exists(clock_gettime "time.h" HAVE_CLOCK_GETTIME)
else ()
set (HAVE_CLOCK_GETTIME "${HAVE_CLOCK_GETTIME_RT}" CACHE INTERNAL "Have symbol clock_gettime")
endif ()

check_symbol_exists(CLOCK_MONOTONIC_RAW "time.h" HAVE_CLOCK_MONOTONIC_RAW)

# Check thread API

find_package(Threads)

if (CMAKE_USE_WIN32_THREADS_INIT)
check_include_file("synchapi.h" HAVE_WIN32_SYNCHAPI)
set (HAVE_WIN32_THREADS 1 CACHE INTERNAL "Have win32 threads")
elseif (CMAKE_USE_PTHREADS_INIT)
set (HAVE_PTHREADS 1 CACHE INTERNAL "Have posix threads")
else ()
message (FATAL_ERROR "Could not find a suitable thread library")
endif ()

# Check for C++11

if (LANG_CXX)
enable_language(CXX)
endif ()

if (NOT MSVC AND CMAKE_CXX_COMPILER_WORKS)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)

if(COMPILER_SUPPORTS_CXX11)
set(CXX11_FLAG "-std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CXX11_FLAG "-std=c++0x")
else()
message(FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER} has no C++11 support.")
endif()
endif()

# Valgrind support

if (DEV_BUILD)
set(ENABLE_VALGRIND_ERRORS 1)
endif ()
59 changes: 59 additions & 0 deletions .cmake/Modules/Cram.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Copyright (C) 2015-2016 Franklin "Snaipe" Mathieu.
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the LICENSE file distributed with Criterion.

set(PATH_VAR
"${PROJECT_BINARY_DIR}/Debug"
"${PROJECT_BINARY_DIR}/samples"
"${PROJECT_BINARY_DIR}/samples/Debug"
"${PROJECT_BINARY_DIR}/samples/tests"
"${PROJECT_BINARY_DIR}/samples/tests/Debug"
"${PROJECT_BINARY_DIR}/external/lib"
"${PROJECT_BINARY_DIR}/external/bin"
)

set(NEW_PATH "")
foreach (P ${PATH_VAR})
file (TO_NATIVE_PATH "${P}" P)
list (APPEND NEW_PATH "${P}")
endforeach ()
set (PATH_VAR "${NEW_PATH}")

if (NOT WIN32)
string (REPLACE ";" ":" PATH_VAR "${PATH_VAR}")
set(ENV{PATH} "$ENV{PATH}:${PATH_VAR}")
else ()
set(ENV{PATH} "$ENV{PATH};${PATH_VAR}")
endif ()

set(ENV{LC_ALL} "en_US.utf8")
set(ENV{CRITERION_ALWAYS_SUCCEED} "1")
set(ENV{CRITERION_SHORT_FILENAME} "1")
set(ENV{CRITERION_JOBS} "1")
set(ENV{CRITERION_DISABLE_TIME_MEASUREMENTS} "1")
set(ENV{MSYS2_ARG_CONV_EXCL} "--filter=")

if (WIN32)
if (ENV{MINGW} STREQUAL "")
set (MINGW_HOME "C:/MinGW")
else ()
file (TO_CMAKE_PATH "$ENV{MINGW}" MINGW_HOME)
endif ()
set(CRAM_OPTS "--shell=${CRAM_SHELL}")
endif ()

if ("$ENV{TRAVIS}" STREQUAL "true")
execute_process (COMMAND cram -v ${CRAM_OPTS} "${CRAM_PATH}" TIMEOUT 60 RESULT_VARIABLE RES)
else ()
if ("$ENV{PYTHON_BIN}" STREQUAL "")
set (PYTHON "python")
else ()
set (PYTHON "$ENV{PYTHON_BIN}")
endif ()

execute_process (COMMAND ${PYTHON} -m cram -v ${CRAM_OPTS} "${CRAM_PATH}" TIMEOUT 60 RESULT_VARIABLE RES)
endif ()

if (NOT RES STREQUAL "0")
message (FATAL_ERROR "Cram tests failed")
endif ()
9 changes: 5 additions & 4 deletions .cmake/Modules/DebConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ set(CPACK_DEBIAN_BUILD_DEPENDS
debhelper
cmake
gettext
libpcre3-dev
)

set(CPACK_DEBIAN_PACKAGE_DEPENDS
libpcre3
)
set(CPACK_DEBIAN_PACKAGE_DEPENDS)

set(CPACK_DEBIAN_CMAKE_OPTIONS)
set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/description.txt")
Expand All @@ -36,6 +33,10 @@ set(CPACK_COMPONENT_DEV_DISPLAY_NAME "Criterion library development files")
set(CPACK_COMPONENT_DEV_DESCRIPTION "These are the development files.")
set(CPACK_COMPONENT_DEV_SECTION "devel")

set(CPACK_COMPONENT_DEV_DEPENDS
criterion
)

set(CPACK_COMPONENT_DEV_DOCS "")
set(CPACK_COMPONENT_DEV_INSTALL "/usr/include")

Expand Down
9 changes: 9 additions & 0 deletions .cmake/Modules/DebUpload.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (C) 2015-2016 Franklin "Snaipe" Mathieu.
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the LICENSE file distributed with Criterion.

# Add toolchain patch number for incremental deb builds
set(PROJECT_VERSION "${PROJECT_VERSION}-2")

include (PackageConfig)
include (DebConfig)
32 changes: 32 additions & 0 deletions .cmake/Modules/FindBoxFort.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright (C) 2015-2016 Franklin "Snaipe" Mathieu.
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the LICENSE file distributed with Criterion.

# - Find boxfort
# Find the native boxfort headers and libraries.
#
# BOXFORT_INCLUDE_DIRS - where to find smart_ptr.h, etc.
# BOXFORT_LIBRARIES - List of libraries when using boxfort.
# BOXFORT_FOUND - True if boxfort has been found.

# Look for the header file.
FIND_PATH(BOXFORT_INCLUDE_DIR boxfort.h)

# Look for the library.
FIND_LIBRARY(BOXFORT_LIBRARY NAMES boxfort)

# Handle the QUIETLY and REQUIRED arguments and set BOXFORT_FOUND to TRUE if all listed variables are TRUE.
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BOXFORT DEFAULT_MSG BOXFORT_LIBRARY BOXFORT_INCLUDE_DIR)

# Copy the results to the output variables.
IF(BOXFORT_FOUND)
SET(BOXFORT_LIBRARIES ${BOXFORT_LIBRARY})
SET(BOXFORT_INCLUDE_DIRS ${BOXFORT_INCLUDE_DIR})
ELSE(BOXFORT_FOUND)
SET(BOXFORT_LIBRARIES)
SET(BOXFORT_INCLUDE_DIRS)
ENDIF(BOXFORT_FOUND)

MARK_AS_ADVANCED(BOXFORT_INCLUDE_DIRS BOXFORT_LIBRARIES)

2 changes: 1 addition & 1 deletion .cmake/Modules/FindDyncall.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2015 Franklin "Snaipe" Mathieu.
# Copyright (C) 2015-2016 Franklin "Snaipe" Mathieu.
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the LICENSE file distributed with Criterion.

Expand Down
2 changes: 1 addition & 1 deletion .cmake/Modules/FindLibcsptr.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2015 Franklin "Snaipe" Mathieu.
# Copyright (C) 2015-2016 Franklin "Snaipe" Mathieu.
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the LICENSE file distributed with Criterion.

Expand Down
31 changes: 31 additions & 0 deletions .cmake/Modules/FindNanomsg.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (C) 2015-2016 Franklin "Snaipe" Mathieu.
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the LICENSE file distributed with Criterion.

# - Find nanomsg
# Find the native nanomsg headers and libraries.
#
# NANOMSG_INCLUDE_DIRS - where to find smart_ptr.h, etc.
# NANOMSG_LIBRARIES - List of libraries when using nanomsg.
# NANOMSG_FOUND - True if nanomsg has been found.

# Look for the header file.
FIND_PATH(NANOMSG_INCLUDE_DIR nanomsg/nn.h PATH_SUFFIXES nanomsg)

# Look for the library.
FIND_LIBRARY(NANOMSG_LIBRARY NAMES nanomsg)

# Handle the QUIETLY and REQUIRED arguments and set NANOMSG_FOUND to TRUE if all listed variables are TRUE.
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NANOMSG DEFAULT_MSG NANOMSG_LIBRARY NANOMSG_INCLUDE_DIR)

# Copy the results to the output variables.
IF(NANOMSG_FOUND)
SET(NANOMSG_LIBRARIES ${NANOMSG_LIBRARY})
SET(NANOMSG_INCLUDE_DIRS ${NANOMSG_INCLUDE_DIR})
ELSE(NANOMSG_FOUND)
SET(NANOMSG_LIBRARIES)
SET(NANOMSG_INCLUDE_DIRS)
ENDIF(NANOMSG_FOUND)

MARK_AS_ADVANCED(NANOMSG_INCLUDE_DIRS NANOMSG_LIBRARIES)
37 changes: 0 additions & 37 deletions .cmake/Modules/FindPCRE.cmake

This file was deleted.

16 changes: 14 additions & 2 deletions .cmake/Modules/GettextTranslate.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,27 @@ macro(GettextTranslate)
COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE} --lang=${lang}
${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
-o ${PO_FILE_NAME}.new
COMMAND mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}
COMMAND if diff ${PO_FILE_NAME} ${PO_FILE_NAME}.new
--unchanged-line-format='' --old-line-format=''
| grep -v 'POT-Creation-Date' >/dev/null\; then
mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}\;
else
rm ${PO_FILE_NAME}.new\;
fi
DEPENDS ${TEMPLATE_FILE_ABS}
)
else ()
add_custom_target(${PO_TARGET}
COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE}
${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
-o ${PO_FILE_NAME}.new
COMMAND mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}
COMMAND if diff ${PO_FILE_NAME} ${PO_FILE_NAME}.new
--unchanged-line-format='' --old-line-format=''
| grep -v 'POT-Creation-Date' >/dev/null\; then
mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}\;
else
rm ${PO_FILE_NAME}.new\;
fi
DEPENDS ${TEMPLATE_FILE_ABS}
)
endif ()
Expand Down
13 changes: 13 additions & 0 deletions .cmake/Modules/Options.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (C) 2015-2016 Franklin "Snaipe" Mathieu.
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the LICENSE file distributed with Criterion.

option(LANG_CXX "Turn on C++ support" ON)
option(THEORIES "Activate the support for theories" ON)
option(MINGW_DEFINE_OFF_T "Define off_t and off64_t ourselves before including io.h" OFF)
option(COVERALLS "Turn on coveralls support" OFF)
option(COVERALLS_UPLOAD "Upload the generated coveralls json" ON)
option(DEV_BUILD "Compile in developer mode" OFF)
option(CTESTS "Turn on the samples and test" ${DEV_BUILD})
option(I18N "Turn on internationalization" ON)
option(UPLOAD_DEB "Upload package to launchpad" OFF)
Loading

0 comments on commit 4e3fbde

Please sign in to comment.