diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 94cb8b4962..6acf309cfd 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -43,3 +43,5 @@ zip_keys: - cxx_compiler_version - - python - numpy +zlib: +- '1.2' diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 0ada0d9074..66b5d048d9 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -41,3 +41,5 @@ zip_keys: - cxx_compiler_version - - python - numpy +zlib: +- '1.2' diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 0f52e4d537..1bc44f1b61 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -57,6 +57,7 @@ requirements: - hdf5 - python - rapidjson + - zlib run: - matplotlib-base - numpy diff --git a/sparta/cmake/sparta-config.cmake b/sparta/cmake/sparta-config.cmake index 5a086e4793..c5d1ba3e00 100644 --- a/sparta/cmake/sparta-config.cmake +++ b/sparta/cmake/sparta-config.cmake @@ -70,13 +70,18 @@ message (STATUS "Using RapidJSON CPP ${RapidJSON_VERSION}") find_package (SQLite3 3.19 REQUIRED) message (STATUS "Using SQLite3 ${SQLite3_VERSION}") +# Find zlib +find_package(ZLIB REQUIRED) +message (STATUS "Using zlib ${ZLIB_VERSION_STRING}") +include_directories(SYSTEM ${ZLIB_INCLUDE_DIRS}) + # Find HDF5. Need to enable C language for HDF5 testing enable_language (C) find_package (HDF5 1.10 REQUIRED) # Populate the Sparta_LIBS variable with the required libraries for # basic Sparta linking -set (Sparta_LIBS sparta simdb ${HDF5_LIBRARIES} sqlite3 yaml-cpp z pthread +set (Sparta_LIBS sparta simdb ${HDF5_LIBRARIES} sqlite3 yaml-cpp ZLIB::ZLIB pthread Boost::date_time Boost::iostreams Boost::serialization Boost::timer Boost::program_options) # On Linux we need to link against rt as well diff --git a/sparta/src/AsyncNonTimeseriesReport.cpp b/sparta/src/AsyncNonTimeseriesReport.cpp index f42b5b4257..bea472332b 100644 --- a/sparta/src/AsyncNonTimeseriesReport.cpp +++ b/sparta/src/AsyncNonTimeseriesReport.cpp @@ -5,7 +5,7 @@ #include //SQLite-specific headers -#include "zlib.h" +#include namespace sparta { namespace async { diff --git a/sparta/src/AsyncTimeseriesReport.cpp b/sparta/src/AsyncTimeseriesReport.cpp index 2529536955..33577c6f5a 100644 --- a/sparta/src/AsyncTimeseriesReport.cpp +++ b/sparta/src/AsyncTimeseriesReport.cpp @@ -3,7 +3,7 @@ #include "sparta/async/AsyncTimeseriesReport.hpp" //SQLite-specific headers -#include "zlib.h" +#include //! Compress buffered SI values and write them to the database. //! This is called on a background thread. diff --git a/sparta/src/Report.cpp b/sparta/src/Report.cpp index e34b1fbb42..f909daf32e 100644 --- a/sparta/src/Report.cpp +++ b/sparta/src/Report.cpp @@ -15,6 +15,9 @@ #include #include +//SQLite-specific headers +#include + #include "sparta/parsers/YAMLTreeEventHandler.hpp" #include "sparta/utils/Printing.hpp" @@ -39,9 +42,6 @@ #include "sparta/report/db/StatInstValueLookup.hpp" #include "sparta/report/db/DatabaseContextCounter.hpp" -//SQLite-specific headers -#include "zlib.h" - namespace sparta { typedef std::pair parent_node_info_t; diff --git a/sparta/src/ReportTimeseries.cpp b/sparta/src/ReportTimeseries.cpp index 786b7c9262..b71dbe72d4 100644 --- a/sparta/src/ReportTimeseries.cpp +++ b/sparta/src/ReportTimeseries.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include "sparta/report/db/ReportHeader.hpp" #include "sparta/report/db/Schema.hpp" @@ -22,7 +23,6 @@ #include "simdb/impl/sqlite/SQLiteConnProxy.hpp" //SQLite-specific headers #include "simdb/impl/sqlite/TransactionUtils.hpp" -#include "zlib.h" #include "simdb/Constraints.hpp" #include "simdb/DbConnProxy.hpp" #include "simdb/Errors.hpp" diff --git a/sparta/src/SingleUpdateReport.cpp b/sparta/src/SingleUpdateReport.cpp index 86c1adc26d..38ca014979 100644 --- a/sparta/src/SingleUpdateReport.cpp +++ b/sparta/src/SingleUpdateReport.cpp @@ -4,13 +4,13 @@ #include #include +#include #include "simdb/ObjectManager.hpp" #include "simdb/ObjectRef.hpp" #include "simdb/TableRef.hpp" #include "simdb/utils/ObjectQuery.hpp" #include "sparta/utils/SpartaException.hpp" -#include "zlib.h" #include "simdb/Constraints.hpp" #include "simdb/schema/ColumnTypedefs.hpp"