-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
better parameter checking for both the lua and C APIs
- Loading branch information
Showing
13 changed files
with
365 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,9 @@ ext/include/ | |
ext/share/ | ||
ext/src/ | ||
ext/tmp/ | ||
ext/bin/ | ||
ext/lib/ | ||
ext/ssl/ | ||
|
||
# editor | ||
*.swp | ||
|
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,51 @@ | ||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||
# | ||
# Install LIBCQL from source | ||
# | ||
if (NOT LIBCQL_NAME) | ||
|
||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7) | ||
|
||
include (snappy) | ||
include (ExternalProject) | ||
|
||
set(ABBREV "LIBCQL") | ||
set(${ABBREV}_NAME ${ABBREV}) | ||
set(${ABBREV}_INCLUDE_DIRS ${EXT_PREFIX}/src/LIBCQL/) | ||
set(APP_DEPENDENCIES ${APP_DEPENDENCIES} ${ABBREV}) | ||
|
||
message("Installing ${LIBCQL_NAME} into ext build area: ${EXT_PREFIX} ...") | ||
|
||
ExternalProject_Add(LIBCQL | ||
PREFIX ${EXT_PREFIX} | ||
URL https://github.com/mstump/libcql/archive/master.zip | ||
URL_MD5 c511a6b9f89d56d0893f12a81d638ec2 | ||
CMAKE_ARGS "-DCMAKE_BUILD_TYPE=debug" | ||
BUILD_IN_SOURCE 1 | ||
) | ||
|
||
set(CXXFLAGS CMAKE_CXX_FLAGS) | ||
|
||
set(${ABBREV}_LIBRARIES ${EXT_PREFIX}/src/libcql/lib/libcql.dylib) | ||
set(${ABBREV}_STATIC_LIBRARIES ${EXT_PREFIX}/src/libcql/lib/libcql.a) | ||
|
||
set_target_properties(${LIBCQL_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) | ||
|
||
endif (NOT LIBCQL_NAME) | ||
else() | ||
find_path(LIBCQL_INCLUDE_DIRS NAMES libcql/cql.hpp HINTS /usr/include /usr/local/include) | ||
find_library(LIBCQL_LIBRARIES NAMES libcql.a libcql.lib libcql.dylib HINTS /usr/lib /usr/local/lib) | ||
endif() | ||
|
||
if(LIBCQL_INCLUDE_DIRS AND LIBCQL_LIBRARIES) | ||
set(LIBCQL_FOUND TRUE) | ||
endif(LIBCQL_INCLUDE_DIRS AND LIBCQL_LIBRARIES) | ||
|
||
if(LIBCQL_FOUND) | ||
message(STATUS "Found libcql: ${LIBCQL_LIBRARIES}") | ||
else(LIBCQL_FOUND) | ||
message(FATAL_ERROR "Could not find libcql library.") | ||
endif(LIBCQL_FOUND) | ||
|
||
set(INCLUDES ${INCLUDES} ${LIBCQL_INCLUDE_DIRS} ) | ||
set(LIBS ${LIBS} ${LIBCQL_STATIC_LIBRARIES} ) |
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,42 @@ | ||
# | ||
# Install openssl from source | ||
# | ||
|
||
if (NOT openssl_NAME) | ||
|
||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7) | ||
|
||
include(ExternalProject) | ||
include(zlib) | ||
|
||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||
# On Mac, 64-bit builds must be manually requested. | ||
set (SSL_CONFIGURE_COMMAND ./Configure darwin64-x86_64-cc ) | ||
else() | ||
# The config script seems to auto-select the platform correctly on linux | ||
# It calls ./Configure for us. | ||
set (SSL_CONFIGURE_COMMAND ./config) | ||
endif() | ||
|
||
set(ABBREV "openssl") | ||
set(${ABBREV}_NAME ${ABBREV}) | ||
set(${ABBREV}_INCLUDE_DIRS ${EXT_PREFIX}/include) | ||
set(APP_DEPENDENCIES ${APP_DEPENDENCIES} ${ABBREV}) | ||
|
||
message("Installing ${openssl_NAME} into ext build area: ${EXT_PREFIX} ...") | ||
|
||
ExternalProject_Add(openssl | ||
DEPENDS zlib | ||
PREFIX ${EXT_PREFIX} | ||
URL http://openssl.org/source/openssl-1.0.0e.tar.gz | ||
URL_MD5 "7040b89c4c58c7a1016c0dfa6e821c86" | ||
PATCH_COMMAND "" | ||
CONFIGURE_COMMAND ${SSL_CONFIGURE_COMMAND} zlib no-shared no-zlib-dynamic --prefix=${EXT_PREFIX} | ||
BUILD_IN_SOURCE 1 | ||
) | ||
|
||
set(${ABBREV}_STATIC_LIBRARIES ${EXT_PREFIX}/lib/libcrypto.a ${EXT_PREFIX}/lib/libssl.a) | ||
|
||
set_target_properties(${openssl_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) | ||
|
||
endif(NOT openssl_NAME) |
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,33 @@ | ||
# | ||
# Install zlib from source | ||
# | ||
|
||
if (NOT zlib_NAME) | ||
|
||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7) | ||
|
||
include (ExternalProject) | ||
|
||
set(ABBREV "zlib") | ||
set(${ABBREV}_NAME ${ABBREV}) | ||
set(${ABBREV}_INCLUDE_DIRS ${EXT_PREFIX}/include) | ||
set(APP_DEPENDENCIES ${APP_DEPENDENCIES} ${ABBREV}) | ||
|
||
message("Installing ${zlib_NAME} into ext build area: ${EXT_PREFIX} ...") | ||
|
||
ExternalProject_Add(zlib | ||
PREFIX ${EXT_PREFIX} | ||
URL http://zlib.net/zlib-1.2.8.tar.gz | ||
URL_MD5 "44d667c142d7cda120332623eab69f40" | ||
PATCH_COMMAND "" | ||
CONFIGURE_COMMAND ./configure -p=${EXT_PREFIX} --static --64 | ||
BUILD_COMMAND make | ||
INSTALL_COMMAND make install prefix=${EXT_PREFIX} | ||
BUILD_IN_SOURCE 1 | ||
) | ||
|
||
set(${ABBREV}_STATIC_LIBRARIES ${EXT_PREFIX}/lib/libz.a) | ||
|
||
set_target_properties(${zlib_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) | ||
|
||
endif (NOT zlib_NAME) |
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
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
Oops, something went wrong.