From 20f329a7a38cd02586ef305d551d288ebcf39501 Mon Sep 17 00:00:00 2001 From: "Daniel M. Pelt" Date: Wed, 4 Mar 2015 13:44:03 +0100 Subject: Also clean up generated Cython files during `make clean` --- build/linux/Makefile.in | 2 ++ 1 file changed, 2 insertions(+) (limited to 'build/linux') diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index cd5e74b..92697b2 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -303,6 +303,8 @@ clean: rm -f $(TEST_OBJECTS) test.bin rm -fr ../../python/finalbuild/ rm -fr ../../python/build/ + rm -f ../../python/astra/*.cpp + rm -f ../../python/astra/*.c distclean: clean rm -f config.guess config.sub ltmain.sh libtool install-sh -- cgit v1.2.3 From 8a1001f236cc0d31d24c250e6eb1f0cd1c419ebc Mon Sep 17 00:00:00 2001 From: "Daniel M. Pelt" Date: Thu, 5 Mar 2015 12:22:52 +0100 Subject: Force clang to use libstdc++ on OSX (fixes Cython compilation) --- build/linux/Makefile.in | 2 ++ build/linux/configure.ac | 13 +++++++++++++ 2 files changed, 15 insertions(+) (limited to 'build/linux') diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index 92697b2..2d62a17 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -32,6 +32,8 @@ CXXFLAGS+=-g -O3 -Wall -Wshadow LIBS+=-lpthread LDFLAGS+=-g +CPPFLAGS+=@CPPFLAGS_OS@ + ifeq ($(cuda),yes) CPPFLAGS += @CPPFLAGS_CUDA@ -DASTRA_CUDA NVCCFLAGS = @NVCCFLAGS@ @CPPFLAGS_CUDA@ -I../.. -I../../include -DASTRA_CUDA diff --git a/build/linux/configure.ac b/build/linux/configure.ac index b97a7a0..129079c 100644 --- a/build/linux/configure.ac +++ b/build/linux/configure.ac @@ -208,6 +208,19 @@ fi AC_SUBST(HAVEPYTHON) +#OS specific setup +AC_CANONICAL_HOST +case $host_os in + darwin* ) + CPPFLAGS_OS="-stdlib=libstdc++ -mmacosx-version-min=10.6" + ;; + *) + CPPFLAGS_OS="" + ;; +esac + +AC_SUBST(CPPFLAGS_OS) + # TODO: -- cgit v1.2.3 From c58a0f821cf494741e039d4b56aabb7a9ffe85bf Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 6 Mar 2015 21:23:19 +0100 Subject: Make boost-unit-test-framework optional in configure --- build/linux/Makefile.in | 10 +++++++++- build/linux/configure.ac | 7 ++++++- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'build/linux') diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index 2d62a17..f647299 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -1,6 +1,7 @@ cuda=@HAVECUDA@ matlab=@HAVEMATLAB@ python=@HAVEPYTHON@ +boostutf=@HAVEBOOSTUTF@ MATLAB_ROOT=@MATLAB_ROOT@ @@ -59,6 +60,8 @@ endif BOOST_CPPFLAGS= BOOST_LDFLAGS= +BOOSTUTF_LIBS=@LIBS_BOOSTUTF@ + CPPFLAGS+=$(BOOST_CPPFLAGS) LDFLAGS+=$(BOOST_LDFLAGS) @@ -290,11 +293,16 @@ ifeq ($(cuda),yes) @rm -f $(*F).linkinfo endif +ifeq ($(boostutf),yes) test.bin: $(ALL_OBJECTS) $(TEST_OBJECTS) - ./libtool --mode=link $(LD) -o $@ $(LDFLAGS) $(LIBS) $+ -lboost_unit_test_framework + ./libtool --mode=link $(LD) -o $@ $(LDFLAGS) $+ $(LIBS) $(BOOSTUTF_LIBS) test: test.bin ./test.bin +else +test: + @echo "Tests have been disabled by configure" +endif clean: rm -f $(MATLAB_MEX) libastra.la diff --git a/build/linux/configure.ac b/build/linux/configure.ac index 129079c..6558445 100644 --- a/build/linux/configure.ac +++ b/build/linux/configure.ac @@ -53,20 +53,25 @@ AC_CHECK_HEADER(iostream, , AC_MSG_ERROR([No working c++ compiler found])) AC_MSG_CHECKING([for boost-unit-test-framework]) ASTRA_CHECK_BOOST_UNIT_TEST_FRAMEWORK(-lboost_unit_test_framework-mt, BOOSTUTF=yes_mt, BOOSTUTF=no) +HAVEBOOSTUTF=no if test x$BOOSTUTF = xno; then ASTRA_CHECK_BOOST_UNIT_TEST_FRAMEWORK(-lboost_unit_test_framework, BOOSTUTF=yes, BOOSTUTF=no) if test x$BOOSTUTF = xno; then AC_MSG_RESULT(no) - AC_MSG_ERROR([No boost-unit-test-framework library found]) else AC_MSG_RESULT([yes, libboost_unit_test_framework]) LIBS_BOOSTUTF="-lboost_unit_test_framework" + HAVEBOOSTUTF=yes fi else AC_MSG_RESULT([yes, libboost_unit_test_framework-mt]) LIBS_BOOSTUTF="-lboost_unit_test_framework-mt" + HAVEBOOSTUTF=yes fi +AC_SUBST(HAVEBOOSTUTF) +AC_SUBST(LIBS_BOOSTUTF) + # nvcc, cuda -- cgit v1.2.3 From 475b1746c133b0286871b7414918704557f1abcc Mon Sep 17 00:00:00 2001 From: "Daniel M. Pelt" Date: Mon, 9 Mar 2015 15:53:07 +0100 Subject: Remove old Logging code (only used in fft.cu) --- build/linux/Makefile.in | 1 - 1 file changed, 1 deletion(-) (limited to 'build/linux') diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index 92697b2..d9ff045 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -118,7 +118,6 @@ BASE_OBJECTS=\ src/Fourier.lo \ src/GeometryUtil3D.lo \ src/Globals.lo \ - src/Logger.lo \ src/ParallelBeamBlobKernelProjector2D.lo \ src/ParallelBeamLinearKernelProjector2D.lo \ src/ParallelBeamLineKernelProjector2D.lo \ -- cgit v1.2.3 From 30208e988315c8f576da6848cdc3236413c0cd10 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Mon, 9 Mar 2015 18:12:37 +0100 Subject: Add check for required boost headers --- build/linux/configure.ac | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'build/linux') diff --git a/build/linux/configure.ac b/build/linux/configure.ac index 6558445..d9e1f1a 100644 --- a/build/linux/configure.ac +++ b/build/linux/configure.ac @@ -72,6 +72,17 @@ fi AC_SUBST(HAVEBOOSTUTF) AC_SUBST(LIBS_BOOSTUTF) +BOOSTok=yes +AC_CHECK_HEADER([boost/lexical_cast.hpp],[],[BOOSTok=no],[]) +AC_CHECK_HEADER([boost/any.hpp],[],[BOOSTok=no],[]) +dnl AC_CHECK_HEADER([boost/thread.hpp],[],[BOOSTok=no],[]) +dnl AC_CHECK_HEADER([boost/bind.hpp],[],[BOOSTok=no],[]) +AC_CHECK_HEADER([boost/static_assert.hpp],[],[BOOSTok=no],[]) +AC_CHECK_HEADER([boost/throw_exception.hpp],[],[BOOSTok=no],[]) + +if test x$BOOSTok = xno; then + AC_MSG_ERROR([boost not found]) +fi # nvcc, cuda -- cgit v1.2.3 From a1dff91d7d8db49ecd79dfbcc6a6a663b114f9fd Mon Sep 17 00:00:00 2001 From: "Daniel M. Pelt" Date: Mon, 9 Mar 2015 17:51:42 +0100 Subject: Adds new logging capabilities (based on clog.h) --- build/linux/Makefile.in | 1 + 1 file changed, 1 insertion(+) (limited to 'build/linux') diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index d9ff045..c2b9994 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -118,6 +118,7 @@ BASE_OBJECTS=\ src/Fourier.lo \ src/GeometryUtil3D.lo \ src/Globals.lo \ + src/Logging.lo \ src/ParallelBeamBlobKernelProjector2D.lo \ src/ParallelBeamLinearKernelProjector2D.lo \ src/ParallelBeamLineKernelProjector2D.lo \ -- cgit v1.2.3 From e4614cf09b90cc9a0e38d370bb090a11f3877b33 Mon Sep 17 00:00:00 2001 From: "Daniel M. Pelt" Date: Fri, 13 Mar 2015 14:21:53 +0100 Subject: Add logging support to Matlab --- build/linux/Makefile.in | 1 + 1 file changed, 1 insertion(+) (limited to 'build/linux') diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index c2b9994..f862114 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -225,6 +225,7 @@ MATLAB_MEX=\ matlab/mex/astra_mex_matrix_c.$(MEXSUFFIX) \ matlab/mex/astra_mex_projector_c.$(MEXSUFFIX) \ matlab/mex/astra_mex_projector3d_c.$(MEXSUFFIX) \ + matlab/mex/astra_mex_log_c.$(MEXSUFFIX) \ matlab/mex/astra_mex_data3d_c.$(MEXSUFFIX) -- cgit v1.2.3 From f21700e00e81538d5510973a51b8ae97fb4a24dd Mon Sep 17 00:00:00 2001 From: "Daniel M. Pelt" Date: Fri, 13 Mar 2015 17:12:42 +0100 Subject: Enable logging to Matlab window using callback function Also introduces a mex initialize function that is called at the first invocation of any mex method. --- build/linux/Makefile.in | 1 + 1 file changed, 1 insertion(+) (limited to 'build/linux') diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index f862114..49220df 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -216,6 +216,7 @@ TEST_OBJECTS=\ MATLAB_CXX_OBJECTS=\ matlab/mex/mexHelpFunctions.o \ matlab/mex/mexCopyDataHelpFunctions.o \ + matlab/mex/mexInitFunctions.o \ matlab/mex/mexDataManagerHelpFunctions.o MATLAB_MEX=\ -- cgit v1.2.3