-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add VS Code tasks and CMake Presets #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "name": "Launch MaterialXView", | ||
| "type": "cppvsdbg", | ||
| "request": "launch", | ||
| "program": "${workspaceFolder}/build/bin/Debug/MaterialXView.exe", | ||
| "args": [], | ||
| "stopAtEntry": false, | ||
| "cwd": "${workspaceFolder}/resources/Materials/Examples/StandardSurface", | ||
| "environment": [], | ||
| "console": "integratedTerminal" | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "cmake.sourceDirectory": "${workspaceFolder}", | ||
| "python.testing.pytestArgs": [ | ||
| "python/MaterialXTest" | ||
| ], | ||
| "python.testing.unittestEnabled": false, | ||
| "python.testing.pytestEnabled": true, | ||
| "python.testing.cwd": "${workspaceFolder}", | ||
| "python.analysis.extraPaths": [ | ||
| "${workspaceFolder}/build/python", | ||
| "${workspaceFolder}/python" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,133 @@ | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "Configure MaterialX", | ||
| "type": "shell", | ||
| "command": "cmake", | ||
| "args": [ | ||
| "--preset", | ||
| "default" | ||
| ], | ||
| "group": "build", | ||
| "problemMatcher": [], | ||
| "isBackground": false, | ||
| "options": { | ||
| "cwd": "${workspaceFolder}" | ||
| } | ||
| }, | ||
| { | ||
| "label": "Configure MaterialX (Metashade)", | ||
| "type": "shell", | ||
| "command": "cmake", | ||
| "args": [ | ||
| "--preset", | ||
| "metashade" | ||
| ], | ||
| "group": "build", | ||
| "problemMatcher": [], | ||
| "isBackground": false, | ||
| "options": { | ||
| "cwd": "${workspaceFolder}" | ||
| } | ||
| }, | ||
| { | ||
| "label": "Build MaterialX Debug", | ||
| "type": "shell", | ||
| "command": "cmake", | ||
| "args": [ | ||
| "--build", | ||
| "--preset", | ||
| "debug" | ||
| ], | ||
| "group": { | ||
| "kind": "build", | ||
| "isDefault": true | ||
| }, | ||
| "problemMatcher": [ | ||
| "$msCompile", | ||
| "$gcc" | ||
| ], | ||
| "isBackground": false, | ||
| "dependsOn": "Configure MaterialX", | ||
| "options": { | ||
| "cwd": "${workspaceFolder}" | ||
| } | ||
| }, | ||
| { | ||
| "label": "Build MaterialX Debug (Metashade)", | ||
| "type": "shell", | ||
| "command": "cmake", | ||
| "args": [ | ||
| "--build", | ||
| "--preset", | ||
| "debug-metashade" | ||
| ], | ||
| "group": "build", | ||
| "problemMatcher": [ | ||
| "$msCompile", | ||
| "$gcc" | ||
| ], | ||
| "isBackground": false, | ||
| "dependsOn": "Configure MaterialX (Metashade)", | ||
| "options": { | ||
| "cwd": "${workspaceFolder}" | ||
| } | ||
| }, | ||
| { | ||
| "label": "Install MaterialX Debug", | ||
| "type": "shell", | ||
| "command": "cmake", | ||
| "args": [ | ||
| "--install", | ||
| "build", | ||
| "--config", | ||
| "Debug" | ||
| ], | ||
| "group": "build", | ||
| "problemMatcher": [], | ||
| "isBackground": false, | ||
| "dependsOn": "Build MaterialX Debug", | ||
| "options": { | ||
| "cwd": "${workspaceFolder}" | ||
| } | ||
| }, | ||
| { | ||
| "label": "Build MaterialX Release (Metashade)", | ||
| "type": "shell", | ||
| "command": "cmake", | ||
| "args": [ | ||
| "--build", | ||
| "--preset", | ||
| "release-metashade" | ||
| ], | ||
| "group": "build", | ||
| "problemMatcher": [ | ||
| "$msCompile", | ||
| "$gcc" | ||
| ], | ||
| "isBackground": false, | ||
| "dependsOn": "Configure MaterialX (Metashade)", | ||
| "options": { | ||
| "cwd": "${workspaceFolder}" | ||
| } | ||
| }, | ||
|
Comment on lines
+95
to
+114
|
||
| { | ||
| "label": "Clean MaterialX", | ||
| "type": "shell", | ||
| "command": "cmake", | ||
| "args": [ | ||
| "--build", | ||
| "build", | ||
| "--target", | ||
| "clean" | ||
| ], | ||
| "group": "build", | ||
| "problemMatcher": [], | ||
| "isBackground": false, | ||
| "options": { | ||
| "cwd": "${workspaceFolder}" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
|
Comment on lines
+1
to
+133
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| { | ||
| "version": 3, | ||
| "configurePresets": [ | ||
| { | ||
| "name": "windows-base", | ||
| "hidden": true, | ||
| "generator": "Visual Studio 17 2022", | ||
| "binaryDir": "${sourceDir}/build", | ||
| "cacheVariables": { | ||
| "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/installed", | ||
| "MATERIALX_BUILD_VIEWER": "ON", | ||
| "MATERIALX_BUILD_GRAPH_EDITOR": "ON", | ||
| "MATERIALX_BUILD_PYTHON": "ON", | ||
| "MATERIALX_BUILD_TESTS": "ON", | ||
| "MATERIALX_BUILD_METASHADE": "OFF" | ||
| } | ||
| }, | ||
| { | ||
| "name": "default", | ||
| "inherits": "windows-base", | ||
| "displayName": "Default (Windows)", | ||
| "description": "Default build options for Windows (No Metashade)" | ||
| }, | ||
| { | ||
| "name": "metashade", | ||
| "inherits": "windows-base", | ||
| "displayName": "Metashade (Windows)", | ||
| "description": "Build with Metashade features enabled", | ||
| "cacheVariables": { | ||
| "MATERIALX_BUILD_METASHADE": "ON" | ||
| } | ||
| } | ||
| ], | ||
| "buildPresets": [ | ||
| { | ||
| "name": "debug", | ||
| "configurePreset": "default", | ||
| "configuration": "Debug", | ||
| "displayName": "Debug Build", | ||
| "description": "Debug build (Default)" | ||
| }, | ||
| { | ||
| "name": "debug-metashade", | ||
| "configurePreset": "metashade", | ||
| "configuration": "Debug", | ||
| "displayName": "Debug Build (Metashade)", | ||
| "description": "Debug build with Metashade" | ||
| }, | ||
| { | ||
| "name": "release", | ||
| "configurePreset": "default", | ||
| "configuration": "Release", | ||
| "displayName": "Release Build", | ||
| "description": "Release build" | ||
| }, | ||
| { | ||
| "name": "release-metashade", | ||
| "configurePreset": "metashade", | ||
| "configuration": "Release", | ||
| "displayName": "Release Build (Metashade)", | ||
| "description": "Release build with Metashade" | ||
| } | ||
| ] | ||
| } | ||
|
Comment on lines
+1
to
+64
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This launch configuration uses a Windows-specific debugger type ("cppvsdbg") and hardcoded Windows paths (.exe extension, Windows-style path separators). Since MaterialX is a cross-platform project supporting Windows, macOS, and Linux, consider:
The hardcoded path to MaterialXView.exe will only work on Windows systems with Visual Studio builds.