Skip to content

Commit 0832bef

Browse files
committed
Enable compiling without zlib
1 parent 8eb36a2 commit 0832bef

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: src/strucclustutils/GemmiWrapper.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
//
44
#include "GemmiWrapper.h"
55
#include "mmread.hpp"
6+
#ifdef HAVE_ZLIB
67
#include "gz.hpp"
8+
#endif
79
#include "input.hpp"
810
#include "foldcomp.h"
911
#include "cif.hpp"
@@ -70,7 +72,11 @@ bool GemmiWrapper::load(std::string & filename){
7072
return loadFoldcompStructure(in, filename);
7173
}
7274
try {
75+
#ifdef HAVE_ZLIB
7376
gemmi::MaybeGzipped infile(filename);
77+
#else
78+
gemmi::BasicInput infile(filename);
79+
#endif
7480
gemmi::CoorFormat format = gemmi::coor_format_from_ext(infile.basepath());
7581
gemmi::Structure st;
7682
std::unordered_map<std::string, int> entity_to_tax_id;
@@ -116,7 +122,11 @@ bool GemmiWrapper::loadFromBuffer(const char * buffer, size_t bufferSize, const
116122
return loadFoldcompStructure(istr, name);
117123
}
118124
try {
125+
#ifdef HAVE_ZLIB
119126
gemmi::MaybeGzipped infile(name);
127+
#else
128+
gemmi::BasicInput infile(name);
129+
#endif
120130
gemmi::CoorFormat format = gemmi::coor_format_from_ext(infile.basepath());
121131
gemmi::Structure st;
122132
std::unordered_map<std::string, int> entity_to_tax_id;

0 commit comments

Comments
 (0)