File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,19 @@ else(APPLE)
5
5
set (CORE_EXTRA_SRCS "" )
6
6
endif (APPLE )
7
7
8
+ if (NOT DEFINED WITHOUT_SUPERTIMESTREAM)
9
+ set (WITHOUT_SUPERTIMESTREAM FALSE CACHE BOOL "Build G3SuperTimestream class" )
10
+ endif ()
11
+ if (NOT WITHOUT_SUPERTIMESTREAM)
12
+ set (CORE_EXTRA_SRCS ${CORE_EXTRA_SRCS} src/G3SuperTimestream.cxx)
13
+ endif ()
14
+
8
15
add_spt3g_library(core SHARED
9
16
src/G3EventBuilder.cxx src/G3Frame.cxx src/G3TimeStamp.cxx
10
17
src/G3Pipeline.cxx src/G3Writer.cxx src/G3Reader.cxx
11
18
src/G3InfiniteSource.cxx src/G3Logging.cxx src/G3PrintfLogger.cxx
12
19
src/G3Data.cxx src/G3Vector.cxx src/G3Map.cxx src/G3Timestream.cxx
13
- src/G3Timesample.cxx src/G3SuperTimestream.cxx
20
+ src/G3Timesample.cxx
14
21
src/G3TriggeredBuilder.cxx src/G3MultiFileWriter.cxx src/dataio.cxx
15
22
src/compression.cxx src/crc32.c ${CORE_EXTRA_SRCS}
16
23
src/G3NetworkSender.cxx src/G3SyslogLogger.cxx
@@ -40,9 +47,13 @@ if(FLAC_FOUND)
40
47
target_link_libraries (core PRIVATE FLAC::FLAC)
41
48
endif ()
42
49
43
- find_package (OpenMP)
44
- if (OpenMP_FOUND)
45
- target_link_libraries (core PRIVATE OpenMP::OpenMP_CXX)
50
+ if (NOT WITHOUT_SUPERTIMESTREAM)
51
+ find_package (OpenMP QUIET )
52
+ if (OpenMP_FOUND)
53
+ target_link_libraries (core PRIVATE OpenMP::OpenMP_CXX)
54
+ endif ()
55
+
56
+ target_compile_definitions (core PRIVATE -DHAS_SUPERTIMESTREAM)
46
57
endif ()
47
58
48
59
# Link against Z library
Original file line number Diff line number Diff line change 1
1
#include < G3Frame.h>
2
2
#include < G3Data.h>
3
3
#include < G3Quat.h>
4
+ #ifdef HAS_SUPERTIMESTREAM
4
5
#include " G3SuperTimestream.h"
6
+ #endif
5
7
#include < serialization.h>
6
8
#include < pybindings.h>
7
9
@@ -360,10 +362,12 @@ void G3Frame::blob_decode(struct blob_container &blob)
360
362
cereal::PortableBinaryInputArchive item_ar (is);
361
363
item_ar >> make_nvp (" val" , ptr);
362
364
365
+ #ifdef HAS_SUPERTIMESTREAM
363
366
// Convert to public type
364
367
auto v = std::dynamic_pointer_cast<G3SuperTimestream>(ptr);
365
368
if (!!v)
366
369
ptr = std::make_shared<G3TimestreamMap>(*v);
370
+ #endif
367
371
368
372
blob.frameobject = ptr;
369
373
You can’t perform that action at this time.
0 commit comments