.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,28 +17,38 @@
|
||||||
"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"
|
||||||
]
|
],
|
||||||
},
|
|
||||||
"linux": {
|
|
||||||
"args": [
|
|
||||||
"-c",
|
|
||||||
"cmake --build . && echo Done"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"windows": {
|
|
||||||
"args": [
|
|
||||||
"-c",
|
|
||||||
"cmake --build . && echo Done"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"options": {
|
"options": {
|
||||||
"cwd": "${workspaceRoot}/build",
|
"cwd": "${workspaceRoot}/build",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
"linux": {
|
||||||
|
"command": "sh",
|
||||||
|
"args": [
|
||||||
|
"-c",
|
||||||
|
"cmake --build . && echo Done"
|
||||||
|
],
|
||||||
|
"options": {
|
||||||
|
"cwd": "${workspaceRoot}/build",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"windows": {
|
||||||
|
// Invokes ninja in the 'out/active' directory, which is created
|
||||||
|
// with the 'generate' task (see below).
|
||||||
|
"command": "cmd",
|
||||||
|
"args": [
|
||||||
|
"/C",
|
||||||
|
"ninja && echo Done"
|
||||||
|
],
|
||||||
|
"options": {
|
||||||
|
"cwd": "${workspaceRoot}/out/active",
|
||||||
|
},
|
||||||
|
},
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"echo": false,
|
"echo": false,
|
||||||
"reveal": "always",
|
"reveal": "always",
|
||||||
|
@ -61,8 +71,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "cmake",
|
"label": "configure",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
|
"osx": {
|
||||||
"command": "cmake",
|
"command": "cmake",
|
||||||
"args": [
|
"args": [
|
||||||
"..",
|
"..",
|
||||||
|
@ -72,6 +83,29 @@
|
||||||
"options": {
|
"options": {
|
||||||
"cwd": "${workspaceRoot}/build"
|
"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": [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue