Skip to content

Commit a023cda

Browse files
committed
cmake: declare the pycsdiff target as a MODULE library
... to mark the intent that it is meant to be used by `dlopen` only. Consequently, this makes the library to always use the `.so` suffix which fixes the following test failure on macOS because Python ignores shared libraries with the `.dylib` suffix. ``` pycsdiff_py3......................................***Failed 0.02 sec Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'pycsdiff' ```
1 parent 250bc5f commit a023cda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ macro(build_pycsdiff version)
105105
message(STATUS "Python ${version} binding enabled. "
106106
"The pycsdiff module will be built!")
107107

108-
add_library(pycsdiff_py${version} SHARED pycsdiff.cc)
108+
add_library(pycsdiff_py${version} MODULE pycsdiff.cc)
109109
target_link_libraries(pycsdiff_py${version}
110110
PRIVATE ${Boost_PYTHON${PYTHON_VERSION_SUFFIX}_LIBRARY}
111111
Python${version}::Module)

0 commit comments

Comments
 (0)