Add missing licenses to cmake files

This commit is contained in:
Denis Blank 2018-02-26 18:55:06 +01:00
parent 2cb42d786d
commit 02fbad159c
11 changed files with 216 additions and 31 deletions

View File

@ -1,3 +1,24 @@
# Copyright(c) 2015 - 2018 Denis Blank <denis.blank at outlook dot com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files(the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions :
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
cmake_minimum_required(VERSION 3.2)
project(continuable VERSION 2.0.0 LANGUAGES C CXX)

View File

@ -1,5 +1,27 @@
# Copyright(c) 2015 - 2018 Denis Blank <denis.blank at outlook dot com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files(the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions :
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
add_library(continuable-features-flags INTERFACE)
add_library(continuable-features-warnings INTERFACE)
add_library(continuable-features-noexcept INTERFACE)
include(cmake/configure_compiler.cmake)
include(cmake/configure_macros.cmake)

View File

@ -1,3 +1,24 @@
# Copyright(c) 2015 - 2018 Denis Blank <denis.blank at outlook dot com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files(the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions :
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# Enable full warnings
target_compile_options(continuable-features-warnings
INTERFACE

View File

@ -1,3 +1,24 @@
# Copyright(c) 2015 - 2018 Denis Blank <denis.blank at outlook dot com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files(the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions :
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# Enable full warnings
target_compile_options(continuable-features-warnings
INTERFACE

View File

@ -1,3 +1,24 @@
# Copyright(c) 2015 - 2018 Denis Blank <denis.blank at outlook dot com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files(the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions :
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
if(CMAKE_SIZEOF_VOID_P MATCHES 8)
set(PLATFORM 64)
else()

View File

@ -1,3 +1,24 @@
# Copyright(c) 2015 - 2018 Denis Blank <denis.blank at outlook dot com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files(the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions :
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# Select the compiler specific cmake file
set(MSVC_ID "MSVC")
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")

View File

@ -0,0 +1,22 @@
# Copyright(c) 2015 - 2018 Denis Blank <denis.blank at outlook dot com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files(the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions :
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
include(${CMAKE_SOURCE_DIR}/cmake/macros/group_sources.cmake)

View File

@ -0,0 +1,58 @@
# Copyright(c) 2015 - 2018 Denis Blank <denis.blank at outlook dot com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files(the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions :
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
set(WITH_SOURCE_TREE "hierarchical")
macro(group_sources dir)
# Skip this if WITH_SOURCE_TREE is not set (empty string).
if (NOT ${WITH_SOURCE_TREE} STREQUAL "")
# Include all header and c files
file(GLOB_RECURSE elements RELATIVE ${dir} *.h *.hpp *.inl *.inc *.c *.cpp *.cc)
foreach(element ${elements})
# Extract filename and directory
get_filename_component(element_name ${element} NAME)
get_filename_component(element_dir ${element} DIRECTORY)
if (NOT ${element_dir} STREQUAL "")
# If the file is in a subdirectory use it as source group.
if (${WITH_SOURCE_TREE} STREQUAL "flat")
# Build flat structure by using only the first subdirectory.
string(FIND ${element_dir} "/" delemiter_pos)
if (NOT ${delemiter_pos} EQUAL -1)
string(SUBSTRING ${element_dir} 0 ${delemiter_pos} group_name)
source_group("${group_name}" FILES ${dir}/${element})
else()
# Build hierarchical structure.
# File is in root directory.
source_group("${element_dir}" FILES ${dir}/${element})
endif()
else()
# Use the full hierarchical structure to build source_groups.
string(REPLACE "/" "\\" group_name ${element_dir})
source_group("${group_name}" FILES ${dir}/${element})
endif()
else()
# If the file is in the root directory, place it in the root source_group.
source_group("\\" FILES ${dir}/${element})
endif()
endforeach()
endif()
endmacro()

View File

@ -59,7 +59,7 @@ struct is_strategy<strategy_all_tag> : std::true_type {};
template <>
struct is_strategy<strategy_any_tag> : std::true_type {};
namespace detail {
namespace detail {
template <std::size_t Pos, typename T>
constexpr void assign(traits::size_constant<Pos> /*pos*/, T& /*storage*/) {
// ...

View File

@ -1,31 +1,8 @@
set(LIB_SOURCES
${CMAKE_SOURCE_DIR}/include/continuable/continuable.hpp
${CMAKE_SOURCE_DIR}/include/continuable/continuable-types.hpp
${CMAKE_SOURCE_DIR}/include/continuable/continuable-base.hpp
${CMAKE_SOURCE_DIR}/include/continuable/continuable-compositions.hpp
${CMAKE_SOURCE_DIR}/include/continuable/continuable-trait.hpp
${CMAKE_SOURCE_DIR}/include/continuable/continuable-promise-base.hpp
${CMAKE_SOURCE_DIR}/include/continuable/continuable-promisify.hpp
${CMAKE_SOURCE_DIR}/include/continuable/continuable-transforms.hpp
${CMAKE_SOURCE_DIR}/include/continuable/continuable-traverse.hpp
${CMAKE_SOURCE_DIR}/include/continuable/continuable-traverse-async.hpp
${CMAKE_SOURCE_DIR}/include/continuable/continuable-testing.hpp)
set(LIB_SOURCES_DETAIL
${CMAKE_SOURCE_DIR}/include/continuable/detail/awaiting.hpp
${CMAKE_SOURCE_DIR}/include/continuable/detail/base.hpp
${CMAKE_SOURCE_DIR}/include/continuable/detail/composition.hpp
${CMAKE_SOURCE_DIR}/include/continuable/detail/expected.hpp
${CMAKE_SOURCE_DIR}/include/continuable/detail/hints.hpp
${CMAKE_SOURCE_DIR}/include/continuable/detail/promisify.hpp
${CMAKE_SOURCE_DIR}/include/continuable/detail/container-category.hpp
${CMAKE_SOURCE_DIR}/include/continuable/detail/traverse.hpp
${CMAKE_SOURCE_DIR}/include/continuable/detail/traverse-async.hpp
${CMAKE_SOURCE_DIR}/include/continuable/detail/features.hpp
${CMAKE_SOURCE_DIR}/include/continuable/detail/traits.hpp
${CMAKE_SOURCE_DIR}/include/continuable/detail/transforms.hpp
${CMAKE_SOURCE_DIR}/include/continuable/detail/types.hpp
${CMAKE_SOURCE_DIR}/include/continuable/detail/testing.hpp
${CMAKE_SOURCE_DIR}/include/continuable/detail/util.hpp)
set(INCLUDE_DIR ${CMAKE_SOURCE_DIR}/include/continuable)
file(GLOB LIB_SOURCES ${INCLUDE_DIR}/*.hpp)
file(GLOB_RECURSE LIB_SOURCES_DETAIL ${INCLUDE_DIR}/detail/*.hpp)
set(TEST
${CMAKE_CURRENT_LIST_DIR}/test-playground.cpp
${CMAKE_CURRENT_LIST_DIR}/comp.cpp)
@ -35,8 +12,8 @@ add_executable(test-playground
${LIB_SOURCES_DETAIL}
${TEST})
source_group(src FILES ${LIB_SOURCES})
source_group(src\\detail FILES ${LIB_SOURCES_DETAIL})
source_group(continuable FILES ${LIB_SOURCES})
source_group(continuable\\detail FILES ${LIB_SOURCES_DETAIL})
source_group(test FILES ${TEST})
target_link_libraries(test-playground

View File

@ -203,6 +203,7 @@ constexpr auto create_index_pack(Args&&... args) {
template <typename Relocator, typename Index, typename Target>
constexpr void relocate_index_pack(Relocator&& relocator, Index* index,
Target* target) {
constexpr traversal::container_category_of_t<Index> const tag;
detail::result_relocator_mapper<std::decay_t<Relocator>> mapper{