diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c101fd..2d8dfbc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR) -project(libpressio VERSION "0.29.1" LANGUAGES CXX C) +project(libpressio VERSION "0.30.0" LANGUAGES CXX C) #correct was to set a default build type # https://blog.kitware.com/cmake-and-the-default-build-type/ @@ -135,9 +135,8 @@ if(LIBPRESSIO_HAS_MGARD) target_sources(libpressio PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/compressors/mgard_plugin.cc - ${CMAKE_CURRENT_SOURCE_DIR}/include/libpressio_ext/compressors/mgard.h ) - target_link_libraries(libpressio PUBLIC mgard::mgard) + target_link_libraries(libpressio PRIVATE mgard::mgard) endif() option(LIBPRESSIO_HAS_ZFP "build the ZFP plugin" OFF) @@ -147,9 +146,8 @@ if(LIBPRESSIO_HAS_ZFP) target_sources(libpressio PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/compressors/zfp_plugin.cc - ${CMAKE_CURRENT_SOURCE_DIR}/include/libpressio_ext/compressors/zfp.h ) - target_link_libraries(libpressio PUBLIC zfp::zfp) + target_link_libraries(libpressio PRIVATE zfp::zfp) endif() option(LIBPRESSIO_HAS_SZ "build the SZ plugin" OFF) @@ -162,9 +160,8 @@ if(LIBPRESSIO_HAS_SZ) target_sources(libpressio PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/compressors/sz_plugin.cc - ${CMAKE_CURRENT_SOURCE_DIR}/include/libpressio_ext/compressors/sz.h ) - target_link_libraries(libpressio PUBLIC SZ) + target_link_libraries(libpressio PRIVATE SZ) endif() option(LIBPRESSIO_HAS_BLOSC "build the BLOSC plugin" OFF) @@ -173,11 +170,10 @@ if(LIBPRESSIO_HAS_BLOSC) target_sources(libpressio PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/compressors/blosc_plugin.cc - ${CMAKE_CURRENT_SOURCE_DIR}/include/libpressio_ext/compressors/blosc.h ) pkg_search_module(BLOSC IMPORTED_TARGET GLOBAL blosc) if(BLOSC_FOUND) - target_link_libraries(libpressio PUBLIC PkgConfig::BLOSC) + target_link_libraries(libpressio PRIVATE PkgConfig::BLOSC) else() find_library(BLOSC_LIBRARIES blosc) find_file(BLOSC_INCLUDE_FILE blosc.h) @@ -185,8 +181,8 @@ if(LIBPRESSIO_HAS_BLOSC) message(FATAL_ERROR "Failed to find blosc and it was enabled") endif() get_filename_component(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_FILE} DIRECTORY) - target_link_libraries(libpressio PUBLIC ${BLOSC_LIBRARIES}) - target_include_directories(libpressio PUBLIC ${BLOSC_INCLUDE_DIRS}) + target_link_libraries(libpressio PRIVATE ${BLOSC_LIBRARIES}) + target_include_directories(libpressio PRIVATE ${BLOSC_INCLUDE_DIRS}) endif() @@ -204,7 +200,7 @@ if(LIBPRESSIO_HAS_MAGICK) ) message(STATUS "Checking for Magick::LongLong: ${LIBPRESSIO_COMPAT_HAS_IMAGEMAGICK_LONGLONG}") set(LIBPRESSIO_COMPRESSORS "${LIBPRESSIO_COMPRESSORS} magick") - target_link_libraries(libpressio PUBLIC PkgConfig::Magick++) + target_link_libraries(libpressio PRIVATE PkgConfig::Magick++) target_sources(libpressio PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/compressors/magick++.cc @@ -215,9 +211,9 @@ option(LIBPRESSIO_HAS_HDF "build the hdf5 io plugin" OFF) if(LIBPRESSIO_HAS_HDF) set(LIBPRESSIO_FEATURES "${LIBPRESSIO_FEATURES} hdf5") find_package(HDF5 REQUIRED COMPONENTS C) - target_link_libraries(libpressio PUBLIC ${HDF5_C_LIBRARIES}) - target_include_directories(libpressio PUBLIC ${HDF5_C_INCLUDE_DIRS}) - target_compile_definitions(libpressio PUBLIC ${HDF5_C_DEFINITIONS}) + target_link_libraries(libpressio PRIVATE ${HDF5_C_LIBRARIES}) + target_include_directories(libpressio PRIVATE ${HDF5_C_INCLUDE_DIRS}) + target_compile_definitions(libpressio PRIVATE ${HDF5_C_DEFINITIONS}) target_sources(libpressio PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/io/hdf5.cc @@ -233,7 +229,7 @@ if(LIBPRESSIO_HAS_FPZIP) PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/compressors/fpzip_plugin.cc ) -target_link_libraries(libpressio PUBLIC fpzip::fpzip) + target_link_libraries(libpressio PRIVATE fpzip::fpzip) endif() diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt index 300d75b..c374292 100644 --- a/COPYRIGHT.txt +++ b/COPYRIGHT.txt @@ -1,6 +1,6 @@ Copyright © 2020 , UChicago Argonne, LLC All Rights Reserved -[libpressio, Version 0.29.1] +[libpressio, Version 0.30.0] Robert Underwood Argonne National Laboratory diff --git a/README.md b/README.md index 19f0732..73638c9 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Here is a minimal example with error checking of how to use LibPressio: ```c #include -#include +#include // provides input function, found in ./test #include "make_input_data.h" diff --git a/include/libpressio_ext/compressors/blosc.h b/include/libpressio_ext/compressors/blosc.h deleted file mode 100644 index 747db06..0000000 --- a/include/libpressio_ext/compressors/blosc.h +++ /dev/null @@ -1,5 +0,0 @@ -/** - * \file - * \brief Includes definitions needed to use the BLOSC pressio compressor - */ -#include diff --git a/include/libpressio_ext/compressors/magick.h b/include/libpressio_ext/compressors/magick.h deleted file mode 100644 index e19612c..0000000 --- a/include/libpressio_ext/compressors/magick.h +++ /dev/null @@ -1,5 +0,0 @@ -/** - * \file - * \brief Includes definitions needed to use the ImageMagick pressio compressor - */ -#include diff --git a/include/libpressio_ext/compressors/mgard.h b/include/libpressio_ext/compressors/mgard.h deleted file mode 100644 index 0628432..0000000 --- a/include/libpressio_ext/compressors/mgard.h +++ /dev/null @@ -1,5 +0,0 @@ -/** - * \file - * \brief Includes definitions needed to use the MGRAD pressio compressor - * */ -#include diff --git a/include/libpressio_ext/compressors/sz.h b/include/libpressio_ext/compressors/sz.h deleted file mode 100644 index 0a1b1d3..0000000 --- a/include/libpressio_ext/compressors/sz.h +++ /dev/null @@ -1,4 +0,0 @@ -/** \file - * \brief Includes definitions needed to use the SZ pressio compressor - */ -#include diff --git a/include/libpressio_ext/compressors/zfp.h b/include/libpressio_ext/compressors/zfp.h deleted file mode 100644 index df85fd9..0000000 --- a/include/libpressio_ext/compressors/zfp.h +++ /dev/null @@ -1,4 +0,0 @@ -/** \file - * \brief Includes definitions needed to use the ZFP pressio compressor - */ -#include diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt index 0ba6407..dd1299e 100644 --- a/swig/CMakeLists.txt +++ b/swig/CMakeLists.txt @@ -16,7 +16,7 @@ if(SWIG_FOUND AND PYTHON3_FOUND) SOURCES ${ARGV} ) set_property(TARGET ${filelibname} PROPERTY SWIG_COMPILE_DEFINITIONS "SWIGWORDSIZE64") - target_link_libraries(${filelibname} PUBLIC libpressio Python3::Python Python3::NumPy) + target_link_libraries(${filelibname} PUBLIC SZ libpressio Python3::Python Python3::NumPy) target_include_directories(${filelibname} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) get_property(swig_generated_module TARGET ${filelibname} PROPERTY SWIG_SUPPORT_FILES) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3fec073..4987f89 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -48,32 +48,35 @@ if(LIBPRESSIO_HAS_SZ) target_include_directories(test_sz_plugin PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../include) add_executable(sz_basic sz_basic.c make_input_data.cc) - target_link_libraries(sz_basic libpressio) + target_link_libraries(sz_basic libpressio SZ) add_test(sz_basic_test sz_basic) add_executable(sz_cpp sz_cpp.cc make_input_data.cc) - target_link_libraries(sz_cpp libpressio) + target_link_libraries(sz_cpp libpressio SZ) add_test(sz_cpp_test sz_cpp) add_executable(metrics metrics.c make_input_data.cc) - target_link_libraries(metrics libpressio) + target_link_libraries(metrics libpressio SZ) add_test(metrics_test metrics) add_executable(test_external_helper test_external_helper.cc) add_executable(test_external test_external.cc make_input_data.cc) - target_link_libraries(test_external libpressio) - target_link_libraries(test_external_helper libpressio) + target_link_libraries(test_external libpressio SZ) + target_link_libraries(test_external_helper libpressio SZ) add_test(test_external test_external ${CMAKE_CURRENT_BINARY_DIR}/test_external_helper) add_gtest(test_register_metrics.cc make_input_data.cc) + target_link_libraries(test_register_metrics SZ) add_gtest(test_metrics_options.cc make_input_data.cc) + target_link_libraries(test_metrics_options SZ) add_gtest(test_register_compressor.cc make_input_data.cc) + target_link_libraries(test_register_compressor SZ) endif() if(LIBPRESSIO_HAS_ZFP) add_executable(zfp_basic zfp_basic.c make_input_data.cc) - target_link_libraries(zfp_basic libpressio) + target_link_libraries(zfp_basic libpressio zfp::zfp) add_test(zfp_basic_test zfp_basic) endif() diff --git a/test/full.c b/test/full.c index d5d50dc..23e1b8f 100644 --- a/test/full.c +++ b/test/full.c @@ -2,10 +2,11 @@ #include #include -#include +#include #include "make_input_data.h" + void print_all_options(struct pressio_options* options) { struct pressio_options_iter* iter = pressio_options_get_iter(options); while(pressio_options_iter_has_value(iter)) diff --git a/test/metrics.c b/test/metrics.c index 48ca603..424b582 100644 --- a/test/metrics.c +++ b/test/metrics.c @@ -1,5 +1,5 @@ #include -#include +#include #include "make_input_data.h" diff --git a/test/sz_basic.c b/test/sz_basic.c index 621f270..772d0ed 100644 --- a/test/sz_basic.c +++ b/test/sz_basic.c @@ -1,5 +1,5 @@ #include -#include +#include #include "make_input_data.h" diff --git a/test/sz_cpp.cc b/test/sz_cpp.cc index 99886dc..3f3ca0d 100644 --- a/test/sz_cpp.cc +++ b/test/sz_cpp.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "make_input_data.h" diff --git a/test/test_external.cc b/test/test_external.cc index f41bb77..83f23af 100644 --- a/test/test_external.cc +++ b/test/test_external.cc @@ -1,7 +1,7 @@ #include #include -#include #include +#include #include "make_input_data.h" diff --git a/test/test_metrics_options.cc b/test/test_metrics_options.cc index de79eab..4a4c7d1 100644 --- a/test/test_metrics_options.cc +++ b/test/test_metrics_options.cc @@ -1,14 +1,14 @@ -#include "gtest/gtest.h" +#include #include -#include "make_input_data.h" - #include +#include + #include "libpressio.h" #include "libpressio_ext/cpp/data.h" #include "libpressio_ext/cpp/metrics.h" #include "libpressio_ext/cpp/options.h" #include "libpressio_ext/cpp/pressio.h" -#include "libpressio_ext/compressors/sz.h" +#include "make_input_data.h" class hasoptoins_metric : public libpressio_metrics_plugin { diff --git a/test/test_register_compressor.cc b/test/test_register_compressor.cc index df1167b..e9f67c7 100644 --- a/test/test_register_compressor.cc +++ b/test/test_register_compressor.cc @@ -1,14 +1,14 @@ -#include "gtest/gtest.h" #include -#include "make_input_data.h" - #include +#include +#include + #include "libpressio_ext/cpp/data.h" #include "libpressio_ext/cpp/compressor.h" #include "libpressio_ext/cpp/options.h" #include "libpressio_ext/cpp/pressio.h" -#include "libpressio_ext/compressors/sz.h" #include "libpressio_ext/compat/std_compat.h" +#include "make_input_data.h" namespace { struct log_fn{ diff --git a/test/test_register_metrics.cc b/test/test_register_metrics.cc index e7d2569..eb5160c 100644 --- a/test/test_register_metrics.cc +++ b/test/test_register_metrics.cc @@ -1,13 +1,13 @@ -#include "gtest/gtest.h" +#include #include -#include "make_input_data.h" - #include +#include + #include "libpressio_ext/cpp/data.h" #include "libpressio_ext/cpp/metrics.h" #include "libpressio_ext/cpp/options.h" #include "libpressio_ext/cpp/pressio.h" -#include "libpressio_ext/compressors/sz.h" +#include "make_input_data.h" class counting_metric: public libpressio_metrics_plugin { public: diff --git a/test/zfp_basic.c b/test/zfp_basic.c index 1dca452..90bc45b 100644 --- a/test/zfp_basic.c +++ b/test/zfp_basic.c @@ -1,6 +1,6 @@ #include #include -#include +#include #include "make_input_data.h"