diff --git a/.gitignore b/.gitignore index 9614d4c..877b0d4 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,4 @@ /.vscode/* /.vs -/out/build/x64-Debug (default) +/out/build diff --git a/CMakeLists.txt b/CMakeLists.txt index 8fd08f0..4d24bc8 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ #Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.5) if (TARGET umqtt) RETURN() diff --git a/build/.vsts-ci.yml b/build/.vsts-ci.yml index bd34e45..aade7d3 100644 --- a/build/.vsts-ci.yml +++ b/build/.vsts-ci.yml @@ -25,7 +25,7 @@ jobs: displayName: 'build' - job: windowsx86 pool: - name: 'aziotbld-win03' + name: 'sdk-c--win-vs2017' steps: - script: | if exist jenkins\windows_c.cmd ( @@ -53,7 +53,8 @@ jobs: - job: raspberrypi variables: _PREVIEW_VSTS_DOCKER_IMAGE: "aziotbld/raspberrypi-c-buster:brown" - pool: aziotbld-lin01 + pool: + name: 'sdk-c--ubuntu-18' displayName: raspberrypi steps: - script: | @@ -65,7 +66,8 @@ jobs: - job: linuxoptions variables: _PREVIEW_VSTS_DOCKER_IMAGE: "aziotbld/vsts-linux-c-ubuntu" - pool: aziotbld-lin01 + pool: + name: 'sdk-c--ubuntu-18' displayName: 'linux-options' steps: - script: | @@ -78,21 +80,9 @@ jobs: - script: sudo rm -rf $(Agent.BuildDirectory)/* displayName: 'cleanup' condition: always() -- job: windowscex86 - pool: - name: 'win' - steps: - - script: | - if exist jenkins\windowsce_c.cmd ( - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" - call jenkins\windowsce_c.cmd) - displayName: 'build' - - script: cd .. && rd /Q /S $(Agent.BuildDirectory)\s - displayName: 'cleanup' - condition: always() - job: windowsdynamic pool: - name: 'aziotbld-win03' + name: 'sdk-c--win-vs2017' steps: - script: | if exist jenkins\windows_c_build_as_dynamic.cmd ( @@ -153,7 +143,8 @@ jobs: - job: clang variables: _PREVIEW_VSTS_DOCKER_IMAGE: "aziotbld/ubuntu-clang" - pool: aziotbld-lin01 + pool: + name: 'sdk-c--ubuntu-18' displayName: 'clang' steps: - script: | @@ -188,7 +179,8 @@ jobs: - job: ubuntu1604 variables: _PREVIEW_VSTS_DOCKER_IMAGE: "aziotbld/linux-c-ubuntu" - pool: aziotbld-lin02 + pool: + name: 'sdk-c--ubuntu-18' displayName: 'ubuntu1604' steps: - script: | @@ -223,7 +215,8 @@ jobs: - job: linux_install_deps variables: _PREVIEW_VSTS_DOCKER_IMAGE: "aziotbld/c-debian" - pool: aziotbld-lin01 + pool: + name: 'sdk-c--ubuntu-18' displayName: 'linux_install_deps' steps: - script: | @@ -258,7 +251,8 @@ jobs: - job: debian variables: _PREVIEW_VSTS_DOCKER_IMAGE: "aziotbld/c-debian" - pool: aziotbld-lin01 + pool: + name: 'sdk-c--ubuntu-18' displayName: 'debian' steps: - script: | @@ -293,7 +287,8 @@ jobs: - job: wolfssl variables: _PREVIEW_VSTS_DOCKER_IMAGE: "aziotbld/vsts-c-wolfssl" - pool: aziotbld-lin01 + pool: + name: 'sdk-c--ubuntu-18' displayName: 'wolfssl' steps: - script: | @@ -327,7 +322,7 @@ jobs: condition: always() - job: windowsx64 pool: - name: 'aziotbld-win03' + name: 'sdk-c--win-vs2017' displayName: 'windowsx64' steps: - script: | @@ -387,4 +382,4 @@ jobs: PROVISIONING_CONNECTION_STRING_INVALIDCERT: $(PROVISIONING-CONNECTION-STRING-INVALIDCERT) - script: rm -rf $(Agent.BuildDirectory)/* displayName: 'cleanup' - condition: always() + condition: always() \ No newline at end of file diff --git a/build_all/mbed/CMakeLists.txt b/build_all/mbed/CMakeLists.txt index 1f75c14..ccb219b 100644 --- a/build_all/mbed/CMakeLists.txt +++ b/build_all/mbed/CMakeLists.txt @@ -1,7 +1,7 @@ #Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.5) set(shared_util_base_path ../../deps/c-utility) set(mbed_project_base "azure_umqtt_c" CACHE STRING "The item being built") diff --git a/build_all/windows/build.cmd b/build_all/windows/build.cmd index 6418dd2..d413620 100644 --- a/build_all/windows/build.cmd +++ b/build_all/windows/build.cmd @@ -101,6 +101,14 @@ echo %build-root%\cmake\%CMAKE_DIR% mkdir %build-root%\cmake\%CMAKE_DIR% pushd %build-root%\cmake\%CMAKE_DIR% +echo ***checking msbuild*** +where /q msbuild +IF ERRORLEVEL 1 ( +echo ***setting VC paths*** + IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat" call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat" +) +where msbuild + if %MAKE_NUGET_PKG% == yes ( echo ***Running CMAKE for Win32*** cmake %build-root% -Drun_unittests:BOOL=%CMAKE_run_unittests% diff --git a/samples/mqtt_client_sample/mbed/CMakeLists.txt b/samples/mqtt_client_sample/mbed/CMakeLists.txt index 4593dc3..1c70875 100644 --- a/samples/mqtt_client_sample/mbed/CMakeLists.txt +++ b/samples/mqtt_client_sample/mbed/CMakeLists.txt @@ -1,7 +1,7 @@ #Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.5) set(shared_util_base_path ../../../deps/c-utility) set(mbed_project_base "mqtt_client_sample" CACHE STRING "The item being built") diff --git a/tests/mqtt_client_ut/CMakeLists.txt b/tests/mqtt_client_ut/CMakeLists.txt index 7354b3c..0f7de8d 100644 --- a/tests/mqtt_client_ut/CMakeLists.txt +++ b/tests/mqtt_client_ut/CMakeLists.txt @@ -1,7 +1,7 @@ #Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.5) set(theseTestsName mqtt_client_ut) diff --git a/tests/mqtt_codec_ut/CMakeLists.txt b/tests/mqtt_codec_ut/CMakeLists.txt index f9b6aa5..54e2d1a 100644 --- a/tests/mqtt_codec_ut/CMakeLists.txt +++ b/tests/mqtt_codec_ut/CMakeLists.txt @@ -1,7 +1,7 @@ #Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.5) set(theseTestsName mqtt_codec_ut) diff --git a/tests/mqtt_message_ut/CMakeLists.txt b/tests/mqtt_message_ut/CMakeLists.txt index 63d35f5..978790e 100644 --- a/tests/mqtt_message_ut/CMakeLists.txt +++ b/tests/mqtt_message_ut/CMakeLists.txt @@ -1,7 +1,7 @@ #Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.5) set(theseTestsName mqtt_message_ut)