Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
conan-packages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sevin Arnaud
conan-packages
Commits
5b0d1b5d
Commit
5b0d1b5d
authored
3 years ago
by
raplonu
Browse files
Options
Downloads
Patches
Plain Diff
Adds mdspan.
parent
d3a592cc
Branches
Branches containing commit
Tags
mdspan/0.1.1
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mdspan/conanfile.py
+75
-0
75 additions, 0 deletions
mdspan/conanfile.py
with
75 additions
and
0 deletions
mdspan/conanfile.py
0 → 100644
+
75
−
0
View file @
5b0d1b5d
from
conans
import
ConanFile
,
tools
from
conans.errors
import
ConanInvalidConfiguration
import
os
required_conan_version
=
'
>=1.33.0
'
class
MDSpanConan
(
ConanFile
):
name
=
'
mdspan
'
version
=
'
0.1.1
'
homepage
=
'
https://github.com/kokkos/mdspan
'
description
=
'
Production-quality reference implementation of mdspan
'
topics
=
(
'
multi-dimensional
'
,
'
array
'
,
'
span
'
)
license
=
'
BSD-3-Clause
'
url
=
'
https://github.com/conan-io/conan-center-index
'
settings
=
'
compiler
'
no_copy_source
=
True
scm
=
{
"
type
"
:
"
git
"
,
"
subfolder
"
:
'
source_subfolder
'
,
"
url
"
:
"
https://github.com/kokkos/mdspan.git
"
,
"
revision
"
:
"
5694f21c39f3b948d06a0c63b9c219bf802e28a8
"
}
@property
def
_source_subfolder
(
self
):
return
'
source_subfolder
'
@property
def
_minimum_cpp_standard
(
self
):
return
14
@property
def
_minimum_compilers_version
(
self
):
return
{
'
Visual Studio
'
:
'
15
'
,
'
gcc
'
:
'
5
'
,
'
clang
'
:
'
3.4
'
,
'
apple-clang
'
:
'
5.1
'
}
def
configure
(
self
):
if
self
.
settings
.
compiler
.
get_safe
(
'
cppstd
'
):
tools
.
check_min_cppstd
(
self
,
self
.
_minimum_cpp_standard
)
min_version
=
self
.
_minimum_compilers_version
.
get
(
str
(
self
.
settings
.
compiler
))
if
not
min_version
:
self
.
output
.
warn
(
'
{} recipe lacks information about the {}
'
'
compiler support.
'
.
format
(
self
.
name
,
self
.
settings
.
compiler
))
else
:
if
tools
.
Version
(
self
.
settings
.
compiler
.
version
)
<
min_version
:
raise
ConanInvalidConfiguration
(
'
{} requires C++{} support.
'
'
The current compiler {} {} does not support it.
'
.
format
(
self
.
name
,
self
.
_minimum_cpp_standard
,
self
.
settings
.
compiler
,
self
.
settings
.
compiler
.
version
))
def
package
(
self
):
self
.
copy
(
pattern
=
'
*
'
,
dst
=
'
include
'
,
src
=
os
.
path
.
join
(
self
.
_source_subfolder
,
'
include
'
))
self
.
copy
(
'
*LICENSE
'
,
dst
=
'
licenses
'
,
keep_path
=
False
)
def
package_id
(
self
):
self
.
info
.
header_only
()
def
package_info
(
self
):
self
.
cpp_info
.
filenames
[
'
cmake_find_package
'
]
=
'
mdspan
'
self
.
cpp_info
.
filenames
[
'
cmake_find_package_multi
'
]
=
'
mdspan
'
self
.
cpp_info
.
names
[
'
cmake_find_package
'
]
=
'
std
'
self
.
cpp_info
.
names
[
'
cmake_find_package_multi
'
]
=
'
std
'
self
.
cpp_info
.
components
[
'
_mdspan
'
].
names
[
'
cmake_find_package
'
]
=
'
mdspan
'
self
.
cpp_info
.
components
[
'
_mdspan
'
].
names
[
'
cmake_find_package_multi
'
]
=
'
mdspan
'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment