Skip to content

Commit

Permalink
Adjusts diffcp import
Browse files Browse the repository at this point in the history
  • Loading branch information
PTNobel committed Nov 9, 2024
1 parent dda6aef commit c49ce71
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ find_package(pybind11 CONFIG REQUIRED)

# Add a library using FindPython's tooling (pybind11 also provides a helper like
# this)
python_add_library(_core MODULE cpp/src/wrapper.cpp WITH_SOABI)
target_link_libraries(_core PRIVATE pybind11::headers)
target_include_directories(_core PRIVATE cpp/external/eigen/)
target_include_directories(_core PRIVATE cpp/include/)
python_add_library(_diffcp MODULE cpp/src/wrapper.cpp WITH_SOABI)
target_link_libraries(_diffcp PRIVATE pybind11::headers)
target_include_directories(_diffcp PRIVATE cpp/external/eigen/)
target_include_directories(_diffcp PRIVATE cpp/include/)

# This is passing in the version as a define just as an example
target_compile_definitions(_core PRIVATE VERSION_INFO=${PROJECT_VERSION})
target_compile_definitions(_diffcp PRIVATE VERSION_INFO=${PROJECT_VERSION})

# The install directory is the output (wheel) directory
install(TARGETS _core DESTINATION scikit_build_example)
install(TARGETS _diffcp DESTINATION diffcp)
2 changes: 1 addition & 1 deletion diffcp/cone_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import scipy.sparse as sparse
from threadpoolctl import threadpool_limits

import _diffcp
import diffcp._diffcp as _diffcp
import diffcp.cones as cone_lib


Expand Down
2 changes: 1 addition & 1 deletion diffcp/cones.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np
import scipy.sparse as sparse
from _diffcp import project_exp_cone, Cone, ConeType
from diffcp._diffcp import project_exp_cone, Cone, ConeType

ZERO = "z"
POS = "l"
Expand Down

0 comments on commit c49ce71

Please sign in to comment.