Skip to content

Commit

Permalink
Speed up OpenSSL builds
Browse files Browse the repository at this point in the history
  • Loading branch information
EduMenges committed Jul 18, 2024
1 parent 2caa667 commit 6bdebaf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion build/Android/Openssl-build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ REALCONFIGDIR=$(realpath ${CONFIGDIR})

OPENSSL_CONFIGURE_CMD="${REALCONFIGDIR}/Configure $ABI $BUILD_TYPE no-asm no-shared --prefix=$BUILD_DIR --openssldir=$BUILD_DIR --libdir=lib"

echo "Building OpenSSL"
echo "Configuring OpenSSL"
echo $OPENSSL_CONFIGURE_CMD
echo

Expand All @@ -72,4 +72,5 @@ echo

$OPENSSL_CONFIGURE_CMD

echo "Building OpenSSL"
make build_libs
4 changes: 4 additions & 0 deletions build/CommonCompilerOptions.CMake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# ProcessorCount
include(ProcessorCount)
ProcessorCount(PROCESSOR_COUNT)

# Convenience settings
if(NOT DEFINED CMAKE_COLOR_DIAGNOSTICS)
set(CMAKE_COLOR_DIAGNOSTICS ON)
Expand Down
2 changes: 1 addition & 1 deletion build/Linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ExternalProject_Add(openssl
PREFIX openssl
SOURCE_DIR "${THIRDPARTY_DIR}/openssl"
CONFIGURE_COMMAND <SOURCE_DIR>/Configure ${OPENSSL_VARIANT} -fPIC --prefix=${OPENSSL_ROOT_DIR} --openssldir=${OPENSSL_ROOT_DIR} --libdir=lib -static linux-${CMAKE_SYSTEM_PROCESSOR}-clang
BUILD_COMMAND make build_libs
BUILD_COMMAND make build_libs -j${PROCESSOR_COUNT}
BUILD_IN_SOURCE FALSE
INSTALL_COMMAND make install_dev
)
Expand Down
2 changes: 1 addition & 1 deletion build/OSX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ ExternalProject_Add(openssl
PREFIX openssl
SOURCE_DIR "${THIRDPARTY_DIR}/openssl"
CONFIGURE_COMMAND <SOURCE_DIR>/Configure ${OPENSSL_VARIANT} --prefix=${OPENSSL_ROOT_DIR} --openssldir=${OPENSSL_ROOT_DIR} -mmacosx-version-min=12.1 --libdir=lib -static darwin64-${CMAKE_SYSTEM_PROCESSOR}-cc
BUILD_COMMAND make build_libs
BUILD_COMMAND make build_libs -j${PROCESSOR_COUNT}
BUILD_IN_SOURCE FALSE
INSTALL_COMMAND make install_dev
)
Expand Down

0 comments on commit 6bdebaf

Please sign in to comment.