From: Felix Morgner Date: Tue, 7 Jul 2015 07:50:24 +0000 (+0200) Subject: Improved builds on OS X X-Git-Url: http://git.code-monkey.de/?p=umurmur.git;a=commitdiff_plain;h=83319b5b9f8206f48cc2d3e425cd47ab613725c8;hp=f894ca6650867e0f21c3f471acb0eefb5c14f2a1 Improved builds on OS X --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c2130f..2b666e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,10 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true) set(UMURMUR_ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}") set(UMURMUR_BINARY_DIR ${CMAKE_BINARY_DIR}) +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release CACHE STRING "The type of build product that should be produced.") +endif(NOT CMAKE_BUILD_TYPE) + option(USE_POLARSSL_TESTCERT "Link to the PolarSSL test certificate and key." OFF) option(USE_POLARSSL_HAVEGE "Use the PolarSSL HAVEGE random generator key." OFF) @@ -34,6 +38,11 @@ if("${SSL}" STREQUAL "openssl") set(SSLIMP_LIBRARIES ${OPENSSL_LIBRARIES}) set(SSLIMP_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR}) set(SSLIMP_LIBRARY_DIR ${OPENSSL_LIB_DIR}) + + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations") + endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + endif(OPENSSL_FOUND) elseif("${SSL}" STREQUAL "polarssl") find_package(PolarSSL REQUIRED) diff --git a/configure.ac b/configure.ac index 72e6083..151abdb 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,7 @@ AC_CHECK_LIB([config], [config_init], [], [AC_MSG_ERROR([could not find libconfi case $host_os in darwin* ) AC_CHECK_FUNC([clock_get_time], [], [AC_MSG_ERROR([could not find clock_get_time()])]) + CFLAGS+=" -Wno-deprecated-declarations" ;; * ) AC_CHECK_FUNC([clock_gettime], [], [AC_CHECK_LIB([rt], [clock_gettime], [], [AC_MSG_ERROR([could not find clock_gettime() in librt])])])