cheind / py-lapsolver

Fast linear assignment problem (LAP) solvers for Python based on c-extensions
MIT License
155 stars 24 forks source link

removed the dependency on OpenMP #3

Closed ktarplee closed 6 years ago

ktarplee commented 6 years ago

Closes #2

cheind commented 6 years ago

hey there! Thanks for the PR.

find_package(OpenMP QUIET)

if(OpenMP_FOUND)
  message("Compiling with OpenMP support")
  target_compile_options(lapsolverc PUBLIC "$<$<CONFIG:RELEASE>:${OpenMP_CXX_FLAGS}>")
else()
  message("Compiling without OpenMP support")
endif()

So people having OpenMP installed would benefit from the parallelization, while the library still compiles for others.

cheind commented 6 years ago

In the meantime I will have a look why the appveyor build fails.

ktarplee commented 6 years ago

What code is actually using OpenMP? I did not find any "#pragma omp" lines in your code?

cheind commented 6 years ago

Oh you are correct, it seems like I have dropped OpenMP support myself and forgot about the CMakeLists file. My bad!

cheind commented 6 years ago

merged to develop. Hopefully have time soon to make a release.