Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release build for producer C #428

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMake/Dependencies/libcurl-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ endif()

set(CMAKE_ARGS
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX}
-DBUILD_CURL_EXE=0
-DHTTP_ONLY=1)
Expand Down
14 changes: 0 additions & 14 deletions CMake/Dependencies/libjsmn-CMakeLists.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to delete these?

This file was deleted.

17 changes: 0 additions & 17 deletions CMake/Dependencies/libjsmn-add-cmakelists.patch

This file was deleted.

2 changes: 1 addition & 1 deletion CMake/Dependencies/libmbedtls-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ExternalProject_Add(
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX}
-DUSE_SHARED_MBEDTLS_LIBRARY=${BUILD_SHARED}
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_MACOSX_RPATH=${CMAKE_MACOSX_RPATH}
BUILD_ALWAYS TRUE
TEST_COMMAND "")
1 change: 1 addition & 0 deletions CMake/Dependencies/libwebsockets-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ExternalProject_Add(project_libwebsockets
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX}
-DLWS_WITH_HTTP2=1
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DLWS_HAVE_HMAC_CTX_new=1
-DLWS_HAVE_SSL_EXTRA_CHAIN_CERTS=1
-DLWS_HAVE_OPENSSL_ECDH_H=1
Expand Down
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ endif()

message(STATUS "Kinesis Video Producer path is ${KINESIS_VIDEO_PRODUCER_C_SRC}")

if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting CMAKE_BUILD_TYPE to Release by default")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE)
endif()

if(BUILD_DEPENDENCIES)
if (NOT OPEN_SRC_INSTALL_PREFIX)
set(OPEN_SRC_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/open-source)
Expand Down Expand Up @@ -88,7 +93,7 @@ if(BUILD_DEPENDENCIES)
-DBUILD_OPENSSL_PLATFORM=${BUILD_OPENSSL_PLATFORM})
build_dependency(openssl ${BUILD_ARGS})
elseif(USE_MBEDTLS)
set(BUILD_ARGS -DBUILD_STATIC=${BUILD_STATIC})
set(BUILD_ARGS -DBUILD_STATIC=${BUILD_STATIC} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
build_dependency(mbedtls ${BUILD_ARGS})
else()
message(FATAL_ERROR "No crypto library selected.")
Expand All @@ -97,6 +102,7 @@ if(BUILD_DEPENDENCIES)

if (BUILD_COMMON_LWS)
set(BUILD_ARGS -DBUILD_STATIC=${BUILD_STATIC}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DOPENSSL_DIR=${OPEN_SRC_INSTALL_PREFIX}
-DUSE_OPENSSL=${USE_OPENSSL}
-DUSE_MBEDTLS=${USE_MBEDTLS})
Expand All @@ -105,6 +111,7 @@ if(BUILD_DEPENDENCIES)

if (BUILD_COMMON_CURL)
set(BUILD_ARGS -DBUILD_STATIC=${BUILD_STATIC}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DUSE_OPENSSL=${USE_OPENSSL}
-DUSE_MBEDTLS=${USE_MBEDTLS})
build_dependency(curl ${BUILD_ARGS})
Expand Down
9 changes: 8 additions & 1 deletion tst/ProducerTestFixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,16 @@ ProducerClientTestBase::ProducerClientTestBase() :
mDescribeFailCount(0),
mDescribeRecoverCount(0)
{
STATUS retStatus = STATUS_SUCCESS;
auto logLevelStr = GETENV("AWS_KVS_LOG_LEVEL");
if (logLevelStr != NULL) {
assert(STRTOUI32(logLevelStr, NULL, 10, &this->loggerLogLevel) == STATUS_SUCCESS);
retStatus = STRTOUI32(logLevelStr, NULL, 10, &this->loggerLogLevel);
if (retStatus != STATUS_SUCCESS) {
// Throwing instead of asserting since this is being done in a constructor. ASSERT_EQ
// causes the function to exit immediately and constructor does not have a return type.
// The goal is to ensure if an env is set, it is set with a valid value and not empty
throw std::runtime_error("Failed to set log level from env");
}
SET_LOGGER_LOG_LEVEL(this->loggerLogLevel);
}

Expand Down
Loading