Skip to content
Permalink
Browse files

Purge some more ACCRE APR references

  • Loading branch information...
tacketar authored and PerilousApricot committed Mar 14, 2017
1 parent 8e9dff6 commit b1c7b43554c303714ac71040799d3b36b67da4fd
Showing with 8 additions and 95 deletions.
  1. +1 −7 CMakeLists.txt
  2. +4 −20 cmake/{FindAPR-ACCRE.cmake → FindAPR.cmake}
  3. +2 −2 cmake/FindJerasure.cmake
  4. +0 −28 cmake/LStoreExternals.cmake
  5. +1 −38 scripts/functions.sh
@@ -14,7 +14,6 @@ endif()
option(BUILD_SHARED_LIBS "Build shared LStore libraries" ON)
option(BUILD_SHARED_EXES "Build shared LStore executables" ON)
option(BUILD_TESTS "Build tests" ON)
option(BUILD_APR "Build APR from source" ON)
option(BUILD_JERASURE "Build Jerasure from source" ON)
option(BUILD_GRIDFTP "Build GridFTP bindings" OFF)

@@ -26,7 +25,6 @@ option(ENABLE_UBSAN "Enable undefined behaviour sanitizer" OFF)
option(ENABLE_FUZZ "Build with AFL fuzz support" OFF)
option(ENABLE_CCACHE "Build with ccache" ${ENABLE_CCACHE_DEFAULT})
option(ENABLE_LTO "Enable Link-Time Optimization (LTO)" OFF)
option(ENABLE_UPSTREAM_APR "Enable using non -ACCRE APR" OFF)

option(INSTALL_EXTERNALS "Install externals to \$CMAKE_INSTALL_PATH" OFF)
option(INSTALL_YUM_RELEASE "Install yum lstore-release (may require root)" OFF)
@@ -212,15 +210,11 @@ find_package(FUSE REQUIRED)
find_package(ZLIB REQUIRED)
find_package(ZMQ REQUIRED)
find_package(LevelDB REQUIRED)
find_package(APR REQUIRED)
find_package(APRUtil REQUIRED)
find_package(BerkeleyDB REQUIRED)

# Find external deps we might build
set(APR_USE_SYSTEM ${ENABLE_UPSTREAM_APR})
if(NOT BUILD_APR)
set(FIND_APR_REQUIRED REQUIRED)
endif()
find_package(APR-ACCRE ${FIND_APR_REQUIRED})
find_package(Jerasure)

# Build external dependencies
@@ -1,9 +1,6 @@
# Source: http://svn.trolocsis.com/repos/projects/templates/apr/build/FindAPR.cmake
# Locate APR include paths and libraries

# Options
# APR_USE_SYSTEM - if true, use system and not the "-ACCRE" version of APR

# This module defines
# APR_INCLUDES, where to find apr.h, etc.
# APR_LIBS, linker switches to use with ld to link against APR
@@ -18,22 +15,11 @@ if(NOT (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.1))
cmake_policy(SET CMP0054 OLD)
endif()

if(APR_USE_SYSTEM)
message(STATUS "Using non -ACCRE version of APR")
set(__APR_SUFFIX_UPPER)
set(__APR_SUFFIX_LOWER)
else()
message(STATUS "Using -ACCRE version of APR")
set(__APR_SUFFIX_UPPER "-ACCRE")
set(__APR_SUFFIX_LOWER "-accre")
endif()
set(APR_FOUND FALSE)

set(APR-ACCRE_FOUND FALSE)
find_program(APR_CONFIG_EXECUTABLE "apr${__APR_SUFFIX_UPPER}-1-config")
find_program(APR_CONFIG_EXECUTABLE "apr-1-config")
if(${APR_CONFIG_EXECUTABLE} STREQUAL "APR_CONFIG_EXECUTABLE-NOTFOUND")
cmake_policy(POP)
unset(__APR_SUFFIX_UPPER)
unset(__APR_SUFFIX_LOWER)
return()
endif()
mark_as_advanced(APR_CONFIG_EXECUTABLE)
@@ -78,15 +64,13 @@ _apr_invoke(APR_VERSION "" --version)
list(GET APR_LIBTOOL 0 APR_LIBTOOL_ARG0)

get_filename_component(APR_LIBTOOL_BASE ${APR_LIBTOOL_ARG0} PATH )
FIND_LIBRARY(APR_LIBRARY NAMES "apr${__APR_SUFFIX_LOWER}-1" "apr${__APR_SUFFIX_UPPER}-1" PATHS ${APR_LIBTOOL_BASE})
FIND_LIBRARY(APR_LIBRARY NAMES "apr-1" "apr-1" PATHS ${APR_LIBTOOL_BASE})

# compatibility, allow this CMake module to work with the various CMakeList.txt files
set(APR_INCLUDE_DIR "${APR_INCLUDES}")
if(APR_LIBRARY AND APR_INCLUDES)
set(APR-ACCRE_FOUND 1)
set(APR_FOUND 1)
endif()
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(APR DEFAULT_MSG APR_INCLUDES APR_LIBRARY APR_LIBS APR_VERSION)
cmake_policy(POP)
unset(__APR_SUFFIX_UPPER)
unset(__APR_SUFFIX_LOWER)
@@ -5,9 +5,9 @@
# This module defines
# JERASURE_INCLUDE_DIR and JERASURE_INCLUDE_DIR, where to find apr.h, etc.
# JERASURE_LIBRARIES and JERASURE_LIBRARIES, the libraries needed to use APR.
# JERASURE_FOUND and JERASURE_FOUND, If false, do not try to use APR.
# JERASURE_FOUND and JERASURE_FOUND, If false, do not try to use Jerasure.
# also defined, but not for general use are
# JERASURE_LIBRARY and JERASURE_LIBRARY, where to find the APR library.
# JERASURE_LIBRARY and JERASURE_LIBRARY, where to find the Jerasure library.

FIND_PATH(JERASURE_INCLUDE_DIR NAMES jerasure/jerasure.h
jerasure/galois.h
@@ -1,32 +1,4 @@
include(ExternalProject)
if(BUILD_APR AND NOT APR_FOUND)
list(APPEND REBUILD_DEPENDENCIES extern-apr-accre)
set(APR_LIBRARY "apr-ACCRE-1")
set(APR_INCLUDE_DIR "${EXTERNAL_INSTALL_DIR}/include/apr-ACCRE-1")
ExternalProject_add(extern-apr-accre
PREFIX "${CMAKE_BINARY_DIR}/state/apr-accre/"
SOURCE_DIR "${CMAKE_SOURCE_DIR}/vendor/apr-accre/"
BINARY_DIR "${CMAKE_BINARY_DIR}/apr-accre/"
INSTALL_DIR "${EXTERNAL_INSTALL_DIR}"
CONFIGURE_COMMAND "${CMAKE_SOURCE_DIR}/vendor/apr-accre/configure"
"--prefix=${EXTERNAL_INSTALL_DIR}/"
"--includedir=${EXTERNAL_INSTALL_DIR}/include/apr-ACCRE-1"
"--with-installbuilddir=${EXTERNAL_INSTALL_DIR}/lib/apr-ACCRE-1/build"
"--enable-static=yes" "--enable-shared=no" "--with-pic"
"CC=${LSTORE_COMPILER_WRAPPER}${CMAKE_C_COMPILER}"
BUILD_COMMAND $(MAKE)
TEST_COMMAND $(MAKE) "test"
INSTALL_COMMAND $(MAKE) "install"
TEST_EXCLUDE_FROM_MAIN 1
)
ExternalProject_Add_Step(extern-apr-accre AUTOCONF
COMMAND "./buildconf"
COMMENT "Setting up APR autoconf"
DEPENDERS "configure"
BYPRODUCTS "${CMAKE_SOURCE_DIR}/vendor/apr-accre/configure"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/vendor/apr-accre"
)
endif()
if(BUILD_JERASURE OR (NOT JERASURE_FOUND) OR (JERASURE_LIBRARY MATCHES "^${EXTERNAL_INSTALL_DIR}"))
list(APPEND REBUILD_DEPENDENCIES extern-jerasure)
set(JERASURE_LIBRARY "jerasure")
@@ -57,32 +57,6 @@ function build_lstore_binary_outof_tree() {
INSTALL_PREFIX=${3:-${LSTORE_RELEASE_BASE}/build/local}
BUILD_STATIC=${4:-0}
case $TO_BUILD in
apr-accre)
# Keep this in sync with CPackConfig.cmake in our fork
( set -eu
cd ${SOURCE_PATH}
./buildconf
)
${SOURCE_PATH}/configure \
--prefix=${INSTALL_PREFIX} \
--includedir=${INSTALL_PREFIX}/include/apr-ACCRE-1 \
--with-installbuilddir=${INSTALL_PREFIX}/lib/apr-ACCRE-1/build
make
make test
make install
;;
apr-util-accre)
if [ -e ${INSTALL_PREFIX}/bin/apr-ACCRE-1-config ]; then
OTHER_ARGS="--with-apr=${INSTALL_PREFIX}/bin/apr-ACCRE-1-config"
fi
# Keep this in sync with CPackConfig.cmake in our fork
${SOURCE_PATH}/configure --prefix=${INSTALL_PREFIX} $OTHER_ARGS \
--includedir=${INSTALL_PREFIX}/include/apr-util-ACCRE-1 \
--with-installbuilddir=${INSTALL_PREFIX}/lib/apr-util-ACCRE-1/build
make
make test
make install
;;
jerasure|toolbox|gop|ibp|lio|gridftp)
EXTRA_ARGS=""
MAKE_COMMAND="make install"
@@ -135,19 +109,8 @@ function build_lstore_package() {
fatal "Unexpected distro name $DISTRO_NAME"
;;
esac
if [ "$TO_BUILD" == "apr-accre" ]; then
( set -eu
cd ${SOURCE_PATH}
./buildconf
)
fi

case $TO_BUILD in
apr-accre|apr-util-accre)
ls -l $SOURCE_PATH/CPackConfig.cmake
cpack $CPACK_ARG --config $SOURCE_PATH/CPackConfig.cmake \
--debug --verbose "-DCPACK_VERSION=$TAG_NAME" || \
fatal "$(cat _CPack_Packages/*/InstallOutput.log)"
;;
jerasure|lio|ibp|gop|toolbox|gridftp|meta)
# This is gross, but works for now..
set -x

0 comments on commit b1c7b43

Please sign in to comment.
You can’t perform that action at this time.