浏览代码

Do not build examples if user did not ask for it. Thanks bicatali for the patch.

Samuel Thibault 12 年之前
父节点
当前提交
b0e78ad674
共有 6 个文件被更改,包括 21 次插入4 次删除
  1. 2 0
      Makefile.am
  2. 5 0
      configure.ac
  3. 3 0
      doc/chapters/configuration.texi
  4. 4 1
      gcc-plugin/Makefile.am
  5. 2 1
      mpi/Makefile.am
  6. 5 2
      starpufft/Makefile.am

+ 2 - 0
Makefile.am

@@ -28,7 +28,9 @@ if BUILD_SOCL
 SUBDIRS += socl
 endif
 
+if BUILD_EXAMPLES
 SUBDIRS += examples
+endif
 
 if BUILD_GCC_PLUGIN
 SUBDIRS += gcc-plugin

+ 5 - 0
configure.ac

@@ -1398,6 +1398,11 @@ fi
 #                                                                             #
 ###############################################################################
 
+AC_ARG_ENABLE(build-examples, [AS_HELP_STRING([--enable-build-examples],
+			[enable building of examples])],
+			enable_build_examples=$enableval, enable_build_examples=no)
+# check stuff for examples (todo)
+AM_CONDITIONAL(BUILD_EXAMPLES, [test x$enable_build_examples != xno])
 AC_ARG_ENABLE(opengl-render, [AS_HELP_STRING([--enable-opengl-render],
 			[enable OpenGL rendering of some examples])],
 			enable_opengl_render=$enableval, enable_opengl_render=no)

+ 3 - 0
doc/chapters/configuration.texi

@@ -226,6 +226,9 @@ that the
 @url{http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/,
 MKL website} provides a script to determine the linking flags.
 
+@item --disable-build-examples
+Disable the build of examples.
+
 @end table
 
 @node Execution configuration through environment variables

+ 4 - 1
gcc-plugin/Makefile.am

@@ -13,7 +13,10 @@
 #
 # See the GNU Lesser General Public License in COPYING.LGPL for more details.
 
-SUBDIRS = src tests examples
+SUBDIRS = src tests
+if BUILD_EXAMPLES
+SUBDIRS += examples
+endif
 
 EXTRA_DIST = COPYING README ChangeLog
 

+ 2 - 1
mpi/Makefile.am

@@ -94,7 +94,7 @@ libstarpumpi_@STARPU_EFFECTIVE_VERSION@_la_SOURCES =	\
 ###################
 # Stencil example #
 ###################
-
+if BUILD_EXAMPLES
 examplebin_PROGRAMS +=				\
 	examples/stencil/stencil5
 
@@ -219,6 +219,7 @@ examples_complex_mpi_complex_LDADD =		\
 
 check_PROGRAMS	+=	\
 	examples/complex/mpi_complex
+endif
 
 ########################
 # Unit testcases       #

+ 5 - 2
starpufft/Makefile.am

@@ -67,10 +67,13 @@ libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_LIBADD +=  $(STARPU_CUDA_LDFLAGS)
 endif
 
 examplebindir = $(libdir)/starpu/examples/starpufft
-examplebin_PROGRAMS =				\
+
+examplebin_PROGRAMS =
+if BUILD_EXAMPLES
+examplebin_PROGRAMS +=				\
 	examples/testf \
 	examples/test
-
+endif
 check_PROGRAMS = examples/testf
 examples_testf_LDADD = libstarpufft-@STARPU_EFFECTIVE_VERSION@.la $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la $(FFTWF_LIBS)