diff --git a/LICENSE.build b/LICENSE.build deleted file mode 100644 index 1a3d60c..0000000 --- a/LICENSE.build +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2019 The Meson development team - -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. diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..4c93a87 --- /dev/null +++ b/meson.build @@ -0,0 +1,37 @@ +project('xtensor', 'cpp', + version:'0.20.4', + license:'BSD-3-Clause', + default_options : ['warning_level=3', 'cpp_std=c++14']) + +xtl_dep = dependency('xtl', + version: ['>=0.6.2', '<1.0.0'], + fallback : ['xtl', 'xtl_dep'], + required: false) + +json_dep = dependency('nlohmann_json', + version:'>=3.1.1', + fallback : ['nlohmann_json', 'nlohmann_json_dep'], + required: false) + +required_deps_found = xtl_dep.found() + +if get_option('XTENSOR_USE_XSIMD') + xsimd_dep = dependency('xsimd', + version: ['>=7.0.0', '<8.0.0'], + fallback : ['xsimd', 'xsimd_dep'], + required: false) + xtensor_cpp_arg = ['-DXTENSOR_USE_XSIMD'] + required_deps_found = required_deps_found and xsimd_dep.found() +else + xsimd_dep = dependency('', required: false) # aka "not found" + xtensor_cpp_arg = [] +endif + +if required_deps_found + xtensor_dep = declare_dependency( + include_directories:include_directories('include', is_system: true), + dependencies: [xtl_dep, json_dep, xsimd_dep], + compile_args: xtensor_cpp_arg) +else + xtensor_dep = dependency('', required: false) # aka "not found" +endif diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..220c7de --- /dev/null +++ b/meson_options.txt @@ -0,0 +1 @@ +option('XTENSOR_USE_XSIMD', type: 'boolean', value: false, description: 'simd acceleration for xtensor') diff --git a/upstream.wrap b/upstream.wrap new file mode 100644 index 0000000..f5d78e9 --- /dev/null +++ b/upstream.wrap @@ -0,0 +1,6 @@ +[wrap-file] +directory=xtensor-0.20.4 + +source_url=https://github.com/QuantStack/xtensor/archive/0.20.4.zip +source_filename=xtensor-0.20.4.zip +source_hash=7f142bb367ec14a058ae3290364407c9b4afd414d3be01b1827d4260545fa528