diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94508e13b3..2572489ab3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -718,7 +718,7 @@ jobs: - name: Check Stack Size is Set run: | cd build - CMAKE_LOGS=$(cmake .. -DKVS_STACK_SIZE=65536 2>&1) + CMAKE_LOGS=$(cmake .. -DKVS_STACK_SIZE=65536 -DBUILD_SAMPLE=OFF 2>&1) if ! echo "$CMAKE_LOGS" | grep -q "Building with default stack size: 65536 bytes"; then echo "Stack size was not sent to PIC properly. See the logs below:" echo "$CMAKE_LOGS" diff --git a/CMake/Dependencies/libkvsCommonLws-CMakeLists.txt b/CMake/Dependencies/libkvsCommonLws-CMakeLists.txt index 9ad304d777..d36fd52cbf 100644 --- a/CMake/Dependencies/libkvsCommonLws-CMakeLists.txt +++ b/CMake/Dependencies/libkvsCommonLws-CMakeLists.txt @@ -19,6 +19,7 @@ ExternalProject_Add(libkvsCommonLws-download -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DUSE_OPENSSL=${USE_OPENSSL} -DUSE_MBEDTLS=${USE_MBEDTLS} + -DKVS_DEFAULT_STACK_SIZE=${KVS_DEFAULT_STACK_SIZE} -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -DBUILD_STATIC=${BUILD_STATIC} BUILD_ALWAYS TRUE diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b99b97423..ebb56984b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,7 +60,7 @@ else() string(REGEX MATCH "^[0-9]+$" IS_KVS_STACK_SIZE_A_NUMBER "${KVS_STACK_SIZE}") if(IS_KVS_STACK_SIZE_A_NUMBER) message(STATUS "Setting default stack size to provided value: ${KVS_STACK_SIZE} bytes") - add_definitions(-DKVS_DEFAULT_STACK_SIZE=${KVS_STACK_SIZE}) + set(KVS_DEFAULT_STACK_SIZE ${KVS_STACK_SIZE}) else() message(FATAL_ERROR "KVS_STACK_SIZE must be a numeric value, but got: ${KVS_STACK_SIZE}") endif()