Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. ------------ build.sh ------------------
  2.  
  3. #!/bin/bash
  4.  
  5. FILES="wrapper.c main.c"
  6.  
  7. if [ "$1" == "build-only" ]
  8. then
  9. gcc -g -lpthread -lrt $FILES
  10. else
  11. gcc -g -lpthread -lrt $FILES && ./a.out
  12. fi
  13.  
  14.  
  15. ---------- tasks.json ------------
  16. {
  17. "version": "2.0.0",
  18. "tasks": [
  19. {
  20. "label": "build and run",
  21. "command": "bash",
  22. "args": [
  23. "build.sh"
  24. ],
  25. "group": {
  26. "kind": "build",
  27. "isDefault": true
  28. }
  29. },
  30. {
  31. "label": "build",
  32. "command": "bash",
  33. "args": [
  34. "build.sh",
  35. "build-only"
  36. ],
  37. "group": "build"
  38. }
  39. ]
  40. }
  41.  
  42.  
  43. ----------- launch.json --------------
  44. {
  45. // Use IntelliSense to learn about possible attributes.
  46. // Hover to view descriptions of existing attributes.
  47. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  48. "version": "0.2.0",
  49. "configurations": [
  50. {
  51. "name": "gcc build and debug active file",
  52. "type": "cppdbg",
  53. "request": "launch",
  54. "program": "/home/casper/kode/clang/os/1/a.out",
  55. "args": [],
  56. "stopAtEntry": false,
  57. "cwd": "${workspaceFolder}",
  58. "environment": [],
  59. "externalConsole": false,
  60. "MIMode": "gdb",
  61. "setupCommands": [
  62. {
  63. "description": "Enable pretty-printing for gdb",
  64. "text": "-enable-pretty-printing",
  65. "ignoreFailures": true
  66. }
  67. ],
  68. "preLaunchTask": "build",
  69. "miDebuggerPath": "/usr/bin/gdb"
  70. }
  71. ]
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement