1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-09 23:45:36 +00:00

Protect vs. missing LIME libarary

This commit is contained in:
Peter Boyle 2024-06-11 11:08:00 -04:00
parent 07a07b6fa3
commit 284fc05f15
2 changed files with 4 additions and 0 deletions

View File

@ -30,11 +30,13 @@ directory
#include <string> #include <string>
template <class T> void readFile(T& out, std::string const fname){ template <class T> void readFile(T& out, std::string const fname){
#ifdef HAVE_LIME
Grid::emptyUserRecord record; Grid::emptyUserRecord record;
Grid::ScidacReader RD; Grid::ScidacReader RD;
RD.open(fname); RD.open(fname);
RD.readScidacFieldRecord(out,record); RD.readScidacFieldRecord(out,record);
RD.close(); RD.close();
#endif
} }

View File

@ -31,11 +31,13 @@ directory
NAMESPACE_BEGIN(Grid); NAMESPACE_BEGIN(Grid);
template <class T> void writeFile(T& out, std::string const fname){ template <class T> void writeFile(T& out, std::string const fname){
#ifdef HAVE_LIME
emptyUserRecord record; emptyUserRecord record;
ScidacWriter WR(out.Grid()->IsBoss()); ScidacWriter WR(out.Grid()->IsBoss());
WR.open(fname); WR.open(fname);
WR.writeScidacFieldRecord(out,record,0,Grid::BinaryIO::BINARYIO_LEXICOGRAPHIC); WR.writeScidacFieldRecord(out,record,0,Grid::BinaryIO::BINARYIO_LEXICOGRAPHIC);
WR.close(); WR.close();
#endif
} }
NAMESPACE_END(Grid); NAMESPACE_END(Grid);
int main(int argc, char **argv) { int main(int argc, char **argv) {