2018-12-07 06:51:35 +08:00
|
|
|
# Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
|
|
|
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
|
|
|
|
# 2015, 2016, 2017, 2018
|
|
|
|
# University Corporation for Atmospheric Research/Unidata.
|
|
|
|
|
|
|
|
# See netcdf-c/COPYRIGHT file for more info.
|
2018-01-17 02:00:09 +08:00
|
|
|
SET(CMAKE_BUILD_TYPE "")
|
|
|
|
|
2020-08-12 23:03:33 +08:00
|
|
|
CONFIGURE_FILE(H5Znoop.c ${CMAKE_CURRENT_BINARY_DIR}/H5Znoop1.c COPYONLY)
|
|
|
|
|
2019-02-28 06:22:46 +08:00
|
|
|
SET(libh5bzip2_SOURCES blocksort.c huffman.c crctable.c randtable.c compress.c decompress.c bzlib.c H5Zbzip2.c)
|
2018-01-17 02:00:09 +08:00
|
|
|
|
2019-02-16 07:07:22 +08:00
|
|
|
SET(libmisc_SOURCES H5Zmisc.c H5Zutil.c h5misc.h)
|
2018-01-17 02:00:09 +08:00
|
|
|
|
2020-02-17 03:59:33 +08:00
|
|
|
SET(libnoop_SOURCES H5Znoop.c H5Zutil.c h5noop.h)
|
2020-08-12 23:03:33 +08:00
|
|
|
SET(libnoop1_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/H5Znoop1.c H5Zutil.c h5noop.h)
|
2020-02-17 03:59:33 +08:00
|
|
|
|
2018-01-17 02:00:09 +08:00
|
|
|
IF(ENABLE_FILTER_TESTING)
|
|
|
|
IF(BUILD_UTILITIES)
|
|
|
|
|
|
|
|
# LDFLAGS = -module -avoid-version -shared -export-dynamic -no-undefined
|
|
|
|
|
2018-01-17 04:28:30 +08:00
|
|
|
IF(MSVC)
|
|
|
|
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
|
|
|
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}")
|
|
|
|
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}")
|
|
|
|
ENDIF()
|
|
|
|
|
2018-01-26 10:33:23 +08:00
|
|
|
# Note we use name test_bzip2 instead of bzip2 to avoid logical
|
|
|
|
# target name clash with examples/C/hdf5plugins
|
2019-02-28 06:22:46 +08:00
|
|
|
ADD_LIBRARY(test_bzip2 MODULE ${libh5bzip2_SOURCES})
|
2018-01-26 10:33:23 +08:00
|
|
|
SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES OUTPUT_NAME "bzip2")
|
2019-02-28 06:22:46 +08:00
|
|
|
SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES LIBRARY_OUTPUT_NAME "h5bzip2")
|
|
|
|
SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES ARCHIVE_OUTPUT_NAME "h5bzip2")
|
|
|
|
SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES RUNTIME_OUTPUT_NAME "h5bzip2")
|
2018-12-19 04:26:49 +08:00
|
|
|
TARGET_LINK_LIBRARIES(test_bzip2 ${ALL_TLL_LIBS})
|
2018-01-17 02:00:09 +08:00
|
|
|
|
|
|
|
ADD_LIBRARY(misc MODULE ${libmisc_SOURCES})
|
|
|
|
SET_TARGET_PROPERTIES(misc PROPERTIES LIBRARY_OUTPUT_NAME "misc")
|
|
|
|
SET_TARGET_PROPERTIES(misc PROPERTIES ARCHIVE_OUTPUT_NAME "misc")
|
|
|
|
SET_TARGET_PROPERTIES(misc PROPERTIES RUNTIME_OUTPUT_NAME "misc")
|
2018-12-19 04:26:49 +08:00
|
|
|
TARGET_LINK_LIBRARIES(misc ${ALL_TLL_LIBS})
|
2018-01-17 02:00:09 +08:00
|
|
|
|
2020-05-11 23:42:31 +08:00
|
|
|
SET_SOURCE_FILES_PROPERTIES(H5Znoop.c PROPERTIES COMPILE_OPTIONS -DNOOP_INSTANCE=0)
|
2020-02-17 03:59:33 +08:00
|
|
|
ADD_LIBRARY(noop MODULE ${libnoop_SOURCES})
|
|
|
|
SET_TARGET_PROPERTIES(noop PROPERTIES LIBRARY_OUTPUT_NAME "noop")
|
|
|
|
SET_TARGET_PROPERTIES(noop PROPERTIES ARCHIVE_OUTPUT_NAME "noop")
|
|
|
|
SET_TARGET_PROPERTIES(noop PROPERTIES RUNTIME_OUTPUT_NAME "noop")
|
|
|
|
TARGET_LINK_LIBRARIES(noop ${ALL_TLL_LIBS})
|
|
|
|
|
2020-08-12 23:03:33 +08:00
|
|
|
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/H5Znoop1.c PROPERTIES COMPILE_OPTIONS -DNOOP_INSTANCE=1)
|
2020-05-11 23:42:31 +08:00
|
|
|
ADD_LIBRARY(noop1 MODULE ${libnoop1_SOURCES})
|
|
|
|
SET_TARGET_PROPERTIES(noop1 PROPERTIES LIBRARY_OUTPUT_NAME "noop1")
|
|
|
|
SET_TARGET_PROPERTIES(noop1 PROPERTIES ARCHIVE_OUTPUT_NAME "noop1")
|
|
|
|
SET_TARGET_PROPERTIES(noop1 PROPERTIES RUNTIME_OUTPUT_NAME "noop1")
|
|
|
|
TARGET_LINK_LIBRARIES(noop1 ${ALL_TLL_LIBS})
|
2020-09-28 02:43:46 +08:00
|
|
|
|
2018-01-17 02:00:09 +08:00
|
|
|
ENDIF(BUILD_UTILITIES)
|
|
|
|
ENDIF(ENABLE_FILTER_TESTING)
|
|
|
|
|
|
|
|
# Copy some test files from current source dir to out-of-tree build dir.
|
|
|
|
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
|
|
|
|
IF(MSVC)
|
|
|
|
FILE(COPY ${COPY_FILES} DESTINATION ${RUNTIME_OUTPUT_DIRECTORY}/)
|
|
|
|
ENDIF()
|