Skip to content

Commit 6891955

Browse files
Turn off SOVERSION-ing of libDPCTLSyclInterface
Library SOVersioning is used to allow libraries of different versions to coexist in the same layout. Since libDPCTLSyclInterface library is being installed into site-packages/dpctl, and since Python does not support multiple versions of the same package installed, such a situation where SOVersioning is required never arises. SOVersioning causes creation of symbolic links which are not supported by Python wheels (symbolic links are followed and 3 hard identical copies of the library are bing created) and only cause wheel size to be overinflated. With all this said, it is better to not set VERSION/SOVERSION target property.
1 parent 7b64374 commit 6891955

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

libsyclinterface/CMakeLists.txt

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -284,16 +284,19 @@ if(DPCTL_ENABLE_GLOG)
284284
endif()
285285

286286

287-
include(GetProjectVersion)
288-
# the get_version function is defined in the GetProjectVersion module and
289-
# defines: VERSION, SEMVER, MAJOR, MINOR, PATCH. These variables are populated
290-
# by parsing the output of git describe.
291-
get_version()
292-
set_target_properties(DPCTLSyclInterface
293-
PROPERTIES
294-
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}
295-
SOVERSION ${VERSION_MAJOR}
296-
)
287+
set(buld_so_version 0)
288+
if (build_so_version)
289+
include(GetProjectVersion)
290+
# the get_version function is defined in the GetProjectVersion module and
291+
# defines: VERSION, SEMVER, MAJOR, MINOR, PATCH. These variables are populated
292+
# by parsing the output of git describe.
293+
get_version()
294+
set_target_properties(DPCTLSyclInterface
295+
PROPERTIES
296+
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}
297+
SOVERSION ${VERSION_MAJOR}
298+
)
299+
endif()
297300

298301
if(DPCTL_ENABLE_L0_PROGRAM_CREATION)
299302
target_include_directories(DPCTLSyclInterface

0 commit comments

Comments
 (0)