Initial test meson build

This commit is contained in:
Rob Taylor 2023-08-25 00:59:41 +01:00 committed by Rob Taylor
parent d806b9d586
commit 608cf4990e
7 changed files with 198 additions and 40 deletions

15
_build_utils/version.py Normal file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
""" Extract version number from __init__.py
"""
import os
ski_init = os.path.join(os.path.dirname(__file__), '../__init__.py')
data = open(ski_init).readlines()
version_line = next(line for line in data if line.startswith('__version__'))
version = version_line.strip().split(' = ')[1].replace('"', '').replace("'", '')
print(version)

6
hurricane/meson.build Normal file
View File

@ -0,0 +1,6 @@
bzip2_dep = cc.find_library('bz2', required: true)
rapidjson = dependency('RapidJSON', required: true)
flex = find_program('flex', required: true)
bison = find_program('bison', required: true)
subdir('src')

View File

@ -0,0 +1,40 @@
mocs = qt.compile_moc(
headers: [
'hurricane/configuration/ConfigurationDialog.h',
'hurricane/configuration/ParameterWidget.h',
'hurricane/configuration/ConfTabWidget.h',
'hurricane/configuration/LogWidget.h',
'hurricane/configuration/ConfigurationWidget.h',
'hurricane/configuration/ConfEditorWidget.h' ],
include_directories: includes
)
resources = qt.compile_resources(
sources: 'Configuration.qrc'
)
configuration = library(
'configuration',
'Parameter.cpp',
'LayoutDescription.cpp',
'Configuration.cpp',
'ParameterWidget.cpp',
'ConfTabWidget.cpp',
'LogWidget.cpp',
'ConfigurationWidget.cpp',
'ConfigurationDialog.cpp',
'ConfEditorWidget.cpp',
mocs,
resources,
dependencies: [qt_deps, boost],
include_directories: includes
)
pytypemanager = library(
'pytypemanager',
'ProxyProperty.cpp',
'PyTypeManager.cpp',
dependencies: [qt_deps, boost, py_deps],
include_directories: includes
)

View File

@ -0,0 +1,97 @@
shared_library(
'hurricane',
'Record.cpp',
'Slot.cpp',
'Initializer.cpp',
'Commons.cpp',
'Flags.cpp',
'Backtrace.cpp',
'FileReadGzStream.cpp',
'FileWriteGzStream.cpp',
'JsonWriter.cpp',
'JsonObject.cpp',
'JsonReader.cpp',
'Signature.cpp',
'Exception.cpp',
'Bug.cpp',
'Error.cpp',
'Breakpoint.cpp',
'DRCError.cpp',
'Warning.cpp',
'Interruption.cpp',
'Tabulation.cpp',
'DebugSession.cpp',
'Observer.cpp',
'DbU.cpp',
'Point.cpp',
'Box.cpp',
'Torus.cpp',
'Interval.cpp',
'Transformation.cpp',
'Name.cpp',
'DBo.cpp',
'DataBase.cpp',
'Technology.cpp',
'Layer.cpp',
'BasicLayer.cpp',
'RegularLayer.cpp',
'ViaLayer.cpp',
'ContactLayer.cpp',
'DiffusionLayer.cpp',
'TransistorLayer.cpp',
'Library.cpp',
'Entity.cpp',
'Cell.cpp',
'CellCollections.cpp',
'CellsSort.cpp',
'NetAlias.cpp',
'Net.cpp',
'DeepNet.cpp',
'HyperNet.cpp',
'Go.cpp',
'ExtensionGo.cpp',
'Hook.cpp',
'Instance.cpp',
'Component.cpp',
'Plug.cpp',
'Contact.cpp',
'Pin.cpp',
'Segment.cpp',
'Vertical.cpp',
'Horizontal.cpp',
'Pad.cpp',
'RoutingPad.cpp',
'Diagonal.cpp',
'Rectilinear.cpp',
'Polygon.cpp',
'NetExternalComponents.cpp',
'NetRoutingProperty.cpp',
'Reference.cpp',
'Rubber.cpp',
'Quark.cpp',
'Property.cpp',
'Relation.cpp',
'SharedName.cpp',
'SharedPath.cpp',
'Path.cpp',
'Occurrence.cpp',
'Occurrences.cpp',
'QuadTree.cpp',
'Slice.cpp',
'ExtensionSlice.cpp',
'UpdateSession.cpp',
'Region.cpp',
'Query.cpp',
'Marker.cpp',
'Timer.cpp',
'TextTranslator.cpp',
'DeviceDescriptor.cpp',
'Rule.cpp',
'UnitRule.cpp',
'PhysicalRule.cpp',
'TwoLayersPhysicalRule.cpp',
dependencies: [qt_deps, boost, rapidjson],
include_directories: includes
)

View File

@ -0,0 +1,4 @@
includes = include_directories('utilities', 'hurricane', 'analog', 'viewer', 'isobar')
subdir('hurricane')
subdir('configuration')

29
meson.build Normal file
View File

@ -0,0 +1,29 @@
project(
'coriolis-eda',
'c','cpp',
version: '2.5.5',
meson_version: '>= 0.63.0',
default_options: [
'buildtype=debugoptimized',
'c_std=c99',
'cpp_std=c++17',
],
)
cc = meson.get_compiler('c')
cpp = meson.get_compiler('cpp')
add_project_arguments(
'-Wno-deprecated-declarations',
'-Wno-unused-function',
'-Wno-unused-private-field',
language: ['c','cpp']
)
py = import('python').find_installation()
py_deps = dependency('python3')
qt = import('qt5')
qt_deps = dependency('qt5', modules: ['Core', 'Gui', 'Widgets'])
boost = dependency('boost')
subdir('hurricane')

View File

@ -1,6 +1,6 @@
[tool.poetry]
[project]
name = "coriolis-eda"
version = "0.0.0"
version = "2.5.5"
description = "Place and Route for semiconductors"
authors = ["Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>"]
readme = "README.rst"
@ -32,7 +32,7 @@ include = [
"katana",
"lefdef",
"oroshi",
"poetry.lock",
"pdm.lock",
"pyproject.toml",
"solstice",
"stratus1",
@ -41,45 +41,12 @@ include = [
"unicorn",
"unittests",
]
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "pep440"
format-jinja = """
{%- if distance == 0 -%}
{{ serialize_pep440(base, stage, revision) }}
{%- else -%}
{{ serialize_pep440(bump_version(base), stage="a", revision=distance) }}
{%- endif -%}
"""
[tool.poetry.dependencies]
python = "^3.8"
find-libpython = "^0.3.0"
patchelf = "^0"
[tool.poetry.dev-dependencies]
cmake = ">=3"
ninja = "^1.11.1"
[tool.poetry.group.doc.dependencies]
pelican = ">= 4.5.0"
[tool.poetry.build]
script = "builder.py"
generate-setup-file = true
[tool.poetry.scripts]
blif2vst = 'coriolis:blif2vst'
tutorial = 'coriolis:tutorial'
unittests = 'coriolis:unittests'
yosys_coriolis = 'coriolis:yosys_coriolis'
cgt = 'coriolis:cgt'
[tool.pdm.dev-dependencies]
doc = ["pelican", "doxygen"]
[build-system]
requires = ["poetry-core", "setuptools", "cmake", "ninja", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"
requires = ["setuptools", "pdm-backend", "meson @ git+https://github.com/robtaylor/meson@mac-homebrew", "ninja", "meson-python == 0.13.2"]
build-backend = "mesonpy"
[tool.cibuildwheel.linux]
skip = ["cp36-*", "cp37-*", "pp*"]