Skip to content

Commit

Permalink
Merge branch 'release-3.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdiclemente committed Jul 31, 2020
2 parents b4d3d40 + 292f91e commit 7ed51be
Show file tree
Hide file tree
Showing 151 changed files with 2,942 additions and 2,810 deletions.
22 changes: 14 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,28 @@ matrix:
# Test all build configuration with the latest available GCC
- os: linux
addons: &gcc8-valgrind { apt: { packages: ["valgrind", "gcc-8", "g++-8"], sources: ["ubuntu-toolchain-r-test"] } }
env: MY_CC=gcc-8 MY_CXX=g++-8 WITH_COVERAGE=1
env: MY_CC=gcc-8 MY_CXX=g++-8 WITH_COVERAGE=1 MY_COVERAGE=gcov-8
before_install:
# Install a newer version of valgrind
- ./install_valgrind.sh

- os: linux
addons: *gcc8-valgrind
env: MY_CC=gcc-8 MY_CXX=g++-8 BUILD_CONFIGURATION=1 WITH_COVERAGE=1
env: MY_CC=gcc-8 MY_CXX=g++-8 BUILD_CONFIGURATION=1 WITH_COVERAGE=1 MY_COVERAGE=gcov-8
before_install:
# Install a newer version of valgrind
- ./install_valgrind.sh

- os: linux
addons: *gcc8-valgrind
env: MY_CC=gcc-8 MY_CXX=g++-8 BUILD_CONFIGURATION=2 WITH_COVERAGE=1
env: MY_CC=gcc-8 MY_CXX=g++-8 BUILD_CONFIGURATION=2 WITH_COVERAGE=1 MY_COVERAGE=gcov-8
before_install:
# Install a newer version of valgrind
- ./install_valgrind.sh

- os: linux
addons: *gcc8-valgrind
env: MY_CC=gcc-8 MY_CXX=g++-8 BUILD_CONFIGURATION=3 WITH_COVERAGE=1
env: MY_CC=gcc-8 MY_CXX=g++-8 BUILD_CONFIGURATION=3 WITH_COVERAGE=1 MY_COVERAGE=gcov-8
before_install:
# Install a newer version of valgrind
- ./install_valgrind.sh
Expand All @@ -89,22 +89,28 @@ matrix:
- os: osx
osx_image: xcode10.3
compiler: clang
env: BUILD_CONFIGURATION=0 MACOSX_DEPLOYMENT_TARGET=10.14 WITH_COVERAGE=1
env: BUILD_CONFIGURATION=0 MACOSX_DEPLOYMENT_TARGET=10.14

- os: osx
osx_image: xcode10.3
compiler: clang
env: BUILD_CONFIGURATION=1 MACOSX_DEPLOYMENT_TARGET=10.14

- os: osx
osx_image: xcode10.3
compiler: clang
env: BUILD_CONFIGURATION=1 MACOSX_DEPLOYMENT_TARGET=10.14 WITH_COVERAGE=1
env: BUILD_CONFIGURATION=2 MACOSX_DEPLOYMENT_TARGET=10.14

- os: osx
osx_image: xcode10.3
compiler: clang
env: BUILD_CONFIGURATION=2 MACOSX_DEPLOYMENT_TARGET=10.14 WITH_COVERAGE=1
env: BUILD_CONFIGURATION=3 MACOSX_DEPLOYMENT_TARGET=10.14

# To generate codecov reports
- os: osx
osx_image: xcode10.3
compiler: clang
env: BUILD_CONFIGURATION=3 MACOSX_DEPLOYMENT_TARGET=10.14 WITH_COVERAGE=1
env: BUILD_CONFIGURATION=0 MACOSX_DEPLOYMENT_TARGET=10.14 WITH_COVERAGE=1

cache:
directories:
Expand Down
41 changes: 41 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,47 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog <http://keepachangelog.com/>`_
and this project adheres to `Semantic Versioning <http://semver.org/>`_.

`v3.5.0 <https://github.com/cppmicroservices/cppmicroservices/tree/v3.5.0>`_ (2020-07-04)
---------------------------------------------------------------------------------------------------------

`Full Changelog <https://github.com/cppmicroservices/cppmicroservices/compare/v3.4.0...v3.5.0>`_

Added
-----
- `Bundle::GetSymbol API <https://github.com/CppMicroServices/rfcs/blob/master/text/0005-Bundle-Load-API.md>`_
- `SharedLibraryException <https://github.com/CppMicroServices/rfcs/blob/master/text/0004-ds-dlopen-error-handling.md>`_

Changed
-------
- Migrate a handful of tests from the legacy test suite to gtest based test suite
- `Improve shared library loading error messages <https://github.com/CppMicroServices/CppMicroServices/commit/1920dacd4bc11865a66a87b2806a81f0cd6e6e7f>`_
- c++17 compatible
- https://github.com/CppMicroServices/CppMicroServices/pull/465
- https://github.com/CppMicroServices/CppMicroServices/pull/479

Removed
-------

- `Remove dead code and partially implemented features <https://github.com/CppMicroServices/CppMicroServices/issues/415>`_
- `Remove code with license conflicts <https://github.com/CppMicroServices/CppMicroServices/issues/419>`_

Deprecated
----------

Fixed
-----
- Correctly install Declarative Services and LogService headers
- `Infinite loop in GetCurrentWorkingDir <https://github.com/CppMicroServices/CppMicroServices/pull/431>`_
- `Use cross build objcopy <https://github.com/CppMicroServices/CppMicroServices/commit/a92460244748b5f12edaaa91ac6bd7ea7ecabdc2>`_
- `Service reference dependency deadlock <https://github.com/CppMicroServices/CppMicroServices/commit/ce0d8bfe505509f0b4cea9ab1b4347532c8b7cbb>`_
- `Instantiating multiple service implementations within the same service component <https://github.com/CppMicroServices/CppMicroServices/commit/48f36a7f06ebce05fd3181c1f32eaf8415cb2a69>`_
- Codecov integration
- `BundleRegistry deadlock <https://github.com/CppMicroServices/CppMicroServices/pull/463>`_
- `Remove unnecessary copying of AnyMap <https://github.com/CppMicroServices/CppMicroServices/pull/468>`_
- `Minimum and maximum cardinality values <https://github.com/CppMicroServices/CppMicroServices/issues/475>`_
- `Error if duplicate service component reference names are used <https://github.com/CppMicroServices/CppMicroServices/pull/474>`_
- `Improve performance of ServiceTrackers <https://github.com/CppMicroServices/CppMicroServices/pull/480>`_


`v3.4.0 <https://github.com/cppmicroservices/cppmicroservices/tree/v3.4.0>`_ (2019-12-10)
---------------------------------------------------------------------------------------------------------
Expand Down
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,19 @@ endif()

usFunctionCheckResourceLinking()

# For building with Xcode, "CMAKE_*_LINKER_FLAGS" need to include US_LINK_FLAGS
# to include coverage flags "-fprofile-arcs" and "-ftest-coverage" if US_ENABLE_COVERAGE
# is set.
# Previously, macOS builds using Unix Makefiles automatically set compile flags
# to be used as linker flags (see the following CMake bug report for more details:
# https://cmake.org/Bug/view.php?id=15427), so linker flags didn't need to be set.

if(APPLE AND CMAKE_GENERATOR MATCHES "Xcode")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${US_LINK_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${US_LINK_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${US_LINK_FLAGS}")
endif()

#-----------------------------------------------------------------------------
# US Header Checks
#-----------------------------------------------------------------------------
Expand Down
5 changes: 4 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
| +-------------------------+--------------------------+------------------------+
| | Xcode 7.3 and 10.3 | Visual Studio 2017 | |
| +-------------------------+--------------------------+------------------------+
| | Clang 3.5 and 6.0 | MinGW-w64 | |
| | Clang 3.5 and 6.0 | Visual Studio 2019 | |
| +-------------------------+--------------------------+------------------------+
| | | MinGW-w64 | |
+=============+=========================+==========================+========================+
| master | |Linux Build Status| | |Windows Build status| | |Code Coverage Status| |
+-------------+-------------------------+--------------------------+------------------------+
Expand Down Expand Up @@ -83,6 +85,7 @@ Below is a list of tested compiler/OS combinations:
- Clang Xcode 10.3 (OS X 10.14) via Travis CI
- Visual Studio 2015 via Appveyor
- Visual Studio 2017 via Appveyor
- Visual Studio 2019 via Appveyor
- MinGW-w64 via Appveyor

Legal
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.0
3.5.0
72 changes: 70 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,71 @@ environment:
gen: "Visual Studio 15 2017 Win64"
US_SHARED: 1
US_THREADED: 1
# ---------- Visual Studio 2019 ------------
#---- Win32
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
platform: Win32
configuration: Release
gen: "Visual Studio 16 2019"
US_SHARED: 0
US_THREADED: 0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
platform: Win32
configuration: Release
gen: "Visual Studio 16 2019"
US_SHARED: 1
US_THREADED: 0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
platform: Win32
configuration: Release
gen: "Visual Studio 16 2019"
US_SHARED: 0
US_THREADED: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
platform: Win32
configuration: Release
gen: "Visual Studio 16 2019"
US_SHARED: 1
US_THREADED: 1
#---- Win64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
platform: x64
configuration: Debug
gen: "Visual Studio 16 2019"
US_SHARED: 0
US_THREADED: 1
WITH_COVERAGE: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
platform: x64
configuration: Debug
gen: "Visual Studio 16 2019"
US_SHARED: 1
US_THREADED: 1
WITH_COVERAGE: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
platform: x64
configuration: Release
gen: "Visual Studio 16 2019"
US_SHARED: 0
US_THREADED: 0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
platform: x64
configuration: Release
gen: "Visual Studio 16 2019"
US_SHARED: 1
US_THREADED: 0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
platform: x64
configuration: Release
gen: "Visual Studio 16 2019"
US_SHARED: 0
US_THREADED: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
platform: x64
configuration: Release
gen: "Visual Studio 16 2019"
US_SHARED: 1
US_THREADED: 1
# ---------- MinGW-w64 (via MSYS2) ------------
- platform: mingw-w64
configuration: Release
Expand Down Expand Up @@ -174,7 +239,6 @@ before_build:

install:
- if [%WITH_COVERAGE%]==[1] choco install opencppcoverage
- if [%WITH_COVERAGE%]==[1] pip install codecov
- git submodule update --init --recursive

build_script:
Expand All @@ -184,7 +248,11 @@ build_script:
after_test:
- if [%WITH_COVERAGE%]==[1] %APPVEYOR_BUILD_FOLDER%/opencppcoverage_mergereports.bat
- if [%WITH_COVERAGE%]==[1] python %APPVEYOR_BUILD_FOLDER%/fixcoveragefilepaths.py -i coverage.xml -s %APPVEYOR_BUILD_FOLDER% -o coverage_pathsfixed.xml
- if [%WITH_COVERAGE%]==[1] codecov -X gcov -f coverage_pathsfixed.xml
# use codecov bash script. Requires powershell and bash to be installed, which both are on the AppVeyor machine image
- ps: |
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
bash codecov.sh -f "./coverage_pathsfixed.xml"
test_script:
- cd %APPVEYOR_BUILD_FOLDER%/build
Expand Down
2 changes: 1 addition & 1 deletion cmake/GlobalConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ US_MSVC_DISABLE_WARNING(4996)
#define US_HASH_FUNCTION_BEGIN(type) \
namespace std { \
template<> \
struct hash<type> : std::unary_function<type, std::size_t> { \
struct hash<type> { \
std::size_t operator()(const type& arg) const {

#define US_HASH_FUNCTION_END } }; }
Expand Down
9 changes: 7 additions & 2 deletions cmake/usCTestScript.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ function(create_initial_cache var _shared _threading)
set(CTEST_DASHBOARD_NAME "${CTEST_DASHBOARD_NAME}-threading")
endif()

set(CTEST_DASHBOARD_NAME "${CTEST_DASHBOARD_NAME} (${_generator})" PARENT_SCOPE)
string(REPLACE " " "-" _fixedGenerator ${_generator})
set(CTEST_DASHBOARD_NAME "${CTEST_DASHBOARD_NAME}-${_fixedGenerator}" PARENT_SCOPE)

endfunction()

Expand All @@ -90,7 +91,11 @@ set(config2 1 0 )
set(config3 0 0 )

if(NOT US_CMAKE_GENERATOR)
set(US_CMAKE_GENERATOR "Unix Makefiles")
if(APPLE AND NOT WITH_COVERAGE)
set(US_CMAKE_GENERATOR "Xcode")
else()
set(US_CMAKE_GENERATOR "Unix Makefiles")
endif()
endif()

foreach (_generator ${US_CMAKE_GENERATOR})
Expand Down
9 changes: 6 additions & 3 deletions cmake/usCTestScript_travis.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@

find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
if(APPLE)
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
else()
find_program(CTEST_COVERAGE_COMMAND NAMES $ENV{MY_COVERAGE})
endif()
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
find_program(CTEST_GIT_COMMAND NAMES git)

set(CTEST_SITE "travis-ci")
if(DEFINED ENV{BUILD_DIR})
set(CTEST_DASHBOARD_ROOT $ENV{BUILD_DIR})
else()
set(CTEST_DASHBOARD_ROOT "/tmp/us builds")
set(CTEST_DASHBOARD_ROOT "/tmp/us_builds")
endif()
#set(CTEST_COMPILER "gcc-4.5")
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
if(NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
# gcc in combination with gcov seems to consume a lot of memory
# and may lead to OOM error on Travis containers. Hence we compile
Expand Down
9 changes: 8 additions & 1 deletion cmake/usFunctionEmbedResources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function(usFunctionEmbedResources)
add_custom_command(
OUTPUT ${_source_output}
COMMAND ${CMAKE_LINKER} -r -b binary -o ${_source_output} ${_zip_archive_name}
COMMAND objcopy --rename-section .data=.us_resources,alloc,load,readonly,data,contents ${_source_output} ${_source_output}
COMMAND ${CMAKE_OBJCOPY} --rename-section .data=.us_resources,alloc,load,readonly,data,contents ${_source_output} ${_source_output}
DEPENDS ${_zip_archive}
WORKING_DIRECTORY ${_zip_archive_path}
COMMENT "Linking resources zip file for ${US_RESOURCE_TARGET}"
Expand Down Expand Up @@ -235,6 +235,13 @@ function(usFunctionEmbedResources)
COMMENT "Appending zipped resources to ${US_RESOURCE_TARGET}"
VERBATIM
)

# Disable code-signing on macOS if appending resources.
if(APPLE)
set_target_properties(${US_RESOURCE_TARGET} PROPERTIES
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
endif()

endif()

endfunction()
16 changes: 12 additions & 4 deletions cmake/usMacroCreateBundle.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ project(${_project_name})

cmake_parse_arguments(${PROJECT_NAME}
"SKIP_EXAMPLES;SKIP_INIT"
"VERSION;TARGET;SYMBOLIC_NAME"
"VERSION;TARGET;SYMBOLIC_NAME;EMBED_RESOURCE_METHOD"
"DEPENDS;PRIVATE_INCLUDE_DIRS;LINK_LIBRARIES;SOURCES;PRIVATE_HEADERS;PUBLIC_HEADERS;RESOURCES;BINARY_RESOURCES"
${ARGN}
)
Expand Down Expand Up @@ -43,6 +43,15 @@ if(${PROJECT_NAME}_DEPENDS)
)
endif()

# Set the resource embedding method
set(_resource_embed_type )

# No need to check for a valid value as input checking is done in
# usFunctionEmbedResources.cmake
if(${PROJECT_NAME}_EMBED_RESOURCE_METHOD)
set(_resource_embed_type ${${PROJECT_NAME}_EMBED_RESOURCE_METHOD})
endif()

#-----------------------------------------------------------------------------
# Configure files
#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -75,7 +84,7 @@ if(NOT ${PROJECT_NAME}_SKIP_INIT)
endif()

if(${PROJECT_NAME}_RESOURCES OR ${PROJECT_NAME}_BINARY_RESOURCES)
usFunctionGetResourceSource(TARGET ${${PROJECT_NAME}_TARGET} OUT ${PROJECT_NAME}_SOURCES)
usFunctionGetResourceSource(TARGET ${${PROJECT_NAME}_TARGET} OUT ${PROJECT_NAME}_SOURCES ${_resource_embed_type})
endif()

list(APPEND ${PROJECT_NAME}_SOURCES $<TARGET_OBJECTS:util>)
Expand Down Expand Up @@ -128,7 +137,6 @@ if(${PROJECT_NAME}_LINK_LIBRARIES)
endif()

# Embed bundle resources

if(${PROJECT_NAME}_RESOURCES)
set(_wd ${CMAKE_CURRENT_SOURCE_DIR})
if(${PROJECT_NAME}_RESOURCES)
Expand All @@ -145,7 +153,7 @@ if(${PROJECT_NAME}_BINARY_RESOURCES)
FILES ${${PROJECT_NAME}_BINARY_RESOURCES}
)
endif()
usFunctionEmbedResources(TARGET ${${PROJECT_NAME}_TARGET})
usFunctionEmbedResources(TARGET ${${PROJECT_NAME}_TARGET} ${_resource_embed_type})

#-----------------------------------------------------------------------------
# Install support
Expand Down
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ coverage:
- "third_party/.*" # ignore folder and all its contents
- "**/test/.*" # ignore test code
- "**/cppmicroservices_init.cpp" # ignore cppmicroservices_init.cpp files
- "compendium/test_bundles" # ignore test_bundles and all its contents

fixes:
- "projects/cppmicroservices::"
1 change: 1 addition & 0 deletions compendium/DeclarativeServices/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ usMacroCreateBundle(DeclarativeServices
DEPENDS Framework
TARGET DeclarativeServices
SYMBOLIC_NAME declarative_services
EMBED_RESOURCE_METHOD LINK
LINK_LIBRARIES ${_link_libraries} usLogService usServiceComponent
PRIVATE_HEADERS ${_ds_private_headers}
SOURCES $<TARGET_OBJECTS:DeclarativeServicesObjs> src/SCRActivator.cpp
Expand Down

0 comments on commit 7ed51be

Please sign in to comment.