From 367f86f21a3f232449096aec0c7646bfba9d049f Mon Sep 17 00:00:00 2001 From: Michal Simon Date: Fri, 17 Jan 2020 15:05:06 +0100 Subject: [PATCH] [CMake/RPM] Remove google crc32c. --- CMakeLists.txt | 5 ----- external/CMakeLists.txt | 46 ----------------------------------------- packaging/makesrpm.sh | 22 -------------------- 3 files changed, 73 deletions(-) delete mode 100644 external/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c4481807e3..a216fb73e55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,11 +49,6 @@ endmacro() #------------------------------------------------------------------------------- # Build in subdirectories #------------------------------------------------------------------------------- -add_subdirectory( external ) -if( HAVE_CRC32C ) - add_definitions( -DHAVE_CRC32C ) -endif() - add_subdirectory( src ) add_subdirectory( bindings ) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt deleted file mode 100644 index 8160bc96d27..00000000000 --- a/external/CMakeLists.txt +++ /dev/null @@ -1,46 +0,0 @@ -find_package(Git QUIET) - -if( ENABLE_CRC32C ) - - if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") - ########################################################### - # Update the crc32c submodule - ########################################################### - option(CRC32C_SUBMODULE "Check submodules during build" ON) - if(CRC32C_SUBMODULE) - message(STATUS "crc32c submodule update") - execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init -- "${PROJECT_SOURCE_DIR}/external/crc32c" - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - RESULT_VARIABLE CRC32C_SUBMOD_RESULT) - if(NOT CRC32C_SUBMOD_RESULT EQUAL "0") - message(FATAL_ERROR "crc32c submodule update failed with ${CRC32C_SUBMOD_RESULT}, please checkout the submodules") - endif() - endif() - endif() - - if(NOT EXISTS "${PROJECT_SOURCE_DIR}/external/crc32c/CMakeLists.txt") - message(FATAL_ERROR "The crc32c submodules was not downloaded! CRC32_SUBMODULE was turned off or failed. Please update submodules and try again.") - else() - ########################################################### - # Configure CRC32C build - ########################################################### - set(CRC32C_BUILD_TESTS OFF CACHE BOOL "Disable CRC32C tests.") - set(CRC32C_BUILD_BENCHMARKS OFF CACHE BOOL "Disable CRC32C benchmarks.") - set(CRC32C_USE_GLOG OFF CACHE BOOL "Disable CRC32C glog.") - set(CRC32C_INSTALL OFF CACHE BOOL "Do NOT install crc32c targets and headers.") - ########################################################### - # Set up utility variables for convenience - ########################################################### - set( HAVE_CRC32C TRUE PARENT_SCOPE ) - set( CRC32C_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/external/crc32c/include/" PARENT_SCOPE ) - set( CRC32C_LIBRARY_DIR "${PROJECT_BINARY_DIR}external/crc32c/" PARENT_SCOPE ) - set( CRC32C_STATIC_LIB "crc32c" PARENT_SCOPE ) - ########################################################### - # Make the crc32c library reallocable so it can be used when - # making a shared object - ########################################################### - set( CMAKE_POSITION_INDEPENDENT_CODE ON ) - add_subdirectory(crc32c) - endif() - -endif() diff --git a/packaging/makesrpm.sh b/packaging/makesrpm.sh index 510b6f987a3..f595c75dae4 100755 --- a/packaging/makesrpm.sh +++ b/packaging/makesrpm.sh @@ -243,7 +243,6 @@ fi # Make sure submodules are in place #------------------------------------------------------------------------------- git submodule init -git submodule update -- external/crc32c git submodule update -- src/XrdClHttp git submodule update -- src/XrdCeph #git submodule foreach git pull origin master @@ -298,27 +297,6 @@ fi cd - > /dev/null -#------------------------------------------------------------------------------- -# Add external/crc32c sub-module to our tarball -#------------------------------------------------------------------------------- -cd external/crc32c - -TAG=1.1.0 - -git archive --prefix=xrootd/external/crc32c/ --format=tar $TAG > $RPMSOURCES/xrootd-crc32c.tar -if test $? -ne 0; then - echo "[!] Unable to create the xrootd-crc32c source tarball" 1>&2 - exit 6 -fi - -tar --concatenate --file $RPMSOURCES/xrootd.tar $RPMSOURCES/xrootd-crc32c.tar -if test $? -ne 0; then - echo "[!] Unable to add xrootd-crc32c to xrootd tarball" 1>&2 - exit 6 -fi - -cd - > /dev/null - #------------------------------------------------------------------------------- # gzip the tarball #-------------------------------------------------------------------------------