From: Casey Bodley Date: Thu, 18 Jan 2018 01:23:14 +0000 (-0500) Subject: cmake: remove cryptopp option X-Git-Tag: wip-pdonnell-testing-20180317.202121~509^2~4 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ba85740955735887b00b40a4816c9da1fa071f78;p=ceph-ci.git cmake: remove cryptopp option Signed-off-by: Casey Bodley --- diff --git a/CMakeLists.txt b/CMakeLists.txt index da92ca39bc5..d44d5759242 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -344,31 +344,11 @@ set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS}) set(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBRARIES}) CHECK_SYMBOL_EXISTS(curl_multi_wait curl/curl.h HAVE_CURL_MULTI_WAIT) -# nss or cryptopp? -option(WITH_NSS "Use NSS crypto and SSL implementations" ON) -if (${WITH_NSS}) - find_package(NSS REQUIRED) - set(USE_NSS 1) - find_package(NSPR REQUIRED) - set(CRYPTO_LIBS ${NSS_LIBRARIES} ${NSPR_LIBRARIES}) -else () - find_package(cryptopp REQUIRED) - set(CRYPTO_LIBS ${CRYPTOPP_LIBRARIES}) - set(USE_CRYPTOPP 1) -endif (${WITH_NSS}) - -option(WITH_SSL "SSL build selected" ON) -if(USE_NSS) - #nss - set(SSL_LIBRARIES ${NSS_LIBRARIES}) - message(STATUS "SSL with NSS selected (Libs: ${SSL_LIBRARIES})") -else(USE_NSS) - #openssl - find_package(OpenSSL REQUIRED) - set(USE_OPENSSL ON) - set(SSL_LIBRARIES ${OPENSSL_LIBRARIES}) - message(STATUS "SSL with OpenSSL selected (Libs: ${SSL_LIBRARIES})") -endif(USE_NSS) +find_package(NSS REQUIRED) +find_package(NSPR REQUIRED) +set(USE_NSS 1) +set(CRYPTO_LIBS ${NSS_LIBRARIES} ${NSPR_LIBRARIES}) +set(SSL_LIBRARIES ${NSS_LIBRARIES}) option(WITH_XIO "Enable XIO messaging" OFF) if(WITH_XIO) @@ -417,10 +397,7 @@ endif(WITH_RADOSGW) if (WITH_RADOSGW) - if (NOT DEFINED OPENSSL_FOUND) - message(STATUS "Looking for openssl anyways, because radosgw selected") - find_package(OpenSSL) - endif() + find_package(OpenSSL) if (OPENSSL_FOUND) execute_process( COMMAND diff --git a/cmake/modules/Findcryptopp.cmake b/cmake/modules/Findcryptopp.cmake deleted file mode 100644 index f7c3b9b4641..00000000000 --- a/cmake/modules/Findcryptopp.cmake +++ /dev/null @@ -1,108 +0,0 @@ -# Module for locating the Crypto++ encryption library. -# -# Customizable variables: -# CRYPTOPP_ROOT_DIR -# This variable points to the CryptoPP root directory. On Windows the -# library location typically will have to be provided explicitly using the -# -D command-line option. The directory should include the include/cryptopp, -# lib and/or bin sub-directories. -# -# Read-only variables: -# CRYPTOPP_FOUND -# Indicates whether the library has been found. -# -# CRYPTOPP_INCLUDE_DIRS -# Points to the CryptoPP include directory. -# -# CRYPTOPP_LIBRARIES -# Points to the CryptoPP libraries that should be passed to -# target_link_libararies. -# -# -# Copyright (c) 2012 Sergiu Dotenco -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -INCLUDE (FindPackageHandleStandardArgs) - -FIND_PATH (CRYPTOPP_ROOT_DIR - NAMES cryptopp/cryptlib.h include/cryptopp/cryptlib.h - PATHS ENV CRYPTOPPROOT - DOC "CryptoPP root directory") - -# Re-use the previous path: -FIND_PATH (CRYPTOPP_INCLUDE_DIR - NAMES cryptopp/cryptlib.h - HINTS ${CRYPTOPP_ROOT_DIR} - PATH_SUFFIXES include - DOC "CryptoPP include directory") - -FIND_LIBRARY (CRYPTOPP_LIBRARY_DEBUG - NAMES cryptlibd cryptoppd - HINTS ${CRYPTOPP_ROOT_DIR} - PATH_SUFFIXES lib - DOC "CryptoPP debug library") - -FIND_LIBRARY (CRYPTOPP_LIBRARY_RELEASE - NAMES cryptlib cryptopp - HINTS ${CRYPTOPP_ROOT_DIR} - PATH_SUFFIXES lib - DOC "CryptoPP release library") - -IF (CRYPTOPP_LIBRARY_DEBUG AND CRYPTOPP_LIBRARY_RELEASE) - SET (CRYPTOPP_LIBRARY - optimized ${CRYPTOPP_LIBRARY_RELEASE} - debug ${CRYPTOPP_LIBRARY_DEBUG} CACHE DOC "CryptoPP library") -ELSEIF (CRYPTOPP_LIBRARY_RELEASE) - SET (CRYPTOPP_LIBRARY ${CRYPTOPP_LIBRARY_RELEASE} CACHE DOC - "CryptoPP library") -ENDIF (CRYPTOPP_LIBRARY_DEBUG AND CRYPTOPP_LIBRARY_RELEASE) - -IF (CRYPTOPP_INCLUDE_DIR) - SET (_CRYPTOPP_VERSION_HEADER ${CRYPTOPP_INCLUDE_DIR}/cryptopp/config.h) - - IF (EXISTS ${_CRYPTOPP_VERSION_HEADER}) - FILE (STRINGS ${_CRYPTOPP_VERSION_HEADER} _CRYPTOPP_VERSION_TMP REGEX - "^#define CRYPTOPP_VERSION[ \t]+[0-9]+$") - - STRING (REGEX REPLACE - "^#define CRYPTOPP_VERSION[ \t]+([0-9]+)" "\\1" _CRYPTOPP_VERSION_TMP - ${_CRYPTOPP_VERSION_TMP}) - - STRING (REGEX REPLACE "([0-9]+)[0-9][0-9]" "\\1" CRYPTOPP_VERSION_MAJOR - ${_CRYPTOPP_VERSION_TMP}) - STRING (REGEX REPLACE "[0-9]([0-9])[0-9]" "\\1" CRYPTOPP_VERSION_MINOR - ${_CRYPTOPP_VERSION_TMP}) - STRING (REGEX REPLACE "[0-9][0-9]([0-9])" "\\1" CRYPTOPP_VERSION_PATCH - ${_CRYPTOPP_VERSION_TMP}) - - SET (CRYPTOPP_VERSION_COUNT 3) - SET (CRYPTOPP_VERSION - ${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}.${CRYPTOPP_VERSION_PATCH}) - ENDIF (EXISTS ${_CRYPTOPP_VERSION_HEADER}) -ENDIF (CRYPTOPP_INCLUDE_DIR) - -SET (CRYPTOPP_INCLUDE_DIRS ${CRYPTOPP_INCLUDE_DIR}) -SET (CRYPTOPP_LIBRARIES ${CRYPTOPP_LIBRARY}) - -MARK_AS_ADVANCED (CRYPTOPP_INCLUDE_DIR CRYPTOPP_LIBRARY CRYPTOPP_LIBRARY_DEBUG - CRYPTOPP_LIBRARY_RELEASE) - -FIND_PACKAGE_HANDLE_STANDARD_ARGS (cryptopp REQUIRED_VARS CRYPTOPP_ROOT_DIR - CRYPTOPP_INCLUDE_DIR CRYPTOPP_LIBRARY VERSION_VAR CRYPTOPP_VERSION) diff --git a/install-deps.sh b/install-deps.sh index ef55b056a94..17c365a8eb4 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -120,7 +120,6 @@ if [ x`uname`x = xFreeBSDx ]; then databases/leveldb \ net/openldap-client \ security/nss \ - security/cryptopp \ archivers/snappy \ ftp/curl \ misc/e2fsprogs-libuuid \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b454f7d8660..d281376affe 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -216,13 +216,7 @@ if(${ENABLE_COVERAGE}) list(APPEND EXTRALIBS gcov) endif(${ENABLE_COVERAGE}) -if(USE_NSS) - if(NSS_FOUND) - if(NSPR_FOUND) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${NSS_INCLUDE_DIR} -I${NSPR_INCLUDE_DIR}") - endif(NSPR_FOUND) - endif(NSS_FOUND) -endif(USE_NSS) +include_directories(${NSS_INCLUDE_DIR} ${NSPR_INCLUDE_DIR}) set(GCOV_PREFIX_STRIP 4) @@ -1065,12 +1059,6 @@ if(WITH_RADOSGW) "${CMAKE_SOURCE_DIR}/src/civetweb/include") set_property(TARGET civetweb_common_objs APPEND PROPERTY COMPILE_DEFINITIONS USE_IPV6=1) - if(USE_OPENSSL) - set_property(TARGET civetweb_common_objs - APPEND PROPERTY COMPILE_DEFINITIONS NO_SSL_DL=1) - target_include_directories(civetweb_common_objs SYSTEM PRIVATE - "${SSL_INCLUDE_DIR}") - endif(USE_OPENSSL) if (LIBSSL_SONAME) set_property(TARGET civetweb_common_objs APPEND PROPERTY COMPILE_DEFINITIONS SSL_LIB="${LIBSSL_SONAME}") diff --git a/src/include/config-h.in.cmake b/src/include/config-h.in.cmake index cf2a163203e..0fc3086c8f1 100644 --- a/src/include/config-h.in.cmake +++ b/src/include/config-h.in.cmake @@ -123,9 +123,6 @@ /* Define if have curl_multi_wait() */ #cmakedefine HAVE_CURL_MULTI_WAIT 1 -/* Define if using CryptoPP. */ -#cmakedefine USE_CRYPTOPP - /* Define if using NSS. */ #cmakedefine USE_NSS