forked from openenclave/openenclave
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeSettings.json
142 lines (140 loc) · 6.34 KB
/
CMakeSettings.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
// This file illustrates CMake settings to use for building and testing against
// WSL from Visual Studio 2017. It is based on the default CMakeSettings.json
// with the addition of two custom configurations: x64-Debug-tests and
// x64-Release-tests. These configurations allow a workflow for building a
// Windows OpenEnclave host app with a Linux enclave binary in 3 steps:
//
// 1. Build Windows host binaries using x64-Debug|Release configurations
// 2. Build Linux enclave binaries using Linux-Debug|Release configurations
// 3. Build Windows tests with Linux-built test enclaves from step 2 by
// using x64-Debug|Release-tests configurations
//
// The test configurations specify the additional cmakeCommandArgs to enable
// retrieving the binaries built in WSL during the second step:
//
// ADD_WINDOWS_ENCLAVE_TESTS = 1
// - This enables the CMake build option to only build Windows enclave tests
//
// LINUX_BIN_DIR = ${env.WSL_ROOTFS}/var/tmp/build/${workspaceHash}/build/Linux-Debug/tests
// - This provides CMake with the Windows path to the WSL root file system
// - You are expected to define the global environment variable WSL_ROOTFS,
// which usually points to "C:\Users\username\AppData\Local\lxss\rootfs"
// - The rest of the path should be defined exactly as in the Linux-Debug and
// Linux-Release configurations respectively.
//
// These test configurations are otherwise identical to the x64-Debug and
// x64-Release configurations respectively. For more information on editing
// CMakeSettings.json, refer to https://go.microsoft.com//fwlink//?linkid=834763
"configurations": [
{
"name": "x86-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x86" ],
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": ""
},
{
"name": "x86-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"inheritEnvironments": [ "msvc_x86" ],
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": ""
},
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": ""
},
{
"name": "x64-Debug-tests",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
"cmakeCommandArgs": "-DADD_WINDOWS_ENCLAVE_TESTS=1 -DLINUX_BIN_DIR=${env.WSL_ROOTFS}/var/tmp/build/${workspaceHash}/build/Linux-Debug/tests ",
"buildCommandArgs": "-v",
"ctestCommandArgs": ""
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": ""
},
{
"name": "x64-Release-tests",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
"cmakeCommandArgs": "-DADD_WINDOWS_ENCLAVE_TESTS=1 -DLINUX_BIN_DIR=${env.WSL_ROOTFS}/var/tmp/build/${workspaceHash}/build/Linux-Debug/tests ",
"buildCommandArgs": "-v",
"ctestCommandArgs": ""
},
{
"name": "Linux-Debug",
"generator": "Unix Makefiles",
"remoteMachineName": "${defaultRemoteMachineName}",
"configurationType": "Debug",
"remoteCMakeListsRoot": "/var/tmp/src/${workspaceHash}/${name}",
"cmakeExecutable": "/usr/local/bin/cmake",
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
"remoteBuildRoot": "/var/tmp/build/${workspaceHash}/build/${name}",
"remoteInstallRoot": "/var/tmp/build/${workspaceHash}/install/${name}",
"remoteCopySources": true,
"remoteCopySourcesOutputVerbosity": "Normal",
"remoteCopySourcesConcurrentCopies": "10",
"remoteCopySourcesMethod": "sftp",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "linux-x64" ]
},
{
"name": "Linux-Release",
"generator": "Unix Makefiles",
"remoteMachineName": "${defaultRemoteMachineName}",
"configurationType": "Release",
"remoteCMakeListsRoot": "/var/tmp/src/${workspaceHash}/${name}",
"cmakeExecutable": "/usr/local/bin/cmake",
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
"remoteBuildRoot": "/var/tmp/build/${workspaceHash}/build/${name}",
"remoteInstallRoot": "/var/tmp/build/${workspaceHash}/install/${name}",
"remoteCopySources": true,
"remoteCopySourcesOutputVerbosity": "Normal",
"remoteCopySourcesConcurrentCopies": "10",
"remoteCopySourcesMethod": "sftp",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "linux-x64" ]
}
]
}