Anonymous | Login | 2021-01-20 07:20 MSK | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0031667 | Community | [OCCT] OCCT:Configuration | public | 2020-07-16 12:02 | 2020-10-26 22:52 | ||||||||
Reporter | craffael | ||||||||||||
Assigned To | bugmaster | ||||||||||||
Priority | normal | Severity | feature | ||||||||||
Status | new | Resolution | open | ||||||||||
Platform | Linux | OS | Ubuntu | OS Version | 18.04 | ||||||||
Product Version | |||||||||||||
Target Version | [OCCT] 7.6.0* | Fixed in Version | |||||||||||
Summary | 0031667: Configuration, CMake - Dependencies between targets are not specified for static builds and not public | ||||||||||||
Description | In the CMake buildsystem, the library dependencies of a toolkit target are only registered if BUILD_SHARD_LIBS=On and they are not added to the "public cmake interface" (i.e. the public keyword is missing in target_link_libraries). I understand that this may be the best option if cmake version 2 is used. But I would say nowadays most users are using Cmake 3 and in Cmake 3 you can declare the dependencies of a cmake library target as public. This has the big advantage, that dependencies are transitively included. Example: Consider a cmake script which finds occt with find_package(...) and then links to the TKBrep target (with target_link_libraries). Until now this meant, that we also needed to link to TKMath, TKernel, TKG2d, TKG3d and TKGeomBase. With my proposed patch, it suffices to link to TKBrep only. The links to TKMath, TKernel, TKG2d, TKG3d and TKGeomBase are then automatically added thanks to the "PUBLIC" keyword in target_link_libraries. The proposed patch only adds the public keyword if cmake 3 or higher is used. Otherwise we fallback to the original behavior. | ||||||||||||
Tags | No tags attached. | ||||||||||||
Test case number | |||||||||||||
Attached Files | |||||||||||||
![]() |
|
(0093149) git (administrator) 2020-07-16 12:11 |
Branch CR31667 has been created by craffael. SHA-1: 61f7249b4c822ef0f9c4a2060feb7d895b04590f Detailed log of new commits: Author: craffael Date: Thu Jul 16 11:12:39 2020 +0200 31667: target_link_libraries with public interface for cmake >= 3 |
(0096285) craffael (reporter) 2020-10-26 22:52 |
@utverdov may I ask what is the reason that this has been postponed to 7.6.0? |
![]() |
|||
Date Modified | Username | Field | Change |
2020-07-16 12:02 | craffael | New Issue | |
2020-07-16 12:02 | craffael | Assigned To | => craffael |
2020-07-16 12:11 | git | Note Added: 0093149 | |
2020-07-16 12:15 | craffael | Assigned To | craffael => bugmaster |
2020-07-16 13:17 | kgv | Product Version | => 7.4.0 |
2020-07-16 13:17 | kgv | Target Version | => 7.5.0 |
2020-07-16 13:17 | kgv | Summary | Dependencies between cmake targets are not specified for static builds and not public => Configuration, CMake - Dependencies between targets are not specified for static builds and not public |
2020-07-16 13:19 | kgv | Severity | minor => feature |
2020-07-16 13:19 | kgv | Product Version | 7.4.0 => |
2020-09-11 15:40 | utverdov | Target Version | 7.5.0 => 7.6.0* |
2020-10-26 22:52 | craffael | Note Added: 0096285 |
Copyright © 2000 - 2021 MantisBT Team |