Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fix #244

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 52 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ env:
matrix:
include:

# check code formatting
# check code formatting
- os: linux
compiler: gcc
env: NAME="check code formatting" CHECK_FORMATTING=true
Expand Down Expand Up @@ -147,6 +147,22 @@ matrix:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-7', 'libboost-all-dev', 'ninja-build']
env: NAME="g++-7" COMPILER=g++-7 ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=true

- os: linux
compiler: gcc
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-8', 'libboost-all-dev', 'ninja-build']
env: NAME="g++-8" COMPILER=g++-8 ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=true

- os: linux
compiler: gcc
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-9', 'libboost-all-dev', 'ninja-build']
env: NAME="g++-9" COMPILER=g++-9 ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=true

# Linux / CLang
- os: linux
Expand Down Expand Up @@ -198,6 +214,41 @@ matrix:
env: COMPILER=clang++-5.0 ARCH=x86_64 CONF=Release UNIT_TESTS=true

# OSX/Clang
- os: osx
osx_image: xcode10.2
compiler: clang
env: COMPILER=clang++ ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=false BUILD_EXAMPLES=true

- os: osx
osx_image: xcode10.1
compiler: clang
env: COMPILER=clang++ ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=false BUILD_EXAMPLES=true

- os: osx
osx_image: xcode10
compiler: clang
env: COMPILER=clang++ ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=false BUILD_EXAMPLES=true

- os: osx
osx_image: xcode9.4
compiler: clang
env: COMPILER=clang++ ARCH=x86 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=false BUILD_EXAMPLES=true

- os: osx
osx_image: xcode9.4
compiler: clang
env: COMPILER=clang++ ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=false BUILD_EXAMPLES=true

- os: osx
osx_image: xcode9.3
compiler: clang
env: COMPILER=clang++ ARCH=x86 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=false BUILD_EXAMPLES=true

- os: osx
osx_image: xcode9.3
compiler: clang
env: COMPILER=clang++ ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=false BUILD_EXAMPLES=true

- os: osx
osx_image: xcode9.2
compiler: clang
Expand Down
4 changes: 2 additions & 2 deletions src/rttr/detail/registration/bind_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ class registration::bind<detail::ctor_func, Class_Type, F, acc_level, Visitor_Li
std::move(get_metadata(std::forward<Args>(args)...)),
std::move(get_default_args<type_list<Acc_Func>, function_type>(std::forward<Args>(args)...)),
std::move(create_param_infos<type_list<F>, function_type>(std::forward<Args>(args)...)));
return std::move(ctor);
return ctor;
}
public:
bind(const std::shared_ptr<detail::registration_executer>& reg_exec, F func)
Expand Down Expand Up @@ -678,7 +678,7 @@ class registration::bind<detail::meth, Class_Type, F, acc_level, Visitor_List> :
std::move(get_metadata(std::forward<Args>(args)...)),
std::move(get_default_args<type_list<Acc_Func>, function_type>(std::forward<Args>(args)...)),
std::move(create_param_infos<type_list<F>, function_type>(std::forward<Args>(args)...)) );
return std::move(meth);
return meth;
}

template<typename Policy, std::size_t Metadata_Count, typename...TArgs, typename...Param_Args>
Expand Down
17 changes: 16 additions & 1 deletion src/unit_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ add_subdirectory(base_library)
set(HPP_FILES "")
set(SRC_FILES "")

cmake_policy(SET CMP0025 NEW)
project(unit_tests LANGUAGES CXX)

message(STATUS "Scanning " ${PROJECT_NAME} " module.")
Expand All @@ -54,6 +55,20 @@ set_target_properties(unit_tests PROPERTIES DEBUG_POSTFIX ${RTTR_DEBUG_POSTFIX}

set_compiler_warnings(unit_tests)

message("CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}")
message("CMAKE_CXX_COMPILER_VERSION: ${CMAKE_CXX_COMPILER_VERSION}")
message("XCODE_VERSION: ${XCODE_VERSION}")

if ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "10.0.1.10010046")
OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "6.0.1")
OR (XCODE AND XCODE_VERSION VERSION_GREATER "10.1"))
target_compile_options(unit_tests PRIVATE -Wno-error=self-assign-overloaded)
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "9.1.0")
target_compile_options(unit_tests PRIVATE -Wno-error=init-list-lifetime)
endif()

if (MSVC)
target_compile_options(unit_tests PRIVATE /bigobj)
endif()
Expand All @@ -72,4 +87,4 @@ add_subdirectory(plugin)
add_dependencies(unit_tests unit_test_plugin)

message(STATUS "Scanning " ${PROJECT_NAME} " module finished!")
message(STATUS "")
message(STATUS "")