Skip to content

Commit

Permalink
Merge branch 'main' into add-sanitizer-ci-job
Browse files Browse the repository at this point in the history
  • Loading branch information
sfodagain committed Apr 30, 2024
2 parents 279733d + 1b92c84 commit 7e73a5e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
26 changes: 25 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ project(aws-iot-device-sdk-cpp-v2
include(CTest)

option(BUILD_DEPS "Builds aws common runtime dependencies as part of build. Turn off if you want to control your dependency chain." ON)
option(USE_EXTERNAL_DEPS_SOURCES "Use dependencies provided by add_subdirectory command" OFF)
option(BUILD_SAMPLES "(DEPRECATED) Build samples as part of the build" OFF)

if (DEFINED CMAKE_PREFIX_PATH)
Expand Down Expand Up @@ -57,6 +58,10 @@ else()
endif()

if (BUILD_DEPS)
if (USE_EXTERNAL_DEPS_SOURCES)
message(FATAL_ERROR "USE_EXTERNAL_DEPS_SOURCES option should be used with BUILD_DEPS set to OFF")
endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/crt/aws-crt-cpp/crt/aws-c-common/cmake")

include(AwsFindPackage)
Expand All @@ -70,8 +75,27 @@ if (BUILD_DEPS)
endif ()
set(BUILD_TESTING ${BUILD_TESTING_PREV})
else()
if (USE_EXTERNAL_DEPS_SOURCES)
function(validate_deps_sources dep_name)
if (NOT ${dep_name}_SOURCE_DIR)
message(FATAL_ERROR "USE_EXTERNAL_DEPS_SOURCES option is set, but ${dep_name} project is not configured."
" ${dep_name} must be added using add_subdirectory command (or one of the higher-level commands that"
" uses add_subdirectory, like FetchContent)")
endif()
endfunction()

validate_deps_sources(aws-crt-cpp)
validate_deps_sources(aws-c-iot)
validate_deps_sources(aws-c-common)

list(APPEND CMAKE_MODULE_PATH "${aws-c-common_SOURCE_DIR}/cmake")

set(IN_SOURCE_BUILD ON)
else()
set(IN_SOURCE_BUILD OFF)
endif()

include(AwsFindPackage)
set(IN_SOURCE_BUILD OFF)
endif()

include(AwsSanitizers)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ is provided by code that been generated from a model of the service.

This library is licensed under the [Apache 2.0 License](./documents/LICENSE).

Latest released version: v1.32.5
Latest released version: v1.32.6
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.32.5
1.32.6
2 changes: 1 addition & 1 deletion crt/aws-c-iot
Submodule aws-c-iot updated 1 files
+14 −0 CMakeLists.txt

0 comments on commit 7e73a5e

Please sign in to comment.