Skip to content

Build with CMake #4

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

Merged
merged 57 commits into from
Jul 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
abea714
Build with CMake
BrennanConroy Apr 2, 2019
cbca1d7
Try tests too
BrennanConroy Apr 2, 2019
68d4a19
some more work
BrennanConroy Apr 2, 2019
4e8279c
fixup test
BrennanConroy Apr 2, 2019
4377af8
vcpkg on some machines
BrennanConroy Apr 2, 2019
be52618
root?
BrennanConroy Apr 3, 2019
adefc53
whoops
BrennanConroy Apr 3, 2019
db198b6
should compile
BrennanConroy Apr 3, 2019
5ca1d9d
grumble
BrennanConroy Apr 3, 2019
f821741
cmd...
BrennanConroy Apr 3, 2019
60d6856
&
BrennanConroy Apr 3, 2019
9afd579
stuff
BrennanConroy Apr 3, 2019
0cf244d
config
BrennanConroy Apr 3, 2019
30b2cbb
flaky
BrennanConroy Apr 3, 2019
d1cbd53
deflake
BrennanConroy Apr 9, 2019
e4538d1
ignore linux failure
BrennanConroy Apr 11, 2019
105bba9
nvm
BrennanConroy Apr 11, 2019
7aedbbd
skip
BrennanConroy Apr 11, 2019
7428942
timeout?
BrennanConroy Apr 12, 2019
cda3474
try conditional
BrennanConroy Apr 12, 2019
32ed0e4
more space
BrennanConroy Apr 12, 2019
137c3a2
I tried Andrew
BrennanConroy Apr 12, 2019
6e221b3
try harder
BrennanConroy Apr 12, 2019
33c002d
shh
BrennanConroy Apr 12, 2019
9af28da
folder
BrennanConroy Apr 12, 2019
77f9e90
more folder
BrennanConroy Apr 12, 2019
0a84c83
Start README
BrennanConroy Apr 25, 2019
5d86a5b
fix some tests
BrennanConroy Apr 29, 2019
b8fafca
fix race
BrennanConroy Apr 29, 2019
be3b176
flake
BrennanConroy Apr 29, 2019
eae007e
stuff
BrennanConroy Apr 30, 2019
dfd3251
race?
BrennanConroy May 1, 2019
03d98c8
test
BrennanConroy May 7, 2019
7151e33
bash
BrennanConroy May 7, 2019
aed9d87
chmod+x
BrennanConroy May 7, 2019
0bccc6b
whoops linux too
BrennanConroy May 7, 2019
ee7d002
desperate
BrennanConroy May 7, 2019
7c63650
stealing from Andrew
BrennanConroy May 8, 2019
59c3097
revert
BrennanConroy May 21, 2019
5853d7b
empty
BrennanConroy May 21, 2019
c813012
start fb
BrennanConroy Jun 17, 2019
fefb57e
new mac
BrennanConroy Jun 17, 2019
07dc10b
baby steps
BrennanConroy Jun 17, 2019
89909e1
move install
BrennanConroy Jun 17, 2019
3ba1214
library
BrennanConroy Jun 17, 2019
20f4dbb
dest
BrennanConroy Jun 17, 2019
5f0d6d7
fix
BrennanConroy Jun 18, 2019
3ae7a67
license
BrennanConroy Jun 18, 2019
c8fe2d0
fb
BrennanConroy Jun 18, 2019
2b16d6e
more
BrennanConroy Jun 18, 2019
f8ea96a
crazy timeout
BrennanConroy Jun 18, 2019
cdc8615
right...
BrennanConroy Jun 18, 2019
affde90
clean up?
BrennanConroy Jun 19, 2019
af7299b
odd
BrennanConroy Jun 19, 2019
04876d9
fix
BrennanConroy Jul 1, 2019
0b322b3
fb
BrennanConroy Jul 2, 2019
d422037
quotes
BrennanConroy Jul 3, 2019
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
37 changes: 35 additions & 2 deletions .azure/default-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ parameters:
beforeBuild: []
afterBuild: []
timeoutInMinutes: 60
cMakeRunArgs: ''
configuration: 'Release'
gtestFlags: '--gtest_output=xml:$(Build.ArtifactStagingDirectory)/testOut/'

jobs:
- job: ${{ coalesce(parameters.jobName, parameters.agentOs) }}
Expand All @@ -13,7 +16,7 @@ jobs:
${{ if ne(parameters.poolVmImage, '') }}:
vmImage: ${{ parameters.poolVmImage }}
${{ if and(eq(parameters.poolVmImage, ''), eq(parameters.agentOs, 'macOS')) }}:
vmImage: macOS-10.13
vmImage: macOS-10.14
${{ if and(eq(parameters.poolVmImage, ''), eq(parameters.agentOs, 'Linux')) }}:
vmImage: ubuntu-16.04
steps:
Expand All @@ -22,4 +25,34 @@ jobs:

- ${{ parameters.beforeBuild }}

- ${{ parameters.afterBuild }}
- task: CMake@1
inputs:
cmakeArgs: .. ${{ parameters.cMakeRunArgs }} -DCMAKE_TOOLCHAIN_FILE=../submodules/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=${{ parameters.configuration }}
workingDirectory: 'build.${{ parameters.configuration }}'
displayName: Create build files
- task: CMake@1
inputs:
cmakeArgs: --build . --config ${{ parameters.configuration }}
workingDirectory: 'build.${{ parameters.configuration }}'
displayName: Build client
- ${{ if eq(parameters.agentOs, 'macOS') }}:
- bash: "./run-tests.sh ./build.${{ parameters.configuration }}/bin/signalrclienttests ${{ parameters.gtestFlags }}"
condition: eq( variables['Agent.OS'], 'Darwin' )
displayName: Run tests
- ${{ if eq(parameters.agentOs, 'Linux') }}:
- bash: "./run-tests.sh ./build.${{ parameters.configuration }}/bin/signalrclienttests ${{ parameters.gtestFlags }}"
condition: eq( variables['Agent.OS'], 'Linux' )
displayName: Run tests
- ${{ if eq(parameters.agentOs, 'Windows') }}:
- powershell: "& ./build.${{ parameters.configuration }}/bin/${{ parameters.configuration }}/signalrclienttests.exe ${{ parameters.gtestFlags }}"
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Run tests

- ${{ parameters.afterBuild }}

- task: PublishTestResults@2
displayName: Publish test results
condition: always()
inputs:
testRunner: junit
testResultsFiles: '$(Build.ArtifactStagingDirectory)/testOut/**/*.xml'
47 changes: 39 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,50 @@
cmake_minimum_required (VERSION 2.8.11)
cmake_minimum_required (VERSION 3.5)

if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
endif()

project (signalrclient)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -L -lcpprest")
include(CTest)

if(NOT WIN32)
set(EXTRA_FLAGS "-std=c++11 -fPIC -DNO_SIGNALRCLIENT_EXPORTS")
else()
set(EXTRA_FLAGS "-DSIGNALRCLIENT_EXPORTS")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_LDFLAGS}")

set(CPPREST_INCLUDE_DIR "" CACHE FILEPATH "Path to casablanca include dir")
find_package(cpprestsdk REQUIRED)
set(CPPREST_LIB "cpprestsdk::cpprest")
Copy link
Member

Choose a reason for hiding this comment

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

I spent 24 minutes building/installing the cpprestsdk on my mac using ./submodules/vcpkg/vcpkg install cpprestsdk (thanks C++/Boost), but when I run cmake, I get the following error:

shalter@halter73-mbp build.Release (brecon/cmake% u=)$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../submodules/vcpkg/scripts/buildsystems/vcpkg.cmake -DENABLE_TESTING=1 -DCMAKE_BUILD_TYPE=Release
CMake Error at CMakeLists.txt:18 (find_package):
  Could not find a package configuration file provided by "cpprestsdk" with
  any of the following names:

    cpprestsdkConfig.cmake
    cpprestsdk-config.cmake

  Add the installation prefix of "cpprestsdk" to CMAKE_PREFIX_PATH or set
  "cpprestsdk_DIR" to a directory containing one of the above files.  If
  "cpprestsdk" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring incomplete, errors occurred!
See also "/Users/shalter/source/aspnet/SignalR-Client-Cpp/CMakeFiles/CMakeOutput.log".

Copy link
Contributor

Choose a reason for hiding this comment

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

I had the same problem :(

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like to see the vcpkg folder on either (or both) of your machines

Copy link
Member

Choose a reason for hiding this comment

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

As in the submodules/vcpkg directory? Mine is just what's in https://github.com/Microsoft/vcpkg/tree/d1110ceb7feb527ac58f274239d435e32dca4b84 without changes.

Copy link
Member Author

Choose a reason for hiding this comment

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

At a bare minimum you should have a new file vcpkg that's runnable on your machine. But more importantly I'm looking for the submodules/vcpkg/installed folder.


include_directories (
include
"${CPPREST_INCLUDE_DIR}")
include_directories (include)

find_library(CPPREST_SO NAMES "cpprest" PATHS ${CPPREST_LIB_DIR} REQUIRED)
# TODO: We shouldn't use this, it makes the dll/lib export all symbols
# We need this for testing, but we might just add all the files to the test project manually
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

Choose a reason for hiding this comment

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

We recommend against using CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS because it has a lot of drawbacks and problems.

We would instead recommend one of:

  1. Apply dllexport as needed (remember that you can apply it to entire classes)
  2. Provide a .def file listing all the names to export. This file can simply be added to the add_library() call and CMake will take care of passing it to the linker.
  3. Only support static libraries on Windows (though this has obvious problems if you're expecting to P/Invoke from .NET)


if(NOT WIN32)
if(APPLE)
file(GLOB OPENSSL_ROOT_DIR /usr/local/Cellar/openssl/*)
list(REVERSE OPENSSL_ROOT_DIR)
endif()

find_package(OpenSSL 1.0.0 REQUIRED)
find_package(Boost REQUIRED COMPONENTS system thread chrono)
endif()

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)

add_subdirectory(src/signalrclient)
add_subdirectory(test)

if(BUILD_TESTING)
enable_testing()
add_subdirectory(test)
endif()

install(DIRECTORY include/ DESTINATION include/)
201 changes: 201 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Apache License
Copy link
Member Author

Choose a reason for hiding this comment

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

@Pilchie Could you verify that this is the correct License file?

Copied it from https://github.com/aspnet/AspNetCore

Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,41 @@
This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at https://github.com/aspnet/AspNetCore.

Use https://github.com/aspnet/AspNetCore/issues for issues with this project.

### Build on Windows ###
Copy link
Member

Choose a reason for hiding this comment

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

We should mention dependencies that need to be installed on non-macOs platform like cmake for Windows and cmake/"build-essentials"/gcc/g++ on linux.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll try to gather that info and improve the readme at a later time.

```powershell
PS> git submodule update --init
PS> .\submodules\vcpkg\bootstrap-vcpkg.bat
PS> .\submodules\vcpkg\vcpkg.exe install cpprestsdk:x64-windows
PS> mkdir build.release
PS> cd build.release
PS> cmake .. -A x64 -DCMAKE_TOOLCHAIN_FILE="..\submodules\vcpkg\scripts\buildsystems\vcpkg.cmake" -DCMAKE_BUILD_TYPE=Release
PS> cmake --build . --config Release
```
Output will be in `build.release\bin\Release\`

### Build on Mac ###
```bash
$ git submodule update --init
$ brew install gcc6
$ ./submodules/vcpkg/bootstrap-vcpkg.sh
$ ./submodules/vcpkg/vcpkg install cpprestsdk
$ mkdir build.release
$ cd build.release
$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../submodules/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
$ cmake --build . --config Release
```
Output will be in `build.release/bin/`

### Build on Linux ###

```bash
$ git submodule update --init
$ ./submodules/vcpkg/bootstrap-vcpkg.sh
$ ./submodules/vcpkg/vcpkg install cpprestsdk boost-system boost-chrono boost-thread
$ mkdir build.release
$ cd build.release
$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../submodules/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
$ cmake --build . --config Release
```
Output will be in `build.release/bin/`
16 changes: 10 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ jobs:
- template: .azure/default-build.yml
parameters:
agentOs: Windows
cMakeRunArgs: '-A x64'
beforeBuild:
- script: echo Hello, world!
displayName: 'Run a one-line script'
- powershell: "& vcpkg.exe install cpprestsdk:x64-windows --vcpkg-root ./submodules/vcpkg"
displayName: vcpkg install dependencies
Copy link
Member

Choose a reason for hiding this comment

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

Can we include this beforeBuild steps, extra cMakeRunArgs and the like for each OS in the README.md?

Copy link
Member

Choose a reason for hiding this comment

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

I would also be good to include instructions to run git submodule update --init and whatever build scripts we decide to add.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh duh, I meant to add a readme...

Copy link
Contributor

Choose a reason for hiding this comment

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

y'know what's even better than a README (though there should be one as well)? build.cmd ;)


- template: .azure/default-build.yml
parameters:
agentOs: macOs
beforeBuild:
- script: echo Hello, world!
displayName: 'Run a one-line script'
- script: brew install gcc6
- bash: "./submodules/vcpkg/bootstrap-vcpkg.sh"
displayName: Bootstrap vcpkg
- bash: "./submodules/vcpkg/vcpkg install cpprestsdk"
displayName: vcpkg install dependencies

- template: .azure/default-build.yml
parameters:
agentOs: Linux
beforeBuild:
- script: echo Hello, world!
displayName: 'Run a one-line script'
- script: sudo vcpkg install cpprestsdk boost-system boost-chrono boost-thread --vcpkg-root ./submodules/vcpkg
displayName: vcpkg install dependencies
Loading