Add Conda Environment and VS Code configuration.

This commit is contained in:
Jacob Oursland
2023-03-21 08:46:44 -07:00
parent 468a54cb6d
commit 5dfee229bb
10 changed files with 224 additions and 0 deletions

1
.vscode/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
environment.yml

12
.vscode/c_cpp_properties.json vendored Normal file
View File

@@ -0,0 +1,12 @@
{
"configurations": [
{
"name": "FreeCAD",
"includePath": ["${workspaceFolder}/**"],
"cStandard": "c17",
"cppStandard": "c++17",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}

18
.vscode/cmake-kits.json vendored Normal file
View File

@@ -0,0 +1,18 @@
[
{
"name": "FreeCAD Linux",
"compilers": {
"C": "${workspaceFolder}/.conda/freecad/bin/cc",
"CXX": "${workspaceFolder}/.conda/freecad/bin/c++"
},
"environmentSetupScript": "${workspaceFolder}/.vscode/env.sh"
},
{
"name": "FreeCAD macOS",
"compilers": {
"C": "${workspaceFolder}/.conda/freecad/bin/clang",
"CXX": "${workspaceFolder}/.conda/freecad/bin/clang++"
},
"environmentSetupScript": "${workspaceFolder}/.vscode/env.sh"
}
]

3
.vscode/env.sh vendored Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
source activate freecad

6
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"recommendations": [
"ms-vscode.cpptools-extension-pack",
"ms-python.python"
]
}

48
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,48 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "C/C++: Linux: build and debug FreeCAD",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/bin/FreeCAD",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"preLaunchTask": "CMake: build"
},
{
"name": "C/C++: macOS: build and debug FreeCAD",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/bin/FreeCAD",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"preLaunchTask": "CMake: build"
},
{
"name": "Python: Remote Attach",
"type": "python",
"request": "attach",
"preLaunchTask": "conda: activate environment",
"redirectOutput": true,
"connect": {
"host": "localhost",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "${workspaceFolder}"
}
],
"justMyCode": false
}
]
}

15
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,15 @@
{
"files.associations": {
"__config": "cpp",
"iosfwd": "cpp"
},
"editor.formatOnType": true,
"cmake.preferredGenerators": ["Ninja", "NMake Makefiles"],
"cmake.cmakePath": "${workspaceFolder}/.conda/freecad/bin/cmake",
"cmake.configureSettings": {
"BUILD_WITH_CONDA:BOOL": "ON",
"BUILD_FEM_NETGEN:BOOL": "ON",
"FREECAD_USE_PYBIND11:BOOL": "ON",
"FREECAD_USE_EXTERNAL_SMESH:BOOL": "ON"
}
}

58
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,58 @@
{
"tasks": [
{
"type": "shell",
"label": "conda: activate environment",
"command": "activate freecad",
"problemMatcher": [],
"detail": "Activate conda environment",
"group": "build"
},
{
"type": "cmake",
"label": "CMake: configure",
"command": "configure",
"problemMatcher": [],
"detail": "CMake template configure task",
"group": "build"
},
{
"type": "cmake",
"label": "CMake: build",
"command": "build",
"targets": ["all"],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"detail": "CMake template build task"
},
{
"type": "cmake",
"label": "CMake: test",
"command": "test",
"problemMatcher": [],
"detail": "CMake template test task",
"group": "build"
},
{
"type": "cmake",
"label": "CMake: clean",
"command": "clean",
"problemMatcher": [],
"detail": "CMake template clean task",
"group": "build"
},
{
"type": "cmake",
"label": "CMake: clean rebuild",
"command": "cleanRebuild",
"targets": ["all"],
"problemMatcher": [],
"detail": "CMake template clean rebuild task",
"group": "build"
}
],
"version": "2.0.0"
}

5
conda/conda-env.yaml Normal file
View File

@@ -0,0 +1,5 @@
name: freecad
channels:
- conda-forge
dependencies:
- conda-devenv

View File

@@ -0,0 +1,58 @@
name: freecad
channels:
- conda-forge
dependencies:
- libselinux # [linux]
- libspnav # [linux]
- libxau # [linux]
- libxcb # [linux]
- libxdamage # [linux]
- libxext # [linux]
- libxfixes # [linux]
- libxi-devel # [linux]
- libxxf86vm # [linux]
- mesa-dri-drivers # [linux]
- mesa-libegl-devel # [linux]
- mesa-libgl-devel # [linux]
- xorg-x11-server-xvfb # [linux]
- sed # [unix]
- boost
- boost-cpp
- cmake
- coin3d
- compilers
- conda-build
- conda-devenv
- conda-smithy
- debugpy
- doxygen
- eigen
- freetype
- gmsh
- graphviz
- hdf5
- matplotlib
- ninja
- numpy
- occt==7.6.3
- openssl==3.0.8
- pcl
- pip
- pivy
- pkg-config
- ply
- pybind11
- pyside2
- python
- pyyaml
- qt
- qt-main
- qt-webengine
- six
- smesh==9.9
- swig
- vtk
- xerces-c
- zlib
- pip:
- ptvsd