Skip to content

Commit 3ccaffa

Browse files
committed
Add Doxygen build to CMake, Travis CI, and doc deployment.
1 parent 66bfec9 commit 3ccaffa

4 files changed

Lines changed: 2331 additions & 4 deletions

File tree

.travis.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
sudo: required
2+
dist: trusty
3+
language: cpp
4+
5+
before_install:
6+
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
7+
- sudo apt-get -qq update
8+
- sudo apt-get install -y libboost-dev libboost-test-dev libboost-python-dev python-numpy python3-numpy libpython3-dev swig doxygen fftw3-dev libeigen3-dev libpython3-dev
9+
- sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py34.so /usr/lib/x86_64-linux-gnu/libboost_python3.so
10+
11+
script:
12+
- mkdir build
13+
- cd build
14+
- cmake -DPYTHON_EXECUTABLE=$PYTHON .. && make && make test ARGS="-V"
15+
- make doc
16+
17+
env:
18+
- PYTHON=/usr/bin/python
19+
- PYTHON=/usr/bin/python3
20+
21+
deploy:
22+
provider: pages
23+
skip_cleanup: true
24+
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
25+
on:
26+
branch: master
27+
local_dir: html

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ include_directories(
5151

5252
add_subdirectory(include)
5353

54+
# add a target to generate API documentation with Doxygen
55+
find_package(Doxygen)
56+
if(DOXYGEN_FOUND)
57+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf.in
58+
${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf @ONLY)
59+
add_custom_target(doc ${DOXYGEN_EXECUTABLE}
60+
${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf
61+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
62+
COMMENT "Running Doxygen" VERBATIM
63+
)
64+
endif(DOXYGEN_FOUND)
65+
5466
if(NDARRAY_TEST)
5567
enable_testing()
5668
add_subdirectory(tests)

README renamed to README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1+
ndarray: NumPy-friendly multidimensional arrays in C++
2+
======================================================
3+
[![Build Status](https://travis-ci.org/ndarray/ndarray.svg?branch=master)](https://travis-ci.org/ndarray/ndarray)
4+
15
ndarray is a template library that provides multidimensional array
26
objects in C++, with an interface and features designed to mimic the
37
Python 'numpy' package as much as possible.
48

5-
More information can be found in the Doxygen-generated documentation
9+
More information can be found in the [documentation at
10+
ndarray.github.io/ndarray](http://ndarray.github.io/ndarray/).
11+
612
(which is unhelpfully not built automatically at present...read
713
ndarray.h instead).
814

915

10-
BUILDING FROM GIT
16+
Building from Git
17+
-----------------
1118

1219
ndarray includes the Boost.NumPy library using git's "submodules"
1320
feature. When you clone the ndarray repository with git, you'll get
@@ -34,11 +41,12 @@ build with cmake, do:
3441
make
3542

3643

37-
BUILDING FROM COMPRESSED SOURCE
44+
Building from Compressed Source
45+
-------------------------------
3846

3947
GitHub's automatically generated tarballs and zip files don't include
4048
the Boost.NumPy submodule or the git metadata needed to run "git
4149
submodule", so these features can't be used to download ndarray.
4250

4351
When we post release downloads, however, we'll include the Boost.NumPy
44-
source so they can be built directly.
52+
source so they can be built directly.

0 commit comments

Comments
 (0)