Skip to content

Commit

Permalink
Fix import of libpypctsp
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickOHara committed Apr 8, 2024
1 parent fb73d63 commit 340754f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v2
- name: Create tag artifact
uses: actions/upload-artifact@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.29)
cmake_minimum_required(VERSION 3.27)
project(pctsp_project)

set(CMAKE_CXX_STANDARD 17)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ RUN git clone https://github.com/rhgrant10/tsplib95.git /app/tsplib95
COPY . /app/pctsp

# Install package
RUN pip3 install pybind11
RUN pip3 install pybind11 ninja
RUN pip3 install /app/pctsp
6 changes: 2 additions & 4 deletions pctsp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
add_library(pypctsp SHARED "pypctsp.cpp")

set_target_properties(pypctsp PROPERTIES SUFFIX ${Python_SOABI})
set_property(TARGET ${TARGET} PROPERTY CXX_STANDARD 17)
set_target_properties(pypctsp PROPERTIES SUFFIX ".${Python_SOABI}.so" CXX_STANDARD 17)

# setting for Mac OS X
if ( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
set_target_properties( pypctsp PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
set_target_properties( pypctsp PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
endif()

target_include_directories(pypctsp PUBLIC ${PCTSP_INCLUDE_DIRS})
Expand Down

0 comments on commit 340754f

Please sign in to comment.