]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: remove cryptopp option
authorCasey Bodley <cbodley@redhat.com>
Thu, 18 Jan 2018 01:23:14 +0000 (20:23 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 19 Jan 2018 15:25:41 +0000 (10:25 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
CMakeLists.txt
cmake/modules/Findcryptopp.cmake [deleted file]
install-deps.sh
src/CMakeLists.txt
src/include/config-h.in.cmake

index da92ca39bc50b05f905e1b44cd9ebd63cd794b68..d44d5759242a044330eb357acda77bac6d2f66c7 100644 (file)
@@ -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 (file)
index f7c3b9b..0000000
+++ /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)
index ef55b056a9479c1a7e172ed5574f1d28c38f64cf..17c365a8eb4d8fd3fd175b9501b99e2380dae9b0 100755 (executable)
@@ -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 \
index b454f7d866043861547ca332c3871156713aff25..d281376affeaa80713affe650cf98ddf9c2994cb 100644 (file)
@@ -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}")
index cf2a163203e4ac35f9c867b6d5fcd1e684c0783e..0fc3086c8f12e7da4616a9c6bda6b913054e46cc 100644 (file)
 /* 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