Modify CMakePresets.json to use -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON in all the presets. The compile_commands.json file can be used by tools like clangd to get autocompletion and go-to-definition. This patch also adds compile_commands.json to the .gitignore, as often you need to symlink the compile_commands.json from the build directory into the source directory for it to be picked by tools. That is the case with clangd at least.
292 lines
7.6 KiB
JSON
292 lines
7.6 KiB
JSON
{
|
|
"version": 3,
|
|
"cmakeMinimumRequired": {
|
|
"major": 3,
|
|
"minor": 16,
|
|
"patch": 3
|
|
},
|
|
"configurePresets": [
|
|
{
|
|
"name": "common",
|
|
"hidden": true,
|
|
"cacheVariables": {
|
|
"CMAKE_EXPORT_COMPILE_COMMANDS": {
|
|
"type": "BOOL",
|
|
"value": "ON"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "debug",
|
|
"displayName": "Debug",
|
|
"description": "Default debug profile",
|
|
"binaryDir": "${sourceDir}/build/debug",
|
|
"inherits": [
|
|
"common"
|
|
],
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": {
|
|
"type": "STRING",
|
|
"value": "Debug"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "release",
|
|
"displayName": "Release",
|
|
"description": "Default release profile",
|
|
"binaryDir": "${sourceDir}/build/release",
|
|
"inherits": [
|
|
"common"
|
|
],
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": {
|
|
"type": "STRING",
|
|
"value": "Release"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "conda",
|
|
"hidden": true,
|
|
"generator": "Ninja",
|
|
"cacheVariables": {
|
|
"Boost_NO_BOOST_CMAKE": {
|
|
"type": "BOOL",
|
|
"value": "ON"
|
|
},
|
|
"BUILD_DYNAMIC_LINK_PYTHON": {
|
|
"type": "BOOL",
|
|
"value": "ON"
|
|
},
|
|
"BUILD_FEM_NETGEN": {
|
|
"type": "BOOL",
|
|
"value": "ON"
|
|
},
|
|
"BUILD_WITH_CONDA": {
|
|
"type": "BOOL",
|
|
"value": "ON"
|
|
},
|
|
"ENABLE_DEVELOPER_TESTS": {
|
|
"type": "BOOL",
|
|
"value": "ON"
|
|
},
|
|
"FREECAD_LIBPACK_USE": {
|
|
"type": "BOOL",
|
|
"value": "OFF"
|
|
},
|
|
"FREECAD_USE_EXTERNAL_FMT": {
|
|
"type": "BOOL",
|
|
"value": "ON"
|
|
},
|
|
"FREECAD_USE_EXTERNAL_SMESH": {
|
|
"type": "BOOL",
|
|
"value": "ON"
|
|
},
|
|
"FREECAD_USE_PCH": {
|
|
"type": "BOOL",
|
|
"value": "OFF"
|
|
},
|
|
"FREECAD_USE_PCL": {
|
|
"type": "BOOL",
|
|
"value": "ON"
|
|
},
|
|
"FREECAD_USE_PYBIND11": {
|
|
"type": "BOOL",
|
|
"value": "ON"
|
|
},
|
|
"OCCT_CMAKE_FALLBACK": {
|
|
"type": "BOOL",
|
|
"value": "ON"
|
|
},
|
|
"USE_BOOST_PYTHON": {
|
|
"type": "BOOL",
|
|
"value": "OFF"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "conda-linux",
|
|
"hidden": true,
|
|
"condition": {
|
|
"type": "equals",
|
|
"lhs": "${hostSystemName}",
|
|
"rhs": "Linux"
|
|
},
|
|
"cmakeExecutable": "${sourceDir}/conda/cmake.sh",
|
|
"cacheVariables": {
|
|
"CMAKE_INCLUDE_PATH": {
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad/include"
|
|
},
|
|
"CMAKE_INSTALL_LIBDIR": {
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad/lib"
|
|
},
|
|
"CMAKE_INSTALL_PREFIX": {
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad"
|
|
},
|
|
"CMAKE_LIBRARY_PATH":{
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad/lib"
|
|
},
|
|
"CMAKE_PREFIX_PATH": {
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad"
|
|
},
|
|
"OCC_INCLUDE_DIR": {
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad/include/opencascade"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "conda-macos",
|
|
"hidden": true,
|
|
"condition": {
|
|
"type": "equals",
|
|
"lhs": "${hostSystemName}",
|
|
"rhs": "Darwin"
|
|
},
|
|
"cmakeExecutable": "${sourceDir}/conda/cmake.sh",
|
|
"cacheVariables": {
|
|
"CMAKE_INCLUDE_PATH": {
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad/include"
|
|
},
|
|
"CMAKE_INSTALL_LIBDIR": {
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad/lib"
|
|
},
|
|
"CMAKE_INSTALL_PREFIX": {
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad"
|
|
},
|
|
"CMAKE_LIBRARY_PATH":{
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad/lib"
|
|
},
|
|
"CMAKE_PREFIX_PATH": {
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad"
|
|
},
|
|
"OCC_INCLUDE_DIR": {
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad/include/opencascade"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "conda-windows",
|
|
"hidden": true,
|
|
"condition": {
|
|
"type": "equals",
|
|
"lhs": "${hostSystemName}",
|
|
"rhs": "Windows"
|
|
},
|
|
"cmakeExecutable": "${sourceDir}/conda/cmake.cmd",
|
|
"cacheVariables": {
|
|
"CMAKE_INCLUDE_PATH": {
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad/Library/include"
|
|
},
|
|
"CMAKE_INSTALL_LIBDIR": {
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad/Library/lib"
|
|
},
|
|
"CMAKE_INSTALL_PREFIX": {
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad/Library"
|
|
},
|
|
"CMAKE_LIBRARY_PATH":{
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad/Library/lib"
|
|
},
|
|
"CMAKE_PREFIX_PATH": {
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad/Library"
|
|
},
|
|
"OCC_INCLUDE_DIR": {
|
|
"type": "FILEPATH",
|
|
"value": "${sourceDir}/.conda/freecad/Library/include/opencascade"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "conda-debug",
|
|
"hidden": true,
|
|
"displayName": "Conda Debug",
|
|
"description": "Conda debug profile",
|
|
"inherits": [
|
|
"debug",
|
|
"conda"
|
|
]
|
|
},
|
|
{
|
|
"name": "conda-release",
|
|
"hidden": true,
|
|
"displayName": "Conda Release",
|
|
"description": "Conda release profile",
|
|
"inherits": [
|
|
"release",
|
|
"conda"
|
|
]
|
|
},
|
|
{
|
|
"name": "conda-linux-debug",
|
|
"displayName": "Conda Debug",
|
|
"description": "Conda debug profile",
|
|
"inherits": [
|
|
"conda-debug",
|
|
"conda-linux"
|
|
]
|
|
},
|
|
{
|
|
"name": "conda-linux-release",
|
|
"displayName": "Conda Release",
|
|
"description": "Conda release profile",
|
|
"inherits": [
|
|
"conda-release",
|
|
"conda-linux"
|
|
]
|
|
},
|
|
{
|
|
"name": "conda-macos-debug",
|
|
"displayName": "Conda Debug",
|
|
"description": "Conda debug profile",
|
|
"inherits": [
|
|
"conda-debug",
|
|
"conda-macos"
|
|
]
|
|
},
|
|
{
|
|
"name": "conda-macos-release",
|
|
"displayName": "Conda Release",
|
|
"description": "Conda release profile",
|
|
"inherits": [
|
|
"conda-release",
|
|
"conda-macos"
|
|
]
|
|
},
|
|
{
|
|
"name": "conda-windows-debug",
|
|
"displayName": "Conda Debug",
|
|
"description": "Conda debug profile",
|
|
"inherits": [
|
|
"conda-debug",
|
|
"conda-windows"
|
|
]
|
|
},
|
|
{
|
|
"name": "conda-windows-release",
|
|
"displayName": "Conda Release",
|
|
"description": "Conda release profile",
|
|
"inherits": [
|
|
"conda-release",
|
|
"conda-windows"
|
|
]
|
|
}
|
|
]
|
|
}
|