Skip to content

Commit

Permalink
Merge pull request #79 from brunocodutra/develop
Browse files Browse the repository at this point in the history
Relicense under the MIT
  • Loading branch information
brunocodutra authored Apr 16, 2018
2 parents 3e0364b + 353e7bd commit f98e014
Show file tree
Hide file tree
Showing 241 changed files with 65 additions and 1,016 deletions.
8 changes: 2 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Copyright Bruno Dutra 2015-2018
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

sudo: required
language: cpp

Expand Down Expand Up @@ -304,7 +300,7 @@ jobs:
allow-empty-commit: true
local-dir: install/include
on:
branch: master
tags: true
- provider: pages
target-branch: gh-pages
github-token: $GITHUB_TOKEN
Expand All @@ -313,7 +309,7 @@ jobs:
allow-empty-commit: true
local-dir: install/share/Metal/doc
on:
branch: master
tags: true

before_install:
- SOURCE_PATH="${TRAVIS_BUILD_DIR}"
Expand Down
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Copyright Bruno Dutra 2015-2018
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

cmake_minimum_required(VERSION 3.8)

include(cmake/Deploy.cmake)
Expand All @@ -27,7 +23,7 @@ set(METAL_VERSION "${METAL_MAJOR}.${METAL_MINOR}.${METAL_PATCH}")

message(STATUS "Configuring Metal ${METAL_VERSION}")

add_header_library(Metal "${METAL_INCLUDE_DIR}/metal.hpp")
add_header_library(Metal "${METAL_INCLUDE_DIR}/metal.hpp" "LICENSE")
set_target_properties(Metal PROPERTIES
INTERFACE_LIB_VERSION ${METAL_VERSION}
INTERFACE_COMPILE_FEATURES cxx_std_11
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2018 Bruno Dutra

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.
23 changes: 0 additions & 23 deletions LICENSE.txt

This file was deleted.

7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ The following compilers are continuously tested at
The complete up to date documentation is available [online][documentation].
## License
Metal is distributed under the
[Boost Software License, Version 1.0][boost.license].
This project is licensed under the [MIT][license].
[version]: http://badge.fury.io/gh/brunocodutra%2Fmetal.svg
[semver]: http://semver.org
Expand All @@ -141,12 +141,11 @@ Metal is distributed under the
[godbolt.metal]: http://godbolt.org/g/RFwvic
[godbolt.badge]: http://img.shields.io/badge/try%20it-on%20godbolt-222266.svg
[boost.license]: http://boost.org/LICENSE_1_0.txt
[CMake]: http://cmake.org/
[Doxygen]: http://doxygen.org/
[metaben.ch]: http://metaben.ch/
[license]: https://github.com/brunocodutra/metal/blob/master/LICENSE
[releases]: http://github.com/brunocodutra/metal/releases
[documentation]: http://brunocodutra.github.io/metal
[examples]: http://brunocodutra.github.io/metal/#examples
Expand Down
4 changes: 0 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Copyright Bruno Dutra 2015-2018
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

environment:
matrix:
- DEPLOY: true
Expand Down
67 changes: 33 additions & 34 deletions cmake/Deploy.cmake
Original file line number Diff line number Diff line change
@@ -1,33 +1,25 @@
# Copyright Bruno Dutra 2015-2017
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

set(THIS_FILE ${CMAKE_CURRENT_LIST_FILE})

function(copyright _license _output)
set(output "${${_output}}")
file(STRINGS ${_license} lines NEWLINE_CONSUME)
string(REGEX REPLACE "\n$" "" lines "${lines}")
string(REGEX REPLACE "\n" "\n// " output "// ${lines}")
set(${_output} "${output}\n\n" PARENT_SCOPE)
endfunction()

function(bundle _entry _output)
set(options)
set(one_value_args EXCLUDED)
set(multi_value_args EXCLUDE INCLUDE_DIRS)
set(multi_value_args EXCLUDE)
cmake_parse_arguments(ARGS "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN})

if(NOT IS_ABSOLUTE ${_entry})
set(_entry "${CMAKE_CURRENT_SOURCE_DIR}/${_entry}")
endif()

set(exclude)
if(ARGS_EXCLUDE)
set(exclude ${ARGS_EXCLUDE})
endif()

get_filename_component(include_dirs ${_entry} DIRECTORY)
if(ARGS_INCLUDE_DIRS)
foreach(dir ${ARGS_INCLUDE_DIRS})
if(NOT IS_ABSOLUTE ${dir})
set(dir "${CMAKE_CURRENT_SOURCE_DIR}/${dir}")
endif()
list(APPEND include_dirs ${dir})
endforeach()
endif()
get_filename_component(include_dir ${_entry} DIRECTORY)

set(output "${${_output}}")
file(STRINGS ${_entry} lines NEWLINE_CONSUME)
Expand All @@ -38,23 +30,16 @@ function(bundle _entry _output)
set(regex "^[ \t]*#[ \t]*include[ \t]*[\"<]([^\">]*)[\">]")
if(line MATCHES ${regex})
string(REGEX REPLACE ${regex} "\\1" include "${line}")
foreach(dir ${include_dirs})
if(EXISTS "${dir}/${include}")
set(next "${dir}/${include}")
get_filename_component(next "${next}" ABSOLUTE)
break()
endif()
endforeach()
if(NOT IS_ABSOLUTE "${include}" AND EXISTS "${include_dir}/${include}")
set(next "${include_dir}/${include}")
get_filename_component(next "${next}" ABSOLUTE)
endif()
endif()

if(next)
if(NOT next IN_LIST exclude)
list(APPEND exclude ${next})
bundle(${next} output
EXCLUDE ${exclude}
EXCLUDED exclude
INCLUDE_DIRS ${ARGS_INCLUDE_DIRS}
)
bundle(${next} output EXCLUDE ${exclude} EXCLUDED exclude)
endif()
else()
set(output "${output}${line}\n")
Expand All @@ -68,7 +53,15 @@ function(bundle _entry _output)
set(${_output} "${output}" PARENT_SCOPE)
endfunction()

function(add_header_library _name _entry)
function(add_header_library _name _entry _license)
if(NOT IS_ABSOLUTE ${_entry})
set(_entry "${CMAKE_CURRENT_SOURCE_DIR}/${_entry}")
endif()

if(NOT IS_ABSOLUTE ${_license})
set(_license "${CMAKE_CURRENT_SOURCE_DIR}/${_license}")
endif()

get_filename_component(output ${_entry} NAME)
set(output_dir "${CMAKE_BINARY_DIR}/${_name}/include")
set(output "${output_dir}/${output}")
Expand All @@ -80,8 +73,9 @@ function(add_header_library _name _entry)
file(WRITE ${bundle} "\
cmake_minimum_required(VERSION ${CMAKE_VERSION})
include(${THIS_FILE})
bundle(${_entry} single INCLUDE_DIRS ${include_dir})
file(WRITE \"${output}\" \"\${single}\")
copyright(${_license} output)
bundle(${_entry} output)
file(WRITE \"${output}\" \"\${output}\")
"
)

Expand All @@ -92,11 +86,16 @@ file(WRITE \"${output}\" \"\${single}\")
DEPENDS ${headers}
)

add_custom_target(${_name}.bundle ALL DEPENDS ${output} SOURCES ${headers})
add_custom_target(${_name}.bundle DEPENDS ${output} SOURCES ${headers})

add_library(${_name} INTERFACE)
target_include_directories(${_name} INTERFACE $<BUILD_INTERFACE:${output_dir}>)

if (NOT TARGET bundle)
add_custom_target(bundle ALL)
endif()

add_dependencies(bundle ${_name}.bundle)
add_dependencies(${_name} ${_name}.bundle)
endfunction()

Expand Down
4 changes: 0 additions & 4 deletions cmake/Test.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Copyright Bruno Dutra 2015-2017
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

enable_testing()

find_program(CLANG_TIDY NAMES clang-tidy)
Expand Down
4 changes: 0 additions & 4 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Copyright Bruno Dutra 2015-2018
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

find_package(Doxygen)
if(NOT DOXYGEN_FOUND)
message(WARNING "doxygen not found - target 'doc' will be unavailable.")
Expand Down
5 changes: 0 additions & 5 deletions doc/css/metal.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/* Copyright Bruno Dutra 2015-2016
* Distributed under the Boost Software License, Version 1.0.
* See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt
*/

html, body {
height: 100%;
color: #464646;
Expand Down
6 changes: 3 additions & 3 deletions doc/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<li><iframe class="github-btn" src="https://ghbtns.com/github-btn.html?user=brunocodutra&amp;repo=metal&amp;type=watch&amp;count=true" title="Star on GitHub"></iframe></li>
<li><iframe class="github-btn" src="https://ghbtns.com/github-btn.html?user=brunocodutra&amp;repo=metal&amp;type=fork&amp;count=true" title="Fork on GitHub"></iframe></li>
</ul>
&copy; Copyright 2015-$year
&copy; Copyright 2018-$year
<a href="https://github.com/brunocodutra">Bruno Dutra</a>,
<span class="hidden-xs">Distributed under the</span>
<a href="http://www.boost.org/LICENSE_1_0.txt">
Boost Software License, Version 1.0
<a href="https://github.com/brunocodutra/metal/blob/master/LICENSE">
MIT
</a>
</div>
</div>
Expand Down
4 changes: 0 additions & 4 deletions doc/js/metal.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright Bruno Dutra 2015-2016
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

$(function() {
var page = window.location.pathname.split("/").pop();
if(!page.length)
Expand Down
6 changes: 0 additions & 6 deletions doc/layout.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
<!--
Copyright Bruno Dutra 2015-2016
Distributed under the Boost Software License, Version 1.0.
See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt
-->

<doxygenlayout version="1.0">
<navindex>
<tab type="mainpage" visible="yes" title="Documentation"/>
Expand Down
4 changes: 0 additions & 4 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Copyright Bruno Dutra 2015-2018
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/")

find_package(Boost)
Expand Down
4 changes: 0 additions & 4 deletions example/include/example.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright Bruno Dutra 2015-2018
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

#ifndef METAL_EXAMPLE_HPP
#define METAL_EXAMPLE_HPP

Expand Down
4 changes: 0 additions & 4 deletions example/src/church.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright Bruno Dutra 2015-2018
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

#include <metal.hpp>

#include "example.hpp"
Expand Down
4 changes: 0 additions & 4 deletions example/src/expression.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright Bruno Dutra 2015-2018
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

#include <metal.hpp>

#include "example.hpp"
Expand Down
4 changes: 0 additions & 4 deletions example/src/lambda.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright Bruno Dutra 2015-2018
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

#include <metal.hpp>

#include "example.hpp"
Expand Down
4 changes: 0 additions & 4 deletions example/src/list.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright Bruno Dutra 2015-2018
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

#include <metal.hpp>

#include <cstdint>
Expand Down
4 changes: 0 additions & 4 deletions example/src/literal.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright Bruno Dutra 2015-2018
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

#include <metal.hpp>

#include <cassert>
Expand Down
4 changes: 0 additions & 4 deletions example/src/map.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright Bruno Dutra 2015-2018
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

#include <metal.hpp>

#include <map>
Expand Down
4 changes: 0 additions & 4 deletions example/src/mpl.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright Bruno Dutra 2015-2018
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

#include <metal.hpp>

#include "example.hpp"
Expand Down
4 changes: 0 additions & 4 deletions example/src/number.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright Bruno Dutra 2015-2018
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

#include <metal.hpp>

#include "example.hpp"
Expand Down
4 changes: 0 additions & 4 deletions example/src/pair.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright Bruno Dutra 2015-2018
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

#include <metal.hpp>

#include <memory>
Expand Down
4 changes: 0 additions & 4 deletions example/src/sfinae.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright Bruno Dutra 2015-2018
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt

#include <metal.hpp>

#include "example.hpp"
Expand Down
Loading

0 comments on commit f98e014

Please sign in to comment.