aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-03-03 16:34:14 +0100
committerThomas White <taw@physics.org>2022-03-07 16:05:11 +0100
commit19b57c06602e1fded39c1ad6234104d6d6e63114 (patch)
treef6c1b1dcbfb25b2c0c977196682450ea54b23188
parentc062c1a763288f964d466e3d48531211ebad0669 (diff)
Move time-accounts to libcrystfel
-rw-r--r--CMakeLists.txt3
-rw-r--r--libcrystfel/CMakeLists.txt1
-rw-r--r--libcrystfel/libcrystfel-config.h.cmake.in1
-rw-r--r--libcrystfel/libcrystfel-config.h.meson.in1
-rw-r--r--libcrystfel/meson.build1
-rw-r--r--libcrystfel/src/time-accounts.c (renamed from src/time-accounts.c)4
-rw-r--r--libcrystfel/src/time-accounts.h (renamed from src/time-accounts.h)4
-rw-r--r--meson.build2
-rw-r--r--src/process_image.c2
9 files changed, 8 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 965c7119..75783bf8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -245,8 +245,7 @@ list(APPEND CRYSTFEL_EXECUTABLES list_events)
# ----------------------------------------------------------------------
# indexamajig
-set(INDEXAMAJIG_SOURCES src/indexamajig.c src/im-sandbox.c src/process_image.c
- src/time-accounts.c)
+set(INDEXAMAJIG_SOURCES src/indexamajig.c src/im-sandbox.c src/process_image.c)
if ( ZMQ_FOUND )
list(APPEND INDEXAMAJIG_SOURCES src/im-zmq.c)
diff --git a/libcrystfel/CMakeLists.txt b/libcrystfel/CMakeLists.txt
index 69668a8c..9aca17d8 100644
--- a/libcrystfel/CMakeLists.txt
+++ b/libcrystfel/CMakeLists.txt
@@ -62,6 +62,7 @@ set(LIBCRYSTFEL_SOURCES
src/image-hdf5.c
src/fom.c
src/image-msgpack.c
+ src/time-accounts.c
${BISON_symopp_OUTPUTS}
${FLEX_symopl_OUTPUTS}
src/indexers/dirax.c
diff --git a/libcrystfel/libcrystfel-config.h.cmake.in b/libcrystfel/libcrystfel-config.h.cmake.in
index 69fd7397..31f28ee1 100644
--- a/libcrystfel/libcrystfel-config.h.cmake.in
+++ b/libcrystfel/libcrystfel-config.h.cmake.in
@@ -10,6 +10,7 @@
#cmakedefine HAVE_GDKPIXBUF
#cmakedefine HAVE_LIBCCP4
#cmakedefine HAVE_MSGPACK
+#cmakedefine HAVE_CLOCK_GETTIME
#cmakedefine HAVE_FORKPTY_PTY_H
#cmakedefine HAVE_FORKPTY_UTIL_H
diff --git a/libcrystfel/libcrystfel-config.h.meson.in b/libcrystfel/libcrystfel-config.h.meson.in
index 01f6940e..6796857e 100644
--- a/libcrystfel/libcrystfel-config.h.meson.in
+++ b/libcrystfel/libcrystfel-config.h.meson.in
@@ -8,6 +8,7 @@
#mesondefine HAVE_GZBUFFER
#mesondefine HAVE_LIBCCP4
#mesondefine HAVE_MSGPACK
+#mesondefine HAVE_CLOCK_GETTIME
#mesondefine HAVE_FORKPTY_PTY_H
#mesondefine HAVE_FORKPTY_UTIL_H
diff --git a/libcrystfel/meson.build b/libcrystfel/meson.build
index 5b10ce14..2772ab12 100644
--- a/libcrystfel/meson.build
+++ b/libcrystfel/meson.build
@@ -121,6 +121,7 @@ libcrystfel_sources = ['src/image.c',
'src/colscale.c',
'src/detgeom.c',
'src/fom.c',
+ 'src/time-accounts.c',
'src/image-cbf.c',
'src/image-hdf5.c',
'src/image-msgpack.c',
diff --git a/src/time-accounts.c b/libcrystfel/src/time-accounts.c
index 63ac5b50..773debeb 100644
--- a/src/time-accounts.c
+++ b/libcrystfel/src/time-accounts.c
@@ -26,9 +26,7 @@
*
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include <libcrystfel-config.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/src/time-accounts.h b/libcrystfel/src/time-accounts.h
index d08da573..56b44fa6 100644
--- a/src/time-accounts.h
+++ b/libcrystfel/src/time-accounts.h
@@ -29,10 +29,6 @@
#ifndef TIME_ACCOUNTS_H
#define TIME_ACCOUNTS_H
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
enum timeaccount
{
TACC_NOTHING,
diff --git a/meson.build b/meson.build
index c796411f..9e9a6985 100644
--- a/meson.build
+++ b/meson.build
@@ -172,7 +172,7 @@ executable('whirligig',
# indexamajig
indexamajig_sources = ['src/indexamajig.c', 'src/im-sandbox.c',
- 'src/process_image.c', 'src/time-accounts.c',
+ 'src/process_image.c',
versionc]
if zmqdep.found()
indexamajig_sources += ['src/im-zmq.c']
diff --git a/src/process_image.c b/src/process_image.c
index 1919aa14..35bd5e31 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -50,12 +50,12 @@
#include <integration.h>
#include <detgeom.h>
#include <image-msgpack.h>
+#include <time-accounts.h>
#include "process_image.h"
#include "predict-refine.h"
#include "im-sandbox.h"
#include "im-zmq.h"
-#include "time-accounts.h"
static float **backup_image_data(float **dp, struct detgeom *det)
{