1
1

tasks.json 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. {
  2. // See https://go.microsoft.com/fwlink/?LinkId=733558
  3. // for the documentation about the tasks.json format
  4. "version": "2.0.0",
  5. "presentation": {
  6. // Dont show the "Terminal will be reused by tasks, press any key to close it" message
  7. "showReuseMessage": false,
  8. // Dont echo executed command in the terminal
  9. "echo" : false
  10. },
  11. "tasks": [
  12. {
  13. "label": "control shift B",
  14. "type": "shell",
  15. // displays time stamp of executable in directory
  16. "command": "cd ${relativeFileDirname}; ls ${fileBasenameNoExtension}/${fileBasenameNoExtension}.exe |tail -n3 |head -1",
  17. "dependsOn": ["default run executable"],
  18. "group": {"kind": "build","isDefault": true}
  19. },
  20. {
  21. "label": "overwritten",
  22. "type": "shell",
  23. // delete current executable so it can be overwritten with new one
  24. "command": "make clean p=${relativeFileDirname} f=${fileBasenameNoExtension}.exe",
  25. "dependsOn": ["default directory"]
  26. },
  27. {
  28. "label": "default compile",
  29. "type": "shell",
  30. "command": "make p=${relativeFileDirname} ${fileBasenameNoExtension}.exe",
  31. "dependsOn": ["overwritten"]
  32. },
  33. {
  34. "label": "default run executable",
  35. "type": "shell",
  36. "command": "cd ${relativeFileDirname}; ${fileBasenameNoExtension}/${fileBasenameNoExtension}.exe",
  37. "dependsOn": ["default compile"]
  38. },
  39. {
  40. "label": "default directory",
  41. "windows" : {
  42. "command": "$(cd ${relativeFileDirname}; test-path ${fileBasenameNoExtension}) -or $(mkdir ${fileBasenameNoExtension}) >$null"
  43. },
  44. "type": "shell",
  45. "presentation" : {
  46. // Dont bring the terminal panel to the front view
  47. "reveal": "never",
  48. // clears terminal as first step, only do this once
  49. "clear" :true
  50. }
  51. }
  52. ]
  53. }