New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
basic usage replaced with getting started #1004
Conversation
I've stopped the builds since this is documentation update only. |
looking at it now. |
docs/source/getting_started.rst
Outdated
Getting started | ||
=============== | ||
|
||
This short guide explains how to get started with `xtensor` once you've installed it with one of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you have
docs/source/getting_started.rst
Outdated
Compiling the first example | ||
--------------------------- | ||
|
||
`xtensor` is a header only library, so there is no library to link with. The only constraint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
header-only
docs/source/getting_started.rst
Outdated
------------------- | ||
|
||
A better alternative for building programs using `xtensor` is to use `cmake`, especially if you want to | ||
be able to build on many platforms. Assuming the following folder structure: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
especially if you are developing for several platforms.
docs/source/getting_started.rst
Outdated
add_executable(first_example src/example.cpp) | ||
target_link_libraries(first_example xtensor) | ||
|
||
`cmake` has to know where to find the include headers, this is done through the ``CMAKE_INSTALL_PREFIX`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the headers
docs/source/getting_started.rst
Outdated
|
||
`cmake` has to know where to find the include headers, this is done through the ``CMAKE_INSTALL_PREFIX`` | ||
variable. Note that ``CMAKE_INSTALL_PREFIX`` is usually the path to a folder containing the following | ||
subfolders: ``include``, ``lib`` and ``bin``, so you don't have to pass any additional option for linking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Give examples of prefixes on unix platform (/usr/local
).
Added a few comments. |
cc @SylvainCorlay