Skip to content

Commit

Permalink
Merge pull request #63 from robertu94/cmake_fix
Browse files Browse the repository at this point in the history
Add support to write stats to CMake
  • Loading branch information
disheng222 authored Oct 2, 2020
2 parents 1e7582a + 8e712fc commit 1d78ca9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ option(BUILD_TIMECMPR "build the time based compression code" OFF)
option(BUILD_RANDOMACCESS "build the random access code" OFF)
option(BUILD_DOCKER_CONTAINERS "build docker containers for testing" OFF)
option(BUILD_FORTRAN "build the fortran interface" OFF)
option(BUILD_STATS "record statistics for prediction" OFF)
if(BUILD_DOCKER_CONTAINERS)

foreach(CONTAINER Centos Fedora Ubuntu Travis CentosPackaged)
Expand Down
4 changes: 4 additions & 0 deletions sz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ add_library (SZ
src/TypeManager.c
src/utility.c
src/VarSet.c
src/sz_stats.c
)

target_include_directories(SZ
Expand Down Expand Up @@ -86,6 +87,9 @@ if(BUILD_FORTRAN)
${CMAKE_CURRENT_SOURCE_DIR}/src/sz_interface.F90
)
endif()
if(BUILD_STATS)
target_compile_definitions(SZ PUBLIC HAVE_WRITESTATS)
endif()

install (TARGETS SZ ${thirdparty_export} EXPORT SZConfig
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down

0 comments on commit 1d78ca9

Please sign in to comment.