diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 795153958d..75c8c94ca3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -245,7 +245,7 @@ jobs: fi - name: Upload doxygen artifact if main branch if: success() && github.ref == 'refs/heads/main' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: doxygen.zip path: ./doxygen.zip @@ -284,7 +284,7 @@ jobs: uses: FreeRTOS/CI-CD-GitHub-Actions/link-verifier@main with: path: ./ - exclude-dirs: cmock,unity,cbmc,third-party,3rdparty,libmosquitto + exclude-dirs: cmock,unity,cbmc,third-party,3rdparty,libmosquitto,libraries include-file-types: .c,.h,.dox allowlist-file: ./.github/links_allowlist.txt verify-manifest: diff --git a/.github/workflows/localhost_demo_runner.yml b/.github/workflows/localhost_demo_runner.yml index a942968a82..26df0c6e55 100644 --- a/.github/workflows/localhost_demo_runner.yml +++ b/.github/workflows/localhost_demo_runner.yml @@ -205,7 +205,7 @@ jobs: - name: 'Upload demo logs' if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: demo_run_logs path: demo_run_logs diff --git a/.github/workflows/tag-and-zip.yml b/.github/workflows/tag-and-zip.yml index 8fdf018ef8..561beb2815 100644 --- a/.github/workflows/tag-and-zip.yml +++ b/.github/workflows/tag-and-zip.yml @@ -110,7 +110,7 @@ jobs: ctest -E system --output-on-failure cd .. - name: Create artifact of ZIP - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }}.zip path: zip-check/aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }}.zip diff --git a/demos/defender/defender_demo_json/CMakeLists.txt b/demos/defender/defender_demo_json/CMakeLists.txt index 3b6f3357d5..617b76b07c 100644 --- a/demos/defender/defender_demo_json/CMakeLists.txt +++ b/demos/defender/defender_demo_json/CMakeLists.txt @@ -1,16 +1,16 @@ set( DEMO_NAME "defender_demo" ) # Include MQTT library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # Include JSON library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreJSON/jsonFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreJSON/jsonFilePaths.cmake ) # Include Defender library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/aws/device-defender-for-aws-iot-embedded-sdk/defenderFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/aws/device-defender-for-aws-iot-embedded-sdk/defenderFilePaths.cmake ) # CPP files are searched for supporting CI build checks that verify C++ linkage of the Device Defender library file( GLOB DEMO_SRCS "*.c*" ) diff --git a/demos/fleet_provisioning/fleet_provisioning_keys_cert/CMakeLists.txt b/demos/fleet_provisioning/fleet_provisioning_keys_cert/CMakeLists.txt index 1a2dd0a33a..b1faeb5337 100644 --- a/demos/fleet_provisioning/fleet_provisioning_keys_cert/CMakeLists.txt +++ b/demos/fleet_provisioning/fleet_provisioning_keys_cert/CMakeLists.txt @@ -1,17 +1,17 @@ set( DEMO_NAME "fleet_provisioning_keys_cert_demo" ) # Include MQTT library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # Include Fleet Provisioning library's source and header path variables. include( - ${CMAKE_SOURCE_DIR}/libraries/aws/fleet-provisioning-for-aws-iot-embedded-sdk/fleetprovisioningFilePaths.cmake ) + ${ROOT_DIR}/libraries/aws/fleet-provisioning-for-aws-iot-embedded-sdk/fleetprovisioningFilePaths.cmake ) # Set path to corePKCS11 and it's third party libraries. -set(COREPKCS11_LOCATION "${CMAKE_SOURCE_DIR}/libraries/standard/corePKCS11") +set(COREPKCS11_LOCATION "${ROOT_DIR}/libraries/standard/corePKCS11") set(CORE_PKCS11_3RDPARTY_LOCATION "${COREPKCS11_LOCATION}/source/dependency/3rdparty") # Include PKCS #11 library's source and header path variables. @@ -50,7 +50,7 @@ target_include_directories( ${DEMO_NAME} ${AWS_DEMO_INCLUDE_DIRS} "${FLEET_PROVISIONING_INCLUDE_PUBLIC_DIRS}" "${DEMOS_DIR}/pkcs11/common/include" # corePKCS11 config - "${CMAKE_SOURCE_DIR}/platform/include" + "${ROOT_DIR}/platform/include" "${CMAKE_CURRENT_LIST_DIR}" PRIVATE "${CORE_PKCS11_3RDPARTY_LOCATION}/mbedtls_utils" ) diff --git a/demos/fleet_provisioning/fleet_provisioning_with_csr/CMakeLists.txt b/demos/fleet_provisioning/fleet_provisioning_with_csr/CMakeLists.txt index 451ca2857a..a6928cf75f 100644 --- a/demos/fleet_provisioning/fleet_provisioning_with_csr/CMakeLists.txt +++ b/demos/fleet_provisioning/fleet_provisioning_with_csr/CMakeLists.txt @@ -1,17 +1,17 @@ set( DEMO_NAME "fleet_provisioning_with_csr_demo" ) # Include MQTT library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # Include Fleet Provisioning library's source and header path variables. include( - ${CMAKE_SOURCE_DIR}/libraries/aws/fleet-provisioning-for-aws-iot-embedded-sdk/fleetprovisioningFilePaths.cmake ) + ${ROOT_DIR}/libraries/aws/fleet-provisioning-for-aws-iot-embedded-sdk/fleetprovisioningFilePaths.cmake ) # Set path to corePKCS11 and it's third party libraries. -set(COREPKCS11_LOCATION "${CMAKE_SOURCE_DIR}/libraries/standard/corePKCS11") +set(COREPKCS11_LOCATION "${ROOT_DIR}/libraries/standard/corePKCS11") set(CORE_PKCS11_3RDPARTY_LOCATION "${COREPKCS11_LOCATION}/source/dependency/3rdparty") # Include PKCS #11 library's source and header path variables. @@ -50,7 +50,7 @@ target_include_directories( ${DEMO_NAME} ${AWS_DEMO_INCLUDE_DIRS} "${FLEET_PROVISIONING_INCLUDE_PUBLIC_DIRS}" "${DEMOS_DIR}/pkcs11/common/include" # corePKCS11 config - "${CMAKE_SOURCE_DIR}/platform/include" + "${ROOT_DIR}/platform/include" "${CMAKE_CURRENT_LIST_DIR}" PRIVATE "${CORE_PKCS11_3RDPARTY_LOCATION}/mbedtls_utils" ) diff --git a/demos/greengrass/greengrass_demo_local_auth/CMakeLists.txt b/demos/greengrass/greengrass_demo_local_auth/CMakeLists.txt index fd7c0d65f8..cafb632ea0 100644 --- a/demos/greengrass/greengrass_demo_local_auth/CMakeLists.txt +++ b/demos/greengrass/greengrass_demo_local_auth/CMakeLists.txt @@ -1,10 +1,10 @@ set( DEMO_NAME "greengrass_demo_local_auth" ) # Include MQTT library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # CPP files are searched for supporting CI build checks that verify C++ linkage of the coreMQTT library file( GLOB DEMO_FILE "${DEMO_NAME}.c*" ) diff --git a/demos/http/http_demo_basic_tls/CMakeLists.txt b/demos/http/http_demo_basic_tls/CMakeLists.txt index 4fe6148ec8..b11d56e6fd 100644 --- a/demos/http/http_demo_basic_tls/CMakeLists.txt +++ b/demos/http/http_demo_basic_tls/CMakeLists.txt @@ -1,10 +1,10 @@ set( DEMO_NAME "http_demo_basic_tls" ) # Include HTTP library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # CPP files are searched for supporting CI build checks that verify C++ linkage of the coreHTTP library file( GLOB DEMO_FILE "${DEMO_NAME}.c*" ) diff --git a/demos/http/http_demo_mutual_auth/CMakeLists.txt b/demos/http/http_demo_mutual_auth/CMakeLists.txt index 7bfb9e10fe..f1515a5b9f 100644 --- a/demos/http/http_demo_mutual_auth/CMakeLists.txt +++ b/demos/http/http_demo_mutual_auth/CMakeLists.txt @@ -1,10 +1,10 @@ set( DEMO_NAME "http_demo_mutual_auth" ) # Include HTTP library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # CPP files are searched for supporting CI build checks that verify C++ linkage of the coreHTTP library file( GLOB DEMO_FILE "${DEMO_NAME}.c*" ) diff --git a/demos/http/http_demo_plaintext/CMakeLists.txt b/demos/http/http_demo_plaintext/CMakeLists.txt index 7005cfcd96..42d16c6723 100644 --- a/demos/http/http_demo_plaintext/CMakeLists.txt +++ b/demos/http/http_demo_plaintext/CMakeLists.txt @@ -1,10 +1,10 @@ set( DEMO_NAME "http_demo_plaintext" ) # Include HTTP library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # CPP files are searched for supporting CI build checks that verify C++ linkage of the coreHTTP library file( GLOB DEMO_FILE "${DEMO_NAME}.c*" ) diff --git a/demos/http/http_demo_s3_download/CMakeLists.txt b/demos/http/http_demo_s3_download/CMakeLists.txt index 7b0fe9df0d..ccc11f6e64 100644 --- a/demos/http/http_demo_s3_download/CMakeLists.txt +++ b/demos/http/http_demo_s3_download/CMakeLists.txt @@ -1,16 +1,16 @@ set( DEMO_NAME "http_demo_s3_download" ) # Include HTTP library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # Include coreJSON library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreJSON/jsonFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreJSON/jsonFilePaths.cmake ) # Include sigV4 library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/aws/sigv4-for-aws-iot-embedded-sdk/sigv4FilePaths.cmake ) +include( ${ROOT_DIR}/libraries/aws/sigv4-for-aws-iot-embedded-sdk/sigv4FilePaths.cmake ) # CPP files are searched for supporting CI build checks that verify C++ linkage of the coreHTTP library file( GLOB DEMO_FILE "${DEMO_NAME}.c*" ) diff --git a/demos/http/http_demo_s3_download_multithreaded/CMakeLists.txt b/demos/http/http_demo_s3_download_multithreaded/CMakeLists.txt index 9ea81f167c..a7120c605e 100644 --- a/demos/http/http_demo_s3_download_multithreaded/CMakeLists.txt +++ b/demos/http/http_demo_s3_download_multithreaded/CMakeLists.txt @@ -1,10 +1,10 @@ set( DEMO_NAME "http_demo_s3_download_multithreaded" ) # Include HTTP library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # CPP files are searched for supporting CI build checks that verify C++ linkage of the coreHTTP library file( GLOB DEMO_FILE "${DEMO_NAME}.c*" ) diff --git a/demos/http/http_demo_s3_generate_presigned_url/CMakeLists.txt b/demos/http/http_demo_s3_generate_presigned_url/CMakeLists.txt index b951af6226..1e7087c82c 100644 --- a/demos/http/http_demo_s3_generate_presigned_url/CMakeLists.txt +++ b/demos/http/http_demo_s3_generate_presigned_url/CMakeLists.txt @@ -1,16 +1,16 @@ set( DEMO_NAME "http_demo_s3_generate_presigned_url" ) # Include HTTP library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # Include coreJSON library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreJSON/jsonFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreJSON/jsonFilePaths.cmake ) # Include sigV4 library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/aws/sigv4-for-aws-iot-embedded-sdk/sigv4FilePaths.cmake ) +include( ${ROOT_DIR}/libraries/aws/sigv4-for-aws-iot-embedded-sdk/sigv4FilePaths.cmake ) # CPP files are searched for supporting CI build checks that verify C++ linkage of the coreHTTP library file( GLOB DEMO_FILE "${DEMO_NAME}.c*" ) diff --git a/demos/http/http_demo_s3_upload/CMakeLists.txt b/demos/http/http_demo_s3_upload/CMakeLists.txt index 71703217b8..7f8fa2e788 100644 --- a/demos/http/http_demo_s3_upload/CMakeLists.txt +++ b/demos/http/http_demo_s3_upload/CMakeLists.txt @@ -1,10 +1,10 @@ set( DEMO_NAME "http_demo_s3_upload" ) # Include HTTP library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # CPP files are searched for supporting CI build checks that verify C++ linkage of the coreHTTP library file( GLOB DEMO_FILE "${DEMO_NAME}.c*" ) diff --git a/demos/jobs/jobs_demo_mosquitto/CMakeLists.txt b/demos/jobs/jobs_demo_mosquitto/CMakeLists.txt index 296819b06e..651b407b56 100644 --- a/demos/jobs/jobs_demo_mosquitto/CMakeLists.txt +++ b/demos/jobs/jobs_demo_mosquitto/CMakeLists.txt @@ -4,8 +4,8 @@ set( DEMO_NAME "jobs_demo_mosquitto" ) set_source_files_properties( "${DEMO_NAME}.c" PROPERTIES COMPILE_FLAGS "-Wno-unused-parameter" ) # Include library source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreJSON/jsonFilePaths.cmake ) -include( ${CMAKE_SOURCE_DIR}/libraries/aws/jobs-for-aws-iot-embedded-sdk/jobsFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreJSON/jsonFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/aws/jobs-for-aws-iot-embedded-sdk/jobsFilePaths.cmake ) # Demo target. add_executable( diff --git a/demos/mqtt/mqtt_demo_basic_tls/CMakeLists.txt b/demos/mqtt/mqtt_demo_basic_tls/CMakeLists.txt index 7fe7fcdf7f..900c9617f6 100644 --- a/demos/mqtt/mqtt_demo_basic_tls/CMakeLists.txt +++ b/demos/mqtt/mqtt_demo_basic_tls/CMakeLists.txt @@ -1,10 +1,10 @@ set( DEMO_NAME "mqtt_demo_basic_tls" ) # Include MQTT library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # CPP files are searched for supporting CI build checks that verify C++ linkage of the coreMQTT library file( GLOB DEMO_FILE "${DEMO_NAME}.c*" ) diff --git a/demos/mqtt/mqtt_demo_mutual_auth/CMakeLists.txt b/demos/mqtt/mqtt_demo_mutual_auth/CMakeLists.txt index 6cfbc6a8ab..7a3c65cdac 100644 --- a/demos/mqtt/mqtt_demo_mutual_auth/CMakeLists.txt +++ b/demos/mqtt/mqtt_demo_mutual_auth/CMakeLists.txt @@ -1,10 +1,10 @@ set( DEMO_NAME "mqtt_demo_mutual_auth" ) # Include MQTT library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # CPP files are searched for supporting CI build checks that verify C++ linkage of the coreMQTT library file( GLOB DEMO_FILE "${DEMO_NAME}.c*" ) diff --git a/demos/mqtt/mqtt_demo_plaintext/CMakeLists.txt b/demos/mqtt/mqtt_demo_plaintext/CMakeLists.txt index dbb760ac04..a684a04934 100644 --- a/demos/mqtt/mqtt_demo_plaintext/CMakeLists.txt +++ b/demos/mqtt/mqtt_demo_plaintext/CMakeLists.txt @@ -1,10 +1,10 @@ set( DEMO_NAME "mqtt_demo_plaintext" ) # Include MQTT library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # CPP files are searched for supporting CI build checks that verify C++ linkage of the coreMQTT library file( GLOB DEMO_FILE "${DEMO_NAME}.c*" ) diff --git a/demos/mqtt/mqtt_demo_serializer/CMakeLists.txt b/demos/mqtt/mqtt_demo_serializer/CMakeLists.txt index e3568395b3..6e6df75477 100644 --- a/demos/mqtt/mqtt_demo_serializer/CMakeLists.txt +++ b/demos/mqtt/mqtt_demo_serializer/CMakeLists.txt @@ -1,10 +1,10 @@ set( DEMO_NAME "mqtt_demo_serializer" ) # Include MQTT library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # CPP files are searched for supporting CI build checks that verify C++ linkage of the coreMQTT library file( GLOB DEMO_FILE "${DEMO_NAME}.c*" ) diff --git a/demos/mqtt/mqtt_demo_subscription_manager/CMakeLists.txt b/demos/mqtt/mqtt_demo_subscription_manager/CMakeLists.txt index 0b79208934..4db75ff01f 100644 --- a/demos/mqtt/mqtt_demo_subscription_manager/CMakeLists.txt +++ b/demos/mqtt/mqtt_demo_subscription_manager/CMakeLists.txt @@ -2,10 +2,10 @@ add_subdirectory( ${CMAKE_CURRENT_LIST_DIR}/subscription-manager ) # Include MQTT library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) set( DEMO_NAME "mqtt_demo_subscription_manager" ) diff --git a/demos/mqtt/mqtt_demo_subscription_manager/subscription-manager/CMakeLists.txt b/demos/mqtt/mqtt_demo_subscription_manager/subscription-manager/CMakeLists.txt index f306fe4667..9df87c8ca3 100644 --- a/demos/mqtt/mqtt_demo_subscription_manager/subscription-manager/CMakeLists.txt +++ b/demos/mqtt/mqtt_demo_subscription_manager/subscription-manager/CMakeLists.txt @@ -1,8 +1,8 @@ # Include MQTT library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) set( LIBRARY_NAME "mqtt_subscription_manager" ) diff --git a/demos/ota/ota_demo_core_http/CMakeLists.txt b/demos/ota/ota_demo_core_http/CMakeLists.txt index 05f9123b6a..da38631135 100644 --- a/demos/ota/ota_demo_core_http/CMakeLists.txt +++ b/demos/ota/ota_demo_core_http/CMakeLists.txt @@ -1,12 +1,12 @@ set( DEMO_NAME "ota_demo_core_http" ) # Include required library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/aws/ota-for-aws-iot-embedded-sdk/otaFilePaths.cmake ) -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/aws/ota-for-aws-iot-embedded-sdk/otaFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # Disable some warnings for llhttp sources. set_source_files_properties( diff --git a/demos/ota/ota_demo_core_mqtt/CMakeLists.txt b/demos/ota/ota_demo_core_mqtt/CMakeLists.txt index fe4d6b427b..e0df7ed4da 100644 --- a/demos/ota/ota_demo_core_mqtt/CMakeLists.txt +++ b/demos/ota/ota_demo_core_mqtt/CMakeLists.txt @@ -1,11 +1,11 @@ set( DEMO_NAME "ota_demo_core_mqtt" ) # Include required library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/aws/ota-for-aws-iot-embedded-sdk/otaFilePaths.cmake ) -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/aws/ota-for-aws-iot-embedded-sdk/otaFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # Demo target. add_executable( diff --git a/demos/pkcs11/pkcs11_demo_management_and_rng/CMakeLists.txt b/demos/pkcs11/pkcs11_demo_management_and_rng/CMakeLists.txt index 855ec83725..d8ef99c8ca 100644 --- a/demos/pkcs11/pkcs11_demo_management_and_rng/CMakeLists.txt +++ b/demos/pkcs11/pkcs11_demo_management_and_rng/CMakeLists.txt @@ -1,7 +1,7 @@ set( DEMO_NAME "pkcs11_demo_management_and_rng" ) # Set path to corePKCS11 and it's third party libraries. -set(COREPKCS11_LOCATION "${CMAKE_SOURCE_DIR}/libraries/standard/corePKCS11") +set(COREPKCS11_LOCATION "${ROOT_DIR}/libraries/standard/corePKCS11") set(CORE_PKCS11_3RDPARTY_LOCATION "${COREPKCS11_LOCATION}/source/dependency/3rdparty") # Include PKCS #11 library's source and header path variables. diff --git a/demos/pkcs11/pkcs11_demo_mechanisms_and_digests/CMakeLists.txt b/demos/pkcs11/pkcs11_demo_mechanisms_and_digests/CMakeLists.txt index f765f4f966..ee80b6b3f4 100644 --- a/demos/pkcs11/pkcs11_demo_mechanisms_and_digests/CMakeLists.txt +++ b/demos/pkcs11/pkcs11_demo_mechanisms_and_digests/CMakeLists.txt @@ -1,7 +1,7 @@ set( DEMO_NAME "pkcs11_demo_mechanisms_and_digests" ) # Set path to corePKCS11 and its third party libraries. -set(COREPKCS11_LOCATION "${CMAKE_SOURCE_DIR}/libraries/standard/corePKCS11") +set(COREPKCS11_LOCATION "${ROOT_DIR}/libraries/standard/corePKCS11") set(CORE_PKCS11_3RDPARTY_LOCATION "${COREPKCS11_LOCATION}/source/dependency/3rdparty") # Include PKCS #11 library's source and header path variables. diff --git a/demos/pkcs11/pkcs11_demo_objects/CMakeLists.txt b/demos/pkcs11/pkcs11_demo_objects/CMakeLists.txt index e03a311098..c66c823350 100644 --- a/demos/pkcs11/pkcs11_demo_objects/CMakeLists.txt +++ b/demos/pkcs11/pkcs11_demo_objects/CMakeLists.txt @@ -1,7 +1,7 @@ set( DEMO_NAME "pkcs11_demo_objects" ) # Set path to corePKCS11 and it's third party libraries. -set(COREPKCS11_LOCATION "${CMAKE_SOURCE_DIR}/libraries/standard/corePKCS11") +set(COREPKCS11_LOCATION "${ROOT_DIR}/libraries/standard/corePKCS11") set(CORE_PKCS11_3RDPARTY_LOCATION "${COREPKCS11_LOCATION}/source/dependency/3rdparty") # Include PKCS #11 library's source and header path variables. diff --git a/demos/pkcs11/pkcs11_demo_sign_and_verify/CMakeLists.txt b/demos/pkcs11/pkcs11_demo_sign_and_verify/CMakeLists.txt index f8498ef0a1..f171e88a5d 100644 --- a/demos/pkcs11/pkcs11_demo_sign_and_verify/CMakeLists.txt +++ b/demos/pkcs11/pkcs11_demo_sign_and_verify/CMakeLists.txt @@ -1,7 +1,7 @@ set( DEMO_NAME "pkcs11_demo_sign_and_verify" ) # Set path to corePKCS11 and it's third party libraries. -set(COREPKCS11_LOCATION "${CMAKE_SOURCE_DIR}/libraries/standard/corePKCS11") +set(COREPKCS11_LOCATION "${ROOT_DIR}/libraries/standard/corePKCS11") set(CORE_PKCS11_3RDPARTY_LOCATION "${COREPKCS11_LOCATION}/source/dependency/3rdparty") # Include PKCS #11 library's source and header path variables. diff --git a/demos/shadow/shadow_demo_main/CMakeLists.txt b/demos/shadow/shadow_demo_main/CMakeLists.txt index 6eac4a4e41..c46186678b 100755 --- a/demos/shadow/shadow_demo_main/CMakeLists.txt +++ b/demos/shadow/shadow_demo_main/CMakeLists.txt @@ -1,16 +1,16 @@ set( DEMO_NAME "shadow_demo_main" ) # Include MQTT library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # Include Shadow library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/aws/device-shadow-for-aws-iot-embedded-sdk/shadowFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/aws/device-shadow-for-aws-iot-embedded-sdk/shadowFilePaths.cmake ) # Include JSON library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreJSON/jsonFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreJSON/jsonFilePaths.cmake ) # CPP files are searched for supporting CI build checks that verify C++ linkage of the Device Shadow library file( GLOB DEMO_SRCS "shadow_demo_helpers.c" "*.c*" ) diff --git a/integration-test/http/CMakeLists.txt b/integration-test/http/CMakeLists.txt index 7ad04e8b80..3de42d4aed 100644 --- a/integration-test/http/CMakeLists.txt +++ b/integration-test/http/CMakeLists.txt @@ -2,10 +2,10 @@ project ("http system test") cmake_minimum_required (VERSION 3.2.0) # Include HTTP library's source and header path variables. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/coreHTTP/httpFilePaths.cmake ) # Include backoffAlgorithm library file path configuration. -include( ${CMAKE_SOURCE_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) +include( ${ROOT_DIR}/libraries/standard/backoffAlgorithm/backoffAlgorithmFilePaths.cmake ) # ==================== Define your project name (edit) ======================== set(project_name "http_system") diff --git a/integration-test/mqtt/CMakeLists.txt b/integration-test/mqtt/CMakeLists.txt index 0fffc7fc0e..76520cbdf3 100644 --- a/integration-test/mqtt/CMakeLists.txt +++ b/integration-test/mqtt/CMakeLists.txt @@ -2,7 +2,7 @@ project ("mqtt system test") cmake_minimum_required (VERSION 3.2.0) # Include MQTT library's source and header path variables. -include("${CMAKE_SOURCE_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake") +include("${ROOT_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake") # ==================== Define your project name (edit) ======================== set(project_name "mqtt_system") diff --git a/integration-test/shadow/CMakeLists.txt b/integration-test/shadow/CMakeLists.txt index d32fec1b78..e6ec9d84ef 100644 --- a/integration-test/shadow/CMakeLists.txt +++ b/integration-test/shadow/CMakeLists.txt @@ -2,9 +2,9 @@ project ("shadow system test") cmake_minimum_required (VERSION 3.2.0) # Include MQTT library's source and header path variables. -include("${CMAKE_SOURCE_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake") +include("${ROOT_DIR}/libraries/standard/coreMQTT/mqttFilePaths.cmake") -include("${CMAKE_SOURCE_DIR}/libraries/aws/device-shadow-for-aws-iot-embedded-sdk/shadowFilePaths.cmake") +include("${ROOT_DIR}/libraries/aws/device-shadow-for-aws-iot-embedded-sdk/shadowFilePaths.cmake") # ==================== Define your project name (edit) ======================== set(project_name "shadow_system") diff --git a/platform/posix/transport/CMakeLists.txt b/platform/posix/transport/CMakeLists.txt index f5ee9ddbb9..c167a895d8 100644 --- a/platform/posix/transport/CMakeLists.txt +++ b/platform/posix/transport/CMakeLists.txt @@ -41,7 +41,7 @@ target_link_libraries( openssl_posix ${CMAKE_DL_LIBS} ) # Set path to corePKCS11 and it's third party libraries. -set(COREPKCS11_LOCATION "${CMAKE_SOURCE_DIR}/libraries/standard/corePKCS11") +set(COREPKCS11_LOCATION "${ROOT_DIR}/libraries/standard/corePKCS11") set(CORE_PKCS11_3RDPARTY_LOCATION "${COREPKCS11_LOCATION}/source/dependency/3rdparty") # Include PKCS #11 library's source and header path variables. diff --git a/tools/cmock/coverage.cmake b/tools/cmock/coverage.cmake index 5181fa8de4..b0b9208803 100644 --- a/tools/cmock/coverage.cmake +++ b/tools/cmock/coverage.cmake @@ -37,7 +37,7 @@ endforeach() # generate Junit style xml output execute_process(COMMAND ruby - ${CMAKE_SOURCE_DIR}/../libraries/3rdparty/CMock/vendor/unity/auto/parse_output.rb + ${ROOT_DIR}/libraries/3rdparty/CMock/vendor/unity/auto/parse_output.rb -xml ${REPORT_FILE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) diff --git a/tools/cmock/create_test.cmake b/tools/cmock/create_test.cmake index ec0efc8e3c..22cfc9d6ab 100644 --- a/tools/cmock/create_test.cmake +++ b/tools/cmock/create_test.cmake @@ -11,8 +11,8 @@ function(create_test test_name get_filename_component(test_src_absolute ${test_src} ABSOLUTE) add_custom_command(OUTPUT ${test_name}_runner.c COMMAND ruby - ${CMAKE_SOURCE_DIR}/libraries/3rdparty/CMock/vendor/unity/auto/generate_test_runner.rb - ${CMAKE_SOURCE_DIR}/tools/cmock/project.yml + ${ROOT_DIR}/libraries/3rdparty/CMock/vendor/unity/auto/generate_test_runner.rb + ${ROOT_DIR}/tools/cmock/project.yml ${test_src_absolute} ${test_name}_runner.c DEPENDS ${test_src} @@ -26,10 +26,10 @@ function(create_test test_name if((DEFINED VARGS_USE_CUSTOM_RUNNER) AND (${VARGS_USE_CUSTOM_RUNNER})) add_executable(${test_name} ${test_src} - ${CMAKE_SOURCE_DIR}/integration-test/custom_test_runner/custom_unity_runner.c) + ${ROOT_DIR}/integration-test/custom_test_runner/custom_unity_runner.c) target_include_directories(${test_name} PUBLIC - ${CMAKE_SOURCE_DIR}/integration-test/custom_test_runner) + ${ROOT_DIR}/integration-test/custom_test_runner) target_compile_definitions(${test_name} PUBLIC -DUSE_CUSTOM_RUNNER=1) else() add_executable(${test_name} ${test_src} ${test_name}_runner.c) @@ -123,7 +123,7 @@ function(create_mock_list mock_name add_custom_command ( OUTPUT ${mocks_dir}/mock_${mock_file_name}.c COMMAND ruby - ${CMAKE_SOURCE_DIR}/libraries/3rdparty/CMock/lib/cmock.rb + ${ROOT_DIR}/libraries/3rdparty/CMock/lib/cmock.rb -o${cmock_config} ${mock_file_abs} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )