Skip to content

Commit b41726c

Browse files
Use same VERSION and SOVERSION
Since Python (or dlopen) is not able to follow chained linker scripts set both properties to be the same, and use one linker script for .so file which redirectes to .so.MAJOR.MINOR
1 parent b16dc10 commit b41726c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

dpctl-capi/CMakeLists.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,15 @@ get_version()
155155
set_target_properties(DPCTLSyclInterface
156156
PROPERTIES
157157
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}
158-
SOVERSION ${VERSION_MAJOR}
158+
SOVERSION ${VERSION_MAJOR}.${VERSION_MINOR}
159159
)
160160

161161
set(linker_script1
162-
"INPUT(libDPCTLSyclInterface.so libDPCTLSyclInterface.so.${VERSION_MAJOR})"
163-
)
164-
set(linker_script2
165-
"INPUT(libDPCTLSyclInterface.so.${VERSION_MAJOR} libDPCTLSyclInterface.so.${VERSION_MAJOR}.${VERSION_MINOR})"
162+
"INPUT(libDPCTLSyclInterface.so.${VERSION_MAJOR}.${VERSION_MINOR})"
166163
)
167164
add_custom_command(TARGET DPCTLSyclInterface POST_BUILD
168165
COMMAND "${CMAKE_COMMAND}" -E remove "libDPCTLSyclInterface.so"
169166
COMMAND "${CMAKE_COMMAND}" -E echo "${linker_script1}" > "libDPCTLSyclInterface.so"
170-
COMMAND "${CMAKE_COMMAND}" -E remove "libDPCTLSyclInterface.so.${VERSION_MAJOR}"
171-
COMMAND "${CMAKE_COMMAND}" -E echo "${linker_script2}" > "libDPCTLSyclInterface.so.${VERSION_MAJOR}"
172167
VERBATIM
173168
)
174169

0 commit comments

Comments
 (0)