From cef3c7bfdefe6931fe1605fbf71e29f3a654b6f9 Mon Sep 17 00:00:00 2001 From: tugluk Date: Mon, 30 Sep 2019 12:54:16 -0400 Subject: [PATCH] Corrected CMAKE files!!! --- CMakeLists.txt | 22 +++++++++++----------- src/mgard_api.cpp | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a343d13f3a..325aeebfc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,6 @@ cmake_minimum_required(VERSION 3.6) + if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) message(FATAL_ERROR "In-source builds are not supported. Please create a build directory " @@ -65,22 +66,21 @@ endif() # Dependencies find_package(ZLIB REQUIRED) -find_package(BLOSC REQUIRED) + # Set library add_library(mgard src/mgard.cpp include/mgard.h - src/mgard_capi.cpp include/mgard_capi.h + src/mgard_api.cpp include/mgard_api.h src/mgard_nuni.cpp include/mgard_nuni.h ) target_include_directories(mgard PUBLIC $ - $ $ ) -target_link_libraries(mgard PRIVATE ZLIB::ZLIB) -target_link_libraries(mgard PRIVATE ${BLOSC_LIBRARIES}) +target_link_libraries(mgard PRIVATE ZLIB::ZLIB ${CMAKE_DL_LIBS}) + # Make sure we require C++11. Use meta-compile features if available, # otherwise use specific language features @@ -105,7 +105,7 @@ install( install( FILES include/mgard.h - include/mgard_capi.h + include/mgard_api.h include/mgard_nuni.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) @@ -114,28 +114,28 @@ install( include(CTest) if(BUILD_TESTING) enable_testing() - add_executable(mgard_test ${CMAKE_CURRENT_SOURCE_DIR}/src/mgard_test.c) - target_link_libraries(mgard_test mgard ${BLOSC_LIBRARIES}) + add_executable(mgard_test ${CMAKE_CURRENT_SOURCE_DIR}/src/mgard_test.cpp) + target_link_libraries(mgard_test mgard ${CMAKE_DL_LIBS}) add_test(NAME mgard_test1 COMMAND mgard_test ${CMAKE_CURRENT_SOURCE_DIR}/data/u3_513x513_orig ${CMAKE_CURRENT_SOURCE_DIR}/data/u3_513x513.mgard - 513 513 1 1e-2 0 + 513 513 1 1e-2 0 ${CMAKE_CURRENT_SOURCE_DIR}/include/qoi.so qoi_x ) add_test(NAME mgard_test2 COMMAND mgard_test ${CMAKE_CURRENT_SOURCE_DIR}/data/data_600x400_orig ${CMAKE_CURRENT_SOURCE_DIR}/data/data_600x400.mgard - 600 400 1 1e-2 0 + 600 400 1 1e-2 0 ${CMAKE_CURRENT_SOURCE_DIR}/include/qoi.so qoi_x ) add_test(NAME mgard_test3 COMMAND mgard_test ${CMAKE_CURRENT_SOURCE_DIR}/data/zort_111_160_15.dat ${CMAKE_CURRENT_SOURCE_DIR}/data/zort_111_160_15.mgard - 11 160 15 1e-3 0 + 11 160 15 1e-3 0 ${CMAKE_CURRENT_SOURCE_DIR}/include/qoi.so qoi_x ) endif() diff --git a/src/mgard_api.cpp b/src/mgard_api.cpp index 1f2eaa1c10..dc8b640798 100644 --- a/src/mgard_api.cpp +++ b/src/mgard_api.cpp @@ -448,7 +448,7 @@ unsigned char *mgard_compress(int itype_flag, double *v, int &out_size, int nr -// //FLOAT versions +// // //FLOAT versions // unsigned char *mgard_compress(int itype_flag, float *v, int &out_size, int nrow, int ncol, int nfib, float tol_in) @@ -703,7 +703,7 @@ unsigned char *mgard_compress(int itype_flag, double *v, int &out_size, int nr // } -// float *mgard_decompress(int itype_flag, unsigned char *data, int data_len, int nrow, int ncol, int nfib) +// float *mgard_decompress(float itype_flag, unsigned char *data, int data_len, int nrow, int ncol, int nfib) // { // assert (ncol > 3); // assert (nrow >= 1); @@ -861,4 +861,4 @@ unsigned char *mgard_compress(int itype_flag, double *v, int &out_size, int nr // } -// // FLOAT end +// // // FLOAT end