From 431ec3db38891394351f857f181b3c547cea3cc1 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Sat, 4 Mar 2023 00:49:51 +0000 Subject: [PATCH] .vscode: Simplify build setup task Also now works on windows (assuming bash is the main terminal) - still better than a TODO Change-Id: I817143bb1c0dc95346dcf2c23f115c35a55349e5 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122522 Kokoro: Ben Clayton Commit-Queue: Ben Clayton Reviewed-by: James Price --- .vscode/tasks.json | 80 ++++++++++------------------------------------ 1 file changed, 17 insertions(+), 63 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index b69c9de0b7..c0c155496f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -73,70 +73,14 @@ // A symbolic link to this build directory is created at 'out/active' // which is used to track the active build directory. { - "label": "gn gen", + "label": "setup build", "type": "shell", - "linux": { - "command": "./tools/setup-build", - "args": [ - "gn", - "${input:buildType}", - "${input:buildArch}", - ], - }, - "osx": { - "command": "./tools/setup-build", - "args": [ - "gn", - "${input:buildType}", - "${input:buildArch}", - ], - }, - "windows": { - "command": "/C", - "args": [ - "(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}\")", - ], - "options": { - "shell": { - "executable": "cmd" - }, - } - }, - "options": { - "cwd": "${workspaceRoot}" - }, - "problemMatcher": [], - }, - { - "label": "cmake gen", - "type": "shell", - "linux": { - "command": "./tools/setup-build", - "args": [ - "cmake", - "${input:buildType}", - "${input:buildArch}", - ], - }, - "osx": { - "command": "./tools/setup-build", - "args": [ - "cmake", - "${input:buildType}", - "${input:buildArch}", - ], - }, - "windows": { - "command": "/C", - "args": [ - "echo TODO", - ], - "options": { - "shell": { - "executable": "cmd" - }, - } - }, + "command": "./tools/setup-build", + "args": [ + "${input:buildSystem}", + "${input:buildType}", + "${input:buildArch}", + ], "options": { "cwd": "${workspaceRoot}" }, @@ -194,6 +138,16 @@ } ], "inputs": [ + { + "id": "buildSystem", + "type": "pickString", + "options": [ + "cmake", + "gn", + ], + "default": "gn", + "description": "The build system", + }, { "id": "buildType", "type": "pickString",