.vscode/tasks.json: Make build & configure work for windows.
Have this use the gn build, as the CMake approach with ninja would require finding the vcvarsall.bat, which is not easily locatable. Change-Id: Ia88194890d13f4abde6f0fc4b99f3e0da134bc4b Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/46340 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
parent
59b28c4cbc
commit
96a57f65dd
|
@ -17,27 +17,37 @@
|
||||||
"isDefault": true
|
"isDefault": true
|
||||||
},
|
},
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "sh",
|
|
||||||
"osx": {
|
"osx": {
|
||||||
|
"command": "sh",
|
||||||
"args": [
|
"args": [
|
||||||
"-c",
|
"-c",
|
||||||
"cmake --build . && echo Done"
|
"cmake --build . && echo Done"
|
||||||
]
|
],
|
||||||
|
"options": {
|
||||||
|
"cwd": "${workspaceRoot}/build",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
|
"command": "sh",
|
||||||
"args": [
|
"args": [
|
||||||
"-c",
|
"-c",
|
||||||
"cmake --build . && echo Done"
|
"cmake --build . && echo Done"
|
||||||
]
|
],
|
||||||
|
"options": {
|
||||||
|
"cwd": "${workspaceRoot}/build",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"windows": {
|
"windows": {
|
||||||
|
// Invokes ninja in the 'out/active' directory, which is created
|
||||||
|
// with the 'generate' task (see below).
|
||||||
|
"command": "cmd",
|
||||||
"args": [
|
"args": [
|
||||||
"-c",
|
"/C",
|
||||||
"cmake --build . && echo Done"
|
"ninja && echo Done"
|
||||||
]
|
],
|
||||||
},
|
"options": {
|
||||||
"options": {
|
"cwd": "${workspaceRoot}/out/active",
|
||||||
"cwd": "${workspaceRoot}/build",
|
},
|
||||||
},
|
},
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"echo": false,
|
"echo": false,
|
||||||
|
@ -61,16 +71,40 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "cmake",
|
"label": "configure",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "cmake",
|
"osx": {
|
||||||
"args": [
|
"command": "cmake",
|
||||||
"..",
|
"args": [
|
||||||
"-GNinja",
|
"..",
|
||||||
"-DCMAKE_BUILD_TYPE=${input:buildType}",
|
"-GNinja",
|
||||||
],
|
"-DCMAKE_BUILD_TYPE=${input:buildType}",
|
||||||
"options": {
|
],
|
||||||
"cwd": "${workspaceRoot}/build"
|
"options": {
|
||||||
|
"cwd": "${workspaceRoot}/build"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"linux": {
|
||||||
|
"command": "cmake",
|
||||||
|
"args": [
|
||||||
|
"..",
|
||||||
|
"-GNinja",
|
||||||
|
"-DCMAKE_BUILD_TYPE=${input:buildType}",
|
||||||
|
],
|
||||||
|
"options": {
|
||||||
|
"cwd": "${workspaceRoot}/build"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"windows": {
|
||||||
|
// Generates a GN build directory at 'out/<build-type>' with the
|
||||||
|
// is_debug argument set to to true iff the build-type is Debug.
|
||||||
|
// A symbolic link to this build directory is created at 'out/active'
|
||||||
|
// which is used to track the active build directory.
|
||||||
|
"command": "cmd",
|
||||||
|
"args": [
|
||||||
|
"/C",
|
||||||
|
"(IF \"${input:buildType}\" == \"Debug\" ( gn gen 'out\\${input:buildType}' --args=is_debug=true ) ELSE ( gn gen 'out\\${input:buildType}' --args=is_debug=false )) && (IF EXIST 'out\\active' rmdir 'out\\active' /q /s) && (mklink /j 'out\\active' 'out\\${input:buildType}')",
|
||||||
|
],
|
||||||
},
|
},
|
||||||
"problemMatcher": [],
|
"problemMatcher": [],
|
||||||
},
|
},
|
||||||
|
@ -103,4 +137,4 @@
|
||||||
"description": "The type of build",
|
"description": "The type of build",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue