Skip to content

Instantly share code, notes, and snippets.

@widlarizer
Last active August 31, 2026 13:38
Show Gist options
  • Select an option

  • Save widlarizer/4c250ca490ea0808e64c49873ab126fe to your computer and use it in GitHub Desktop.

Select an option

Save widlarizer/4c250ca490ea0808e64c49873ab126fe to your computer and use it in GitHub Desktop.
Yosys CMake presets
{
"version": 6,
"configurePresets": [
{
"name": "d",
"binaryDir": "build",
"generator": "Unix Makefiles",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"YOSYS_COMPILER_LAUNCHER": "ccache",
"YOSYS_WITH_PYTHON" : "false",
"YOSYS_INSTALL_PYTHON" : "false",
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/installed"
}
},
{
"name": "dp",
"binaryDir": "build",
"generator": "Unix Makefiles",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"YOSYS_COMPILER_LAUNCHER": "ccache",
"Python3_EXECUTABLE": "python3",
"YOSYS_WITH_PYTHON" : "true",
"YOSYS_INSTALL_PYTHON" : "true",
"YOSYS_INSTALL_PYTHON_SITEDIR" : "${sourceDir}/installed/lib/python3/site-packages",
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/installed"
}
},
{
"name": "r",
"binaryDir": "build",
"generator": "Unix Makefiles",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"YOSYS_COMPILER_LAUNCHER": "ccache",
"YOSYS_WITH_PYTHON" : "false",
"YOSYS_INSTALL_PYTHON" : "false",
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/installed"
}
},
{
"name": "lto",
"binaryDir": "build-lto",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"YOSYS_COMPILER_LAUNCHER": "ccache",
"YOSYS_WITH_PYTHON": "false",
"YOSYS_INSTALL_PYTHON": "false",
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "ON",
"CMAKE_C_COMPILER_AR": "llvm-ar",
"CMAKE_C_COMPILER_RANLIB": "llvm-ranlib",
"CMAKE_CXX_COMPILER_AR": "llvm-ar",
"CMAKE_CXX_COMPILER_RANLIB": "llvm-ranlib",
"CMAKE_CXX_FLAGS": "-g -fno-omit-frame-pointer",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/uut/lto"
}
}
],
"buildPresets": [
{ "name": "d", "configurePreset": "d", "jobs": 24 },
{ "name": "dp", "configurePreset": "dp", "jobs": 24 },
{ "name": "r", "configurePreset": "r", "jobs": 24 },
{ "name": "di", "configurePreset": "d", "jobs": 24, "targets": [ "install" ] },
{ "name": "dpi", "configurePreset": "dp", "jobs": 24, "targets": [ "install" ] },
{ "name": "ri", "configurePreset": "r", "jobs": 24, "targets": [ "install" ] },
{ "name": "lto", "configurePreset": "lto", "jobs": 24 },
{ "name": "ltoi", "configurePreset": "lto", "jobs": 24, "targets": [ "install" ] }
],
"workflowPresets": [
{
"name": "d",
"steps": [
{ "type": "configure", "name": "d" },
{ "type": "build", "name": "d" }
]
},
{
"name": "r",
"steps": [
{ "type": "configure", "name": "r" },
{ "type": "build", "name": "r" }
]
},
{
"name": "di",
"steps": [
{ "type": "configure", "name": "d" },
{ "type": "build", "name": "di" }
]
},
{
"name": "dpi",
"steps": [
{ "type": "configure", "name": "dp" },
{ "type": "build", "name": "dpi" }
]
},
{
"name": "ri",
"steps": [
{ "type": "configure", "name": "r" },
{ "type": "build", "name": "ri" }
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment