diff --git a/devfiles/cpp/devfile.yaml b/devfiles/cpp/devfile.yaml new file mode 100644 index 000000000..9bf36e72a --- /dev/null +++ b/devfiles/cpp/devfile.yaml @@ -0,0 +1,57 @@ +--- +apiVersion: 1.0.0 +metadata: + generateName: cpp- +projects: + - + name: cpp-hello-world + source: + type: git + location: 'https://github.com/che-samples/cpp-hello-world' +components: +- + type: chePlugin + id: che-incubator/cpptools/latest + alias: cpp-plugin + preferences: + clangd.path: /usr/bin/clangd + cdt.clangd.binaries.enable: false +- + type: dockerimage + alias: cpp-dev + image: quay.io/eclipse/che-cpp-rhel7:nightly + command: ['sleep'] + args: ['infinity'] + memoryLimit: 512Mi + mountSources: true +commands: + - + name: build + actions: + - type: exec + component: cpp-dev + command: g++ -g hello.cpp -o hello.out && echo "Build complete" + workdir: ${CHE_PROJECTS_ROOT}/cpp-hello-world + - + name: run + actions: + - type: exec + component: cpp-dev + command: ./hello.out + workdir: ${CHE_PROJECTS_ROOT}/cpp-hello-world + - + name: debug + actions: + - type: vscode-launch + referenceContent: > + { + "version": "0.2.0", + "configurations": [ + { + "type": "gdb", + "name": "Debug c++ application", + "request": "launch", + "program": "/projects/cpp-hello-world/hello.out" + } + ] + } diff --git a/devfiles/cpp/meta.yaml b/devfiles/cpp/meta.yaml new file mode 100644 index 000000000..a61e808ac --- /dev/null +++ b/devfiles/cpp/meta.yaml @@ -0,0 +1,6 @@ +--- +displayName: C/C++ +description: Stack with C/C++ and Clang 8 +tags: ["C/C++", "clang", "g++", "gdb"] +icon: https://www.eclipse.org/che/images/logo-eclipseche.svg +globalMemoryLimit: 1686Mi