forked from krober10nd/SeismicMesh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Henry Schreiner <[email protected]>
- Loading branch information
Showing
5 changed files
with
73 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,36 @@ | ||
cmake_minimum_required(VERSION 2.8.12) | ||
cmake_minimum_required(VERSION 3.15...3.29) | ||
|
||
project(SeismicMesh) | ||
project(SeismicMesh LANGUAGES C CXX) | ||
|
||
############################################################################## | ||
|
||
# Add custom CMake modules | ||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) | ||
|
||
# Some screen output | ||
message(STATUS "OS detected: ${CMAKE_SYSTEM_NAME}") | ||
message(STATUS "CXX Compiler detected: ${CMAKE_CXX_COMPILER_ID}") | ||
message(STATUS "CMake additional search path for libraries: ${CMAKE_LIBRARY_PATH}") | ||
|
||
# CGAL and its components | ||
find_package(CGAL) | ||
find_package(CGAL REQUIRED) | ||
message(STATUS "CGAL version: ${CGAL_VERSION}") | ||
|
||
if( CGAL_VERSION VERSION_LESS 5.0) | ||
message(FATAL_ERROR "This project requires at least CGAL 5.0 library and will not be compiled.") | ||
endif() | ||
|
||
|
||
# include helper file | ||
include( ${CGAL_USE_FILE}) | ||
|
||
set (MIGRATION_SRCE "SeismicMesh/migration/cpp") | ||
set (GENERATION_SRCE "SeismicMesh/generation/cpp") | ||
set (SIZING_SRCE "SeismicMesh/sizing/cpp") | ||
set (GEOMETRY_SRCE "SeismicMesh/geometry/cpp") | ||
set(MIGRATION_SRCE "SeismicMesh/migration/cpp") | ||
set(GENERATION_SRCE "SeismicMesh/generation/cpp") | ||
set(SIZING_SRCE "SeismicMesh/sizing/cpp") | ||
set(GEOMETRY_SRCE "SeismicMesh/geometry/cpp") | ||
|
||
include_directories (${MIGRATION_SRCE} ${GENERATION_SRCE} ${SIZING_SRC} ${GEOMETRY_SRCE}) | ||
add_library(Common INTERFACE) | ||
target_include_directories(Common INTERFACE ${MIGRATION_SRCE} ${GENERATION_SRCE} ${SIZING_SRC} ${GEOMETRY_SRCE}) | ||
|
||
find_package(pybind11) | ||
set(PYBIND11_FINDPYTHON ON) | ||
find_package(pybind11 CONFIG REQUIRED) | ||
message(STATUS "Found pybind11 v${pybind11_VERSION}: ${pybind11_INCLUDE_DIRS}") | ||
|
||
#add_subdirectory(pybind11) | ||
pybind11_add_module(cpputils ${SOURCES} "${MIGRATION_SRCE}/cpputils.cpp") | ||
pybind11_add_module(FastHJ ${SOURCES} "${SIZING_SRCE}/FastHJ.cpp") | ||
pybind11_add_module(delaunay ${SOURCES} "${GENERATION_SRCE}/delaunay.cpp") | ||
pybind11_add_module(delaunay_class ${SOURCES} "${GENERATION_SRCE}/delaunay_class.cpp") | ||
pybind11_add_module(delaunay_class3 ${SOURCES} "${GENERATION_SRCE}/delaunay_class3.cpp") | ||
pybind11_add_module(fast_geometry ${SOURCES} "${GEOMETRY_SRCE}/fast_geometry.cpp") | ||
pybind11_add_module(cpputils "${MIGRATION_SRCE}/cpputils.cpp") | ||
target_link_libraries(cpputils PRIVATE Common CGAL::CGAL) | ||
pybind11_add_module(FastHJ "${SIZING_SRCE}/FastHJ.cpp") | ||
target_link_libraries(FastHJ PRIVATE Common CGAL::CGAL) | ||
pybind11_add_module(delaunay "${GENERATION_SRCE}/delaunay.cpp") | ||
target_link_libraries(delaunay PRIVATE Common CGAL::CGAL) | ||
pybind11_add_module(delaunay_class "${GENERATION_SRCE}/delaunay_class.cpp") | ||
target_link_libraries(delaunay_class PRIVATE Common CGAL::CGAL) | ||
pybind11_add_module(delaunay_class3 "${GENERATION_SRCE}/delaunay_class3.cpp") | ||
target_link_libraries(delaunay_class3 PRIVATE Common CGAL::CGAL) | ||
pybind11_add_module(fast_geometry "${GEOMETRY_SRCE}/fast_geometry.cpp") | ||
target_link_libraries(fast_geometry PRIVATE Common CGAL::CGAL) | ||
|
||
install(TARGETS cpputils FastHJ delaunay delaunay_class delaunay_class3 fast_geometry LIBRARY DESTINATION SeismicMesh) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,49 @@ | ||
[build-system] | ||
requires = ["setuptools>=42", "wheel", "pybind11>=2.6.0"] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["scikit-build-core"] | ||
build-backend = "scikit_build_core.build" | ||
|
||
[project] | ||
name = "SeismicMesh" | ||
version = "3.6.2" | ||
description = "2D/3D serial and parallel triangular mesh generation for seismology" | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
authors = [ | ||
{ name = "Keith Roberts" }, | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Mathematics", | ||
"Topic :: Scientific/Engineering :: Physics", | ||
"Topic :: Scientific/Engineering :: Visualization", | ||
] | ||
dependencies = [ | ||
"matplotlib", | ||
"mpi4py", | ||
"numpy", | ||
"pyamg", | ||
"pytest_codeblocks", | ||
"scipy", | ||
] | ||
|
||
[project.optional-dependencies] | ||
all = [ | ||
"segyio", "meshplex", "pygalmesh", "pygmsh", "meshio", "termplotlib", | ||
] | ||
benchmarking = [ | ||
"meshplex", "pygalmesh", "pygmsh", "meshio", "termplotlib", | ||
] | ||
io = [ | ||
"segyio", "h5py", "meshio", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/krober10nd/SeismicMesh" | ||
|
||
|
||
[tool.scikit-build] | ||
wheel.exclude = ["*.cpp"] |