Skip to content

Commit cef3c7b

Browse files
author
tugluk
committed
Corrected CMAKE files!!!
1 parent 04eff40 commit cef3c7b

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

CMakeLists.txt

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
cmake_minimum_required(VERSION 3.6)
22

3+
34
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
45
message(FATAL_ERROR
56
"In-source builds are not supported. Please create a build directory "
@@ -65,22 +66,21 @@ endif()
6566

6667
# Dependencies
6768
find_package(ZLIB REQUIRED)
68-
find_package(BLOSC REQUIRED)
69+
6970

7071
# Set library
7172
add_library(mgard
7273
src/mgard.cpp include/mgard.h
73-
src/mgard_capi.cpp include/mgard_capi.h
74+
src/mgard_api.cpp include/mgard_api.h
7475
src/mgard_nuni.cpp include/mgard_nuni.h
7576
)
7677
target_include_directories(mgard
7778
PUBLIC
7879
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
79-
$<BUILD_INTERFACE:${BLOSC_INCLUDE_DIR}>
8080
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
8181
)
82-
target_link_libraries(mgard PRIVATE ZLIB::ZLIB)
83-
target_link_libraries(mgard PRIVATE ${BLOSC_LIBRARIES})
82+
target_link_libraries(mgard PRIVATE ZLIB::ZLIB ${CMAKE_DL_LIBS})
83+
8484

8585
# Make sure we require C++11. Use meta-compile features if available,
8686
# otherwise use specific language features
@@ -105,7 +105,7 @@ install(
105105

106106
install(
107107
FILES include/mgard.h
108-
include/mgard_capi.h
108+
include/mgard_api.h
109109
include/mgard_nuni.h
110110
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
111111
)
@@ -114,28 +114,28 @@ install(
114114
include(CTest)
115115
if(BUILD_TESTING)
116116
enable_testing()
117-
add_executable(mgard_test ${CMAKE_CURRENT_SOURCE_DIR}/src/mgard_test.c)
118-
target_link_libraries(mgard_test mgard ${BLOSC_LIBRARIES})
117+
add_executable(mgard_test ${CMAKE_CURRENT_SOURCE_DIR}/src/mgard_test.cpp)
118+
target_link_libraries(mgard_test mgard ${CMAKE_DL_LIBS})
119119

120120
add_test(NAME mgard_test1
121121
COMMAND mgard_test
122122
${CMAKE_CURRENT_SOURCE_DIR}/data/u3_513x513_orig
123123
${CMAKE_CURRENT_SOURCE_DIR}/data/u3_513x513.mgard
124-
513 513 1 1e-2 0
124+
513 513 1 1e-2 0 ${CMAKE_CURRENT_SOURCE_DIR}/include/qoi.so qoi_x
125125
)
126126

127127
add_test(NAME mgard_test2
128128
COMMAND mgard_test
129129
${CMAKE_CURRENT_SOURCE_DIR}/data/data_600x400_orig
130130
${CMAKE_CURRENT_SOURCE_DIR}/data/data_600x400.mgard
131-
600 400 1 1e-2 0
131+
600 400 1 1e-2 0 ${CMAKE_CURRENT_SOURCE_DIR}/include/qoi.so qoi_x
132132
)
133133

134134
add_test(NAME mgard_test3
135135
COMMAND mgard_test
136136
${CMAKE_CURRENT_SOURCE_DIR}/data/zort_111_160_15.dat
137137
${CMAKE_CURRENT_SOURCE_DIR}/data/zort_111_160_15.mgard
138-
11 160 15 1e-3 0
138+
11 160 15 1e-3 0 ${CMAKE_CURRENT_SOURCE_DIR}/include/qoi.so qoi_x
139139
)
140140
endif()
141141

src/mgard_api.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ unsigned char *mgard_compress(int itype_flag, double *v, int &out_size, int nr
448448

449449

450450

451-
// //FLOAT versions
451+
// // //FLOAT versions
452452

453453

454454
// 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
703703

704704
// }
705705

706-
// float *mgard_decompress(int itype_flag, unsigned char *data, int data_len, int nrow, int ncol, int nfib)
706+
// float *mgard_decompress(float itype_flag, unsigned char *data, int data_len, int nrow, int ncol, int nfib)
707707
// {
708708
// assert (ncol > 3);
709709
// assert (nrow >= 1);
@@ -861,4 +861,4 @@ unsigned char *mgard_compress(int itype_flag, double *v, int &out_size, int nr
861861

862862
// }
863863

864-
// // FLOAT end
864+
// // // FLOAT end

0 commit comments

Comments
 (0)