Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
(#18) Added GSL (https://git.io/vX8Ln)
Browse files Browse the repository at this point in the history
Added dependency to GSL for coding safer low level C++ when
interacting with the raw lz4 API.
  • Loading branch information
leandor committed Jul 1, 2017
1 parent dba93f1 commit 4e670d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ option(CBash_USE_STATIC_RUNTIME "Build with static runtime libs (/MT)" ON)
option(CBash_NO_BOOST_ZLIB "Build with external Zlib" ON)

set(LZ4_ROOT "" CACHE PATH "Path to the root of the LZ4 distribution (https://git.io/vX8JZ)")
set(GSL_ROOT "" CACHE PATH "Path to the root of the GSL distribution (https://git.io/vX8Ln)")


set(LZ4_INCLUDE_DIR ${LZ4_ROOT}/lib)
set(LZ4_LIBRARY_DIR ${LZ4_ROOT}/visual/VS2010/bin/Win32/$<CONFIG>)

set(GSL_INCLUDE ${GSL_ROOT})

set(LZ4_LIBRARY ${LZ4_LIBRARY_DIR}/liblz4.lib)

set (BUILD_SHARED_LIBS ${CBash_BUILD_SHARED_LIBS})
Expand Down Expand Up @@ -58,6 +61,7 @@ ENDIF ()
include_directories (
${CBASH_INCLUDE}
${Boost_INCLUDE_DIRS}
${GSL_INCLUDE}
${ZLIB_INCLUDE_DIR}
${LZ4_INCLUDE_DIR}
${CBASH_SOURCE}
Expand Down
5 changes: 5 additions & 0 deletions scripts/generate.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pushd %THIS%..\build
SET BOOST_ROOT=%1
SET ZLIB_ROOT=%2
SET LZ4_ROOT=%3
SET GSL_ROOT=%4

IF "%BOOST_ROOT%"=="" (
ECHO Usage %~nx0 $BOOST_ROOT $ZLIB_ROOT
Expand Down Expand Up @@ -33,6 +34,10 @@ IF NOT "%LZ4_ROOT%"=="" (
SET OPT=%OPT% -DLZ4_ROOT=%LZ4_ROOT%
)

IF NOT "%GSL_ROOT%"=="" (
SET OPT=%OPT% -DGSL_ROOT=%GSL_ROOT%
)

cmake .. %OPT%

:EXIT
Expand Down

0 comments on commit 4e670d4

Please sign in to comment.