Navigation Menu

Skip to content
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

Merged
merged 1 commit into from Jul 27, 2018

Conversation

JohanMabille
Copy link
Member

@JohanMabille
Copy link
Member Author

I've stopped the builds since this is documentation update only.

@SylvainCorlay
Copy link
Member

looking at it now.

Getting started
===============

This short guide explains how to get started with `xtensor` once you've installed it with one of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have

Compiling the first example
---------------------------

`xtensor` is a header only library, so there is no library to link with. The only constraint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

header-only

-------------------

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:
Copy link
Member

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.

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``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the headers


`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.
Copy link
Member

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).

@SylvainCorlay
Copy link
Member

Added a few comments.

@SylvainCorlay SylvainCorlay merged commit 293e3e1 into xtensor-stack:master Jul 27, 2018
@JohanMabille JohanMabille deleted the quickstart branch October 26, 2018 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants