Skip to content

Commit

Permalink
Added zlib to build for Linux CI; fixed headers/updated cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Knute Lingaard authored and Knute Lingaard committed Jan 31, 2023
1 parent ec31683 commit be283f7
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ zip_keys:
- cxx_compiler_version
- - python
- numpy
zlib:
- '1.2'
2 changes: 2 additions & 0 deletions .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ zip_keys:
- cxx_compiler_version
- - python
- numpy
zlib:
- '1.2'
1 change: 1 addition & 0 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ requirements:
- hdf5
- python
- rapidjson
- zlib
run:
- matplotlib-base
- numpy
Expand Down
7 changes: 6 additions & 1 deletion sparta/cmake/sparta-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sparta/src/AsyncNonTimeseriesReport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <cstdint>

//SQLite-specific headers
#include "zlib.h"
#include <zlib.h>

namespace sparta {
namespace async {
Expand Down
2 changes: 1 addition & 1 deletion sparta/src/AsyncTimeseriesReport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "sparta/async/AsyncTimeseriesReport.hpp"

//SQLite-specific headers
#include "zlib.h"
#include <zlib.h>

//! Compress buffered SI values and write them to the database.
//! This is called on a background thread.
Expand Down
6 changes: 3 additions & 3 deletions sparta/src/Report.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
#include <string>
#include <filesystem>

//SQLite-specific headers
#include <zlib.h>

#include "sparta/parsers/YAMLTreeEventHandler.hpp"
#include "sparta/utils/Printing.hpp"

Expand All @@ -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<YAMLTreeEventHandler::node_uid_t, TreeNode*> parent_node_info_t;
Expand Down
2 changes: 1 addition & 1 deletion sparta/src/ReportTimeseries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <iostream>
#include <string>
#include <utility>
#include <zlib.h>

#include "sparta/report/db/ReportHeader.hpp"
#include "sparta/report/db/Schema.hpp"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion sparta/src/SingleUpdateReport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

#include <cassert>
#include <utility>
#include <zlib.h>

#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"

Expand Down

0 comments on commit be283f7

Please sign in to comment.