[arrayfire] 49/61: CMake generates the list of examples
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Dec 8 11:55:10 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch dfsg-clean
in repository arrayfire.
commit 0dce77c9238b15790b6cbffe7a8410603fce71d3
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date: Thu Dec 3 16:44:24 2015 -0500
CMake generates the list of examples
* Before we had to manually add each example to arrayfire.h
* Now, CMake generates a list and creates docs/detail/examples.dox
---
.gitignore | 1 +
CMakeModules/examples.dox.in | 3 +++
docs/CMakeLists.txt | 25 ++++++++++++++++++++++
include/arrayfire.h | 51 --------------------------------------------
4 files changed, 29 insertions(+), 51 deletions(-)
diff --git a/.gitignore b/.gitignore
index 95a58ae..75fa897 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@ GRTAGS
GPATH
.dir-locals.el
include/af/version.h
+docs/details/examples.dox
diff --git a/CMakeModules/examples.dox.in b/CMakeModules/examples.dox.in
new file mode 100644
index 0000000..dfad2db
--- /dev/null
+++ b/CMakeModules/examples.dox.in
@@ -0,0 +1,3 @@
+/**
+ at EXAMPLES_LIST@
+*/
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index fbc02e1..b425657 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -18,6 +18,31 @@ SET(SNIPPETS_DIR "${CMAKE_SOURCE_DIR}/test")
CONFIGURE_FILE(${AF_DOCS_CONFIG} ${AF_DOCS_CONFIG_OUT})
CONFIGURE_FILE(${AF_DOCS_LAYOUT} ${AF_DOCS_LAYOUT_OUT})
+###########################################################
+## This generates a list of the examples cpp files and
+## creates a dox file under docs/details/examples.dox
+## This is used to generate documentation for examples
+###########################################################
+FILE(GLOB EXAMPLES_CPP
+ "${EXAMPLES_DIR}/*/*.cpp")
+
+# Sort alphabetically
+# Note: example directories will be major sort order
+LIST(SORT EXAMPLES_CPP)
+
+# Get filenames and write to a string
+FOREACH(SRC ${EXAMPLES_CPP})
+ GET_FILENAME_COMPONENT(SRC_NAME ${SRC} NAME)
+ SET(EXAMPLES_LIST "${EXAMPLES_LIST}\\example ${SRC_NAME}\n")
+ENDFOREACH(SRC ${EXAMPLES_CPP})
+
+# Write string containing file names to examples.dox
+CONFIGURE_FILE(
+ ${CMAKE_MODULE_PATH}/examples.dox.in
+ ${DOCS_DIR}/details/examples.dox
+)
+###########################################################
+
ADD_CUSTOM_TARGET(docs
ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${AF_DOCS_CONFIG_OUT}
diff --git a/include/arrayfire.h b/include/arrayfire.h
index e4ac1bb..7d9e75a 100644
--- a/include/arrayfire.h
+++ b/include/arrayfire.h
@@ -240,57 +240,6 @@
*/
-/**
-\example matching.cpp
-\example fast.cpp
-\example harris.cpp
-\example susan.cpp
-\example logistic_regression.cpp
-\example rbm.cpp
-\example perceptron.cpp
-\example neural_network.cpp
-\example bagging.cpp
-\example naive_bayes.cpp
-\example deep_belief_net.cpp
-\example kmeans.cpp
-\example softmax_regression.cpp
-\example knn.cpp
-\example monte_carlo_options.cpp
-\example heston_model.cpp
-\example black_scholes_options.cpp
-\example blas.cpp
-\example fft.cpp
-\example pi.cpp
-\example svd.cpp
-\example cholesky.cpp
-\example qr.cpp
-\example lu.cpp
-\example conway.cpp
-\example histogram.cpp
-\example fractal.cpp
-\example plot2d.cpp
-\example plot3.cpp
-\example surface.cpp
-\example conway_pretty.cpp
-\example basic.cpp
-\example helloworld.cpp
-\example vectorize.cpp
-\example integer.cpp
-\example convolve.cpp
-\example rainfall.cpp
-\example swe.cpp
-\example morphing.cpp
-\example image_demo.cpp
-\example brain_segmentation.cpp
-\example pyramids.cpp
-\example binary_thresholding.cpp
-\example optical_flow.cpp
-\example adaptive_thresholding.cpp
-\example image_editing.cpp
-\example edge.cpp
-\example filters.cpp
-*/
-
#include "af/compatible.h"
#include "af/algorithm.h"
#include "af/arith.h"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git
More information about the debian-science-commits
mailing list