Skip to content

Commit

Permalink
Corrected CMAKE files!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
tugluk committed Sep 30, 2019
1 parent 04eff40 commit cef3c7b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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 "
Expand Down Expand Up @@ -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
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${BLOSC_INCLUDE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
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
Expand All @@ -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}
)
Expand All @@ -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()

Expand Down
6 changes: 3 additions & 3 deletions src/mgard_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -861,4 +861,4 @@ unsigned char *mgard_compress(int itype_flag, double *v, int &out_size, int nr

// }

// // FLOAT end
// // // FLOAT end

0 comments on commit cef3c7b

Please sign in to comment.