-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add missing zmat cmake file, add mmc-trinity cuda support in cmake
- Loading branch information
Showing
3 changed files
with
131 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
################################################################# | ||
# CMake configure file for ZMat | ||
# Qianqian Fang <q.fang at neu.edu> | ||
# 2020/05/23 | ||
################################################################# | ||
|
||
cmake_minimum_required(VERSION 3.3) | ||
|
||
project(zmat) | ||
|
||
find_package(ZLIB REQUIRED) | ||
#find_package(Matlab) | ||
|
||
option(STATIC_LIB "Build static library" ON) | ||
|
||
# C Options | ||
set(CMAKE_C_FLAGS "-g -Wall -O3 -fPIC -DNO_BLOSC2 -DNO_ZLIB -DNO_ZSTD -D_LARGEFILE64_SOURCE=1") | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../) | ||
|
||
# Add include directories | ||
#include_directories(./) | ||
include_directories(lz4) | ||
include_directories(miniz) | ||
include_directories(easylzma) | ||
include_directories(easylzma/pavlov) | ||
|
||
# Add all project units | ||
|
||
if(STATIC_LIB) | ||
add_library(zmat STATIC | ||
zmatlib.c | ||
lz4/lz4.c | ||
lz4/lz4hc.c | ||
miniz/miniz.c | ||
miniz/miniz.h | ||
easylzma/compress.c | ||
easylzma/decompress.c | ||
easylzma/lzma_header.c | ||
easylzma/lzip_header.c | ||
easylzma/common_internal.c | ||
easylzma/pavlov/LzmaEnc.c | ||
easylzma/pavlov/LzmaDec.c | ||
easylzma/pavlov/LzmaLib.c | ||
easylzma/pavlov/LzFind.c | ||
easylzma/pavlov/Bra.c | ||
easylzma/pavlov/BraIA64.c | ||
easylzma/pavlov/Alloc.c | ||
easylzma/pavlov/7zCrc.c | ||
) | ||
else() | ||
# Add all project units | ||
add_library(zmat SHARED | ||
zmatlib.c | ||
lz4/lz4.c | ||
lz4/lz4hc.c | ||
miniz/miniz.c | ||
miniz/miniz.h | ||
easylzma/compress.c | ||
easylzma/decompress.c | ||
easylzma/lzma_header.c | ||
easylzma/lzip_header.c | ||
easylzma/common_internal.c | ||
easylzma/pavlov/LzmaEnc.c | ||
easylzma/pavlov/LzmaDec.c | ||
easylzma/pavlov/LzmaLib.c | ||
easylzma/pavlov/LzFind.c | ||
easylzma/pavlov/Bra.c | ||
easylzma/pavlov/BraIA64.c | ||
easylzma/pavlov/Alloc.c | ||
easylzma/pavlov/7zCrc.c | ||
) | ||
endif() | ||
|
||
# Link options | ||
target_link_libraries( | ||
zmat | ||
ZLIB::ZLIB | ||
) | ||
|
||
if(Matlab_FOUND) | ||
matlab_add_mex( | ||
NAME zipmat | ||
SRC zmat.cpp | ||
LINK_TO mex mx zmat | ||
) | ||
endif() | ||
|