Skip to content

Commit

Permalink
Merge pull request #66 from SimeonEhrig/portCpp17
Browse files Browse the repository at this point in the history
Remove C++14 support
  • Loading branch information
SimeonEhrig authored Jan 13, 2022
2 parents 48413f4 + 51326f3 commit 91028b1
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 64 deletions.
13 changes: 3 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
################################################################################
# VIKUNJA_CXX : {g++, clang++}
# [g++] : {5, 6, 7, 8, 9} <list>
# [g++] : {7, 8, 9, 10, 11} <list>
# [clang++] : {4.0, 5.0, 6.0, 7, 8, 9, 10} <list>
# ALPAKA_CXX_STANDARD . {14, 17, 20}, optional
# ALPAKA_CXX_STANDARD . {17, 20}, optional
# VIKUNJA_BOOST_VERSIONS : {1.65.1, 1.66.0, 1.67.0, 1.68.0, 1.69.0, 1.70.0, 1.71.0, 1.72.0, 1.73.0} <list>
# VIKUNJA_BUILD_TYPE : {Debug, Release}
# VIKUNJA_CMAKE_ARGS : <string>
Expand Down Expand Up @@ -38,13 +38,6 @@ pull-request-validation:
variables:
VIKUNJA_ALPAKA_VERSIONS: "0.6.0 0.6.1 0.7.0 0.8.0"

cuda102:
image: registry.gitlab.com/hzdr/crp/alpaka-group-container/alpaka-ci-cuda102-gcc:1.4
variables:
VIKUNJA_CXX: "g++-7"
VIKUNJA_BOOST_VERSIONS: "1.65.1 1.66.0 1.67.0 1.68.0 1.69.0 1.70.0 1.71.0 1.72.0 1.73.0"
extends: .base_cuda

cuda112:
image: registry.gitlab.com/hzdr/crp/alpaka-group-container/alpaka-ci-cuda112-gcc:1.4
variables:
Expand All @@ -54,7 +47,7 @@ cuda112:

gcc:
variables:
VIKUNJA_CXX: "g++-5 g++-6 g++-7 g++-8 g++-9"
VIKUNJA_CXX: "g++-7 g++-8 g++-9 g++-10 g++-11"
VIKUNJA_BOOST_VERSIONS: "1.65.1 1.75.0"
extends: .base_gcc

Expand Down
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ project(vikunja
HOMEPAGE_URL "https://github.com/alpaka-group/vikunja"
LANGUAGES CXX)

set(ALPAKA_CXX_STANDARD "14" CACHE STRING "C++ standard version")
set(ALPAKA_CXX_STANDARD "17" CACHE STRING "C++ standard version")

include(CMakeDependentOption)
include(FetchContent)
Expand Down Expand Up @@ -49,14 +49,17 @@ if(NOT TARGET alpaka::alpaka)
endif()
endif()

# Override poperty, as alpaka <= 0.8.0 supports C++ 14 and vikunja does not.
set_property(CACHE ALPAKA_CXX_STANDARD PROPERTY STRINGS "17;20")

add_library(${PROJECT_NAME} INTERFACE)
target_include_directories(${PROJECT_NAME}
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})

#The target vikunja::internalvikunja is for internal use only, such as the tests or examples.
# The target vikunja::internalvikunja is for internal use only, such as the tests or examples.
# For external projects that use vikunja, the target vikunja::vikunja should be used.

# The internal target links alpaka to make it easier to use vikunja, but the target cannot be
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Build Status](https://gitlab.com/hzdr/crp/vikunja/badges/master/pipeline.svg)](https://gitlab.com/hzdr/crp/vikunja/-/commits/master/)
[![Documentation Status](https://readthedocs.org/projects/vikunja/badge/?version=latest)](https://vikunja.readthedocs.io)
[![Doxygen](https://img.shields.io/badge/API-Doxygen-blue.svg)](https://vikunja.readthedocs.io/en/latest/doxygen/index.html)
[![Language](https://img.shields.io/badge/language-C%2B%2B14-orange.svg)](https://isocpp.org/)
[![Language](https://img.shields.io/badge/language-C%2B%2B17-orange.svg)](https://isocpp.org/)
[![Platforms](https://img.shields.io/badge/platform-linux-lightgrey.svg)](https://github.com/alpaka-group/vikunja)
[![License](https://img.shields.io/badge/license-MPL--2.0-blue.svg)](https://www.mozilla.org/en-US/MPL/2.0/)

Expand Down Expand Up @@ -197,4 +197,4 @@ cmake --build .
- Bernhard Manfred Gruber
- Jan Stephan
- Dr. Jiří Vyskočil
- Matthias Werner
- Matthias Werner
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ Generally, **follow the manual pages in-order** to get started. Individual chapt
development/docs.rst
development/styleguide.rst
development/ci.rst
development/apireference.rst
development/apireference.rst
25 changes: 4 additions & 21 deletions include/vikunja/operators/operators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,6 @@
#include <utility>


namespace vikunjaStd
{
#ifdef __cpp_lib_is_invocable
using std::is_invocable;
#else
// define std::is_invocable for c++14 and below
template<typename F, typename... Args>
struct is_invocable
: std::is_constructible<
std::function<void(Args...)>,
std::reference_wrapper<typename std::remove_reference<F>::type>>
{
};

#endif
} // namespace vikunjaStd

namespace vikunja
{
/**
Expand All @@ -57,7 +40,7 @@ namespace vikunja

template<typename TFunc, typename TData>
using enable_if_UnaryOp_without_TAcc
= std::enable_if_t<vikunjaStd::is_invocable<decltype(std::declval<TFunc>()), TData>::value>;
= std::enable_if_t<std::is_invocable<decltype(std::declval<TFunc>()), TData>::value>;

/**
* Operator trait for unary functors.
Expand Down Expand Up @@ -87,7 +70,7 @@ namespace vikunja

template<typename TFunc, typename TAcc, typename TData>
using enable_if_UnaryOp_with_TAcc
= std::enable_if_t<vikunjaStd::is_invocable<decltype(std::declval<TFunc>()), TAcc, TData>::value>;
= std::enable_if_t<std::is_invocable<decltype(std::declval<TFunc>()), TAcc, TData>::value>;

/**
* Operator trait for unary functors.
Expand Down Expand Up @@ -130,7 +113,7 @@ namespace vikunja

template<typename TFunc, typename TData1, typename TData2>
using enable_if_BinaryOp_without_TAcc
= std::enable_if_t<vikunjaStd::is_invocable<decltype(std::declval<TFunc>()), TData1, TData2>::value>;
= std::enable_if_t<std::is_invocable<decltype(std::declval<TFunc>()), TData1, TData2>::value>;

/**
* Operator trait for binary functors.
Expand Down Expand Up @@ -163,7 +146,7 @@ namespace vikunja

template<typename TFunc, typename TAcc, typename TData1, typename TData2>
using enable_if_BinaryOp_with_TAcc
= std::enable_if_t<vikunjaStd::is_invocable<decltype(std::declval<TFunc>()), TAcc, TData1, TData2>::value>;
= std::enable_if_t<std::is_invocable<decltype(std::declval<TFunc>()), TAcc, TData1, TData2>::value>;

/**
* Operator trait for binary functors.
Expand Down
28 changes: 0 additions & 28 deletions script/cxx_tests.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# the following jobs runs the test "text_cxx"

# test gcc build with manually set C++ 14 version
gcc_cxx14:
variables:
VIKUNJA_CXX: "g++-9"
VIKUNJA_BOOST_VERSIONS: "1.73.0"
VIKUNJA_CXX_TEST: "ON"
ALPAKA_CXX_STANDARD: 14
extends: .base_gcc

# test gcc build with manually set C++ 17 version
gcc_cxx17:
variables:
Expand All @@ -27,15 +18,6 @@ gcc_cxx20:
ALPAKA_CXX_STANDARD: 20
extends: .base_gcc

# test clang build with manually set C++ 14 version
clang_cxx14:
variables:
VIKUNJA_CXX: "clang++-12"
VIKUNJA_BOOST_VERSIONS: "1.73.0"
VIKUNJA_CXX_TEST: "ON"
ALPAKA_CXX_STANDARD: 14
extends: .base_clang

# test clang build with manually set C++ 17 version
clang_cxx17:
variables:
Expand All @@ -53,16 +35,6 @@ clang_cxx20:
VIKUNJA_CXX_TEST: "ON"
ALPAKA_CXX_STANDARD: 20
extends: .base_clang

# test cuda build with manually set C++ 14 version
cuda112_cxx14:
image: registry.gitlab.com/hzdr/crp/alpaka-group-container/alpaka-ci-cuda112-gcc:1.4
variables:
VIKUNJA_CXX: "g++-9"
VIKUNJA_BOOST_VERSIONS: "1.73.0"
VIKUNJA_CXX_TEST: "ON"
ALPAKA_CXX_STANDARD: 14
extends: .base_cuda

# test cuda build with manually set C++ 17 version
cuda112_cxx17:
Expand Down

0 comments on commit 91028b1

Please sign in to comment.