Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pymatlib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rahil Doshi
pymatlib
Commits
c4e0d0e8
Commit
c4e0d0e8
authored
3 months ago
by
Rahil Doshi
Browse files
Options
Downloads
Patches
Plain Diff
Remove pybind11 module from CMakeLists.txt, rename project and library name
parent
05b94204
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/CMakeLists.txt
+1
-1
1 addition, 1 deletion
apps/CMakeLists.txt
src/pymatlib/core/cpp/CMakeLists.txt
+23
-25
23 additions, 25 deletions
src/pymatlib/core/cpp/CMakeLists.txt
with
24 additions
and
26 deletions
apps/CMakeLists.txt
+
1
−
1
View file @
c4e0d0e8
...
...
@@ -28,7 +28,7 @@ walberla_codegen_venv_install(
add_executable
(
HeatEquationWithMaterial
)
target_sources
(
HeatEquationWithMaterial PRIVATE CodegenHeatEquationWithMaterial.cpp
)
target_link_libraries
(
HeatEquationWithMaterial PRIVATE walberla::blockforest walberla::core walberla::field walberla::stencil walberla::timeloop walberla::vtk walberla::pde
)
target_link_libraries
(
HeatEquationWithMaterial PRIVATE
interpolation_template
)
target_link_libraries
(
HeatEquationWithMaterial PRIVATE
pymatlib_interpolators
)
pystencilssfg_generate_target_sources
(
HeatEquationWithMaterial
SCRIPTS HeatEquationKernelWithMaterial.py
...
...
This diff is collapsed.
Click to expand it.
src/pymatlib/core/cpp/CMakeLists.txt
+
23
−
25
View file @
c4e0d0e8
cmake_minimum_required
(
VERSION 3.10
)
project
(
fast
_interpolat
ion
)
project
(
pymatlib
_interpolat
ors
)
# Find required packages
find_package
(
Python COMPONENTS Interpreter Development NumPy REQUIRED
)
execute_process
(
COMMAND
${
Python_EXECUTABLE
}
-m pybind11 --cmakedir
OUTPUT_VARIABLE PYBIND11_CMAKE_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
find_package
(
pybind11 PATHS
${
PYBIND11_CMAKE_DIR
}
NO_DEFAULT_PATH REQUIRED
)
#
execute_process(
#
COMMAND ${Python_EXECUTABLE} -m pybind11 --cmakedir
#
OUTPUT_VARIABLE PYBIND11_CMAKE_DIR
#
OUTPUT_STRIP_TRAILING_WHITESPACE
#
)
#
find_package(pybind11 PATHS ${PYBIND11_CMAKE_DIR} NO_DEFAULT_PATH REQUIRED)
# Create interface library for header-only template implementation
add_library
(
interpolation_template
INTERFACE
)
target_include_directories
(
interpolation_template
INTERFACE
${
CMAKE_CURRENT_SOURCE_DIR
}
add_library
(
pymatlib_interpolators
INTERFACE
)
target_include_directories
(
pymatlib_interpolators
INTERFACE
#
${CMAKE_CURRENT_SOURCE_DIR}
${
CMAKE_CURRENT_SOURCE_DIR
}
/include
)
# Add the Pybind11 module
pybind11_add_module
(
fast_interpolation
module.cpp
binary_search_interpolation.cpp
double_lookup_interpolation.cpp
)
target_include_directories
(
fast_interpolation PRIVATE
${
CMAKE_CURRENT_SOURCE_DIR
}
/include
)
target_compile_features
(
fast_interpolation PRIVATE cxx_std_11
)
target_compile_options
(
fast_interpolation PRIVATE -O3
)
target_link_libraries
(
fast_interpolation PRIVATE
interpolation_template
pybind11::module
Python::NumPy
)
# pybind11_add_module(fast_interpolation
# module.cpp
# )
# target_include_directories(fast_interpolation PRIVATE
# ${CMAKE_CURRENT_SOURCE_DIR}/include
# )
# target_compile_features(fast_interpolation PRIVATE cxx_std_11)
# target_compile_options(fast_interpolation PRIVATE -O3)
# target_link_libraries(fast_interpolation PRIVATE
# interpolation_template
# pybind11::module
# Python::NumPy
# )
# Remove or update this if test_interpolation.py has been moved
# add_custom_target(fast_interpolation_test_py
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment