MantisBT - Open CASCADE
View Issue Details
0027560Open CASCADE[OCCT] PRODUCTS:Configurationpublic2016-06-01 16:592019-07-19 16:35
apn 
apn 
normalminor 
feedbackopen 
ALL
 
[OCCT] 7.5.0* 
Not needed
0027560: Configuration - Using OCCT third-party in products
It's necessary to use already found occt third-parties in products environment.
Path to third-party folders (libraries and includes) will be export to config files for each configuration.
No tags attached.
related to 0030236closed apn Open CASCADE Configuration of the OCCT product "BestFit" with using CMake requires obligatory including TBB in the 3rd parties 
related to 0030568new apn Open CASCADE CMake: unified functionality to collect prerequisites 
patch occt_cmake_3-rd_party_configuration.patch (1,076) 2017-02-15 15:25
https://tracker.dev.opencascade.org/
zip environment_files.zip (1,401) 2017-04-13 10:53
https://tracker.dev.opencascade.org/
Issue History
2016-06-01 16:59apnNew Issue
2016-06-01 16:59apnAssigned To => apn
2016-06-01 16:59apnStatusnew => assigned
2016-06-08 17:56gitNote Added: 0054820
2016-06-17 12:20gitNote Added: 0055161
2016-06-17 13:59gitNote Added: 0055169
2016-07-08 16:25gitNote Added: 0055764
2016-08-22 16:32gitNote Added: 0056927
2016-08-24 11:49gitNote Added: 0057016
2016-08-25 19:19apnNote Added: 0057080
2016-08-25 19:20apnTest case number => Not needed
2016-08-25 19:20apnAssigned Toapn => ibs
2016-08-25 19:20apnStatusassigned => resolved
2016-09-26 11:08ibsNote Added: 0058142
2016-09-26 11:08ibsAssigned Toibs => bugmaster
2016-09-26 11:08ibsStatusresolved => reviewed
2016-10-07 16:58gitNote Added: 0058484
2016-11-07 14:37apnTarget Version7.1.0 => 7.2.0
2017-02-07 12:36gitNote Added: 0063481
2017-02-07 15:17gitNote Added: 0063495
2017-02-15 15:24rnvNote Added: 0063820
2017-02-15 15:25rnvFile Added: occt_cmake_3-rd_party_configuration.patch
2017-02-15 15:37apnAssigned Tobugmaster => apn
2017-02-28 12:49rnvRelationship addedrelated to 0028457
2017-04-13 09:58bugmasterRelationship addedparent of 0027485
2017-04-13 09:58bugmasterRelationship addedparent of 0027486
2017-04-13 09:58bugmasterRelationship addedparent of 0027487
2017-04-13 10:30bugmasterCategoryOCCT:Configuration => PRODUCTS:Configuration
2017-04-13 10:52bugmasterNote Added: 0065194
2017-04-13 10:53bugmasterFile Added: environment_files.zip
2017-05-17 18:29bugmasterStatusreviewed => feedback
2017-08-27 11:09bugmasterSummaryUsing OCCT third-party in products => Configuration - Using OCCT third-party in products
2017-08-28 12:19apnTarget Version7.2.0 => 7.4.0
2018-10-01 11:16gitNote Added: 0079548
2019-03-13 14:54oanRelationship addedrelated to 0030568
2019-03-15 12:49oanNote Added: 0082977
2019-03-15 12:51oanNote Edited: 0082977bug_revision_view_page.php?bugnote_id=82977#r20855
2019-03-15 12:51oanNote Edited: 0082977bug_revision_view_page.php?bugnote_id=82977#r20856
2019-03-22 10:29oanRelationship addedrelated to 0030236
2019-07-19 16:35apnTarget Version7.4.0 => 7.5.0*

Notes
(0054820)
git   
2016-06-08 17:56   
Branch CR27560 has been created by apn.

SHA-1: 741c6df517fad94b044a21368011db25c7b25b9d


Detailed log of new commits:

Author: apn
Date: Wed Jun 8 17:55:28 2016 +0300

    0027560: Using OCCT third-party in products
    
    Added generation OpenCASCADE3rdparty cmake file with paths to used third-party products.
(0055161)
git   
2016-06-17 12:20   
Branch CR27560 has been updated forcibly by apn.

SHA-1: 150dc7e7bcdfcc52b1cc7f57ab4ea0cc03f66629
(0055169)
git   
2016-06-17 13:59   
Branch CR27560 has been updated forcibly by apn.

SHA-1: 96a56e078e0dc972bd1bb4b063d21896448740bd
(0055764)
git   
2016-07-08 16:25   
Branch CR27560 has been updated by apn.

SHA-1: 07fb3c2f4949aeaf12807af99282578f4d932ed4


Detailed log of new commits:

Author: apn
Date: Fri Jul 8 16:26:08 2016 +0300

    Create imported target for each 3rd party product

(0056927)
git   
2016-08-22 16:32   
Branch CR27560 has been updated forcibly by apn.

SHA-1: c3ad9379d2541dd94f927d450bc3462d5aa07dcf
(0057016)
git   
2016-08-24 11:49   
Branch CR27560 has been updated by apn.

SHA-1: b6a501beb8c3dbbab3e892a5110561cbc1bfdae8


Detailed log of new commits:

Author: apn
Date: Wed Aug 24 11:51:15 2016 +0300

    Corrections for Linux platform

(0057080)
apn   
2016-08-25 19:19   
During installation OCCT creates file OpenCASCADE3rdparty-release.cmake (depends on configuration). It contains 3rdparty environment (targets with all paths).
Searching 3rdparty from PRODUCTS was removed. Now products are linking to targets (created in OCCT) in occt_toolkit.cmake and using only those 3rdparty, which are used in OCCT.
Dear ibs, could you please review OCCT and PRODUCTS branches CR27560.
(0058142)
ibs   
2016-09-26 11:08   
there are no remarks
(0058484)
git   
2016-10-07 16:58   
Branch CR27560 has been updated forcibly by apn.

SHA-1: 967cb2e8eeb2f7c19ae0c51da08b3580b46ce40e
(0063481)
git   
2017-02-07 12:36   
Branch CR27560 has been updated forcibly by apn.

SHA-1: 3424f51e21a9ecd44a0efcb5622aee6b67b10014
(0063495)
git   
2017-02-07 15:17   
Branch CR27560 has been updated by apn.

SHA-1: a4a3ec5c3a5ffe3ce70037e2036910d5ec035af3


Detailed log of new commits:

Author: apn
Date: Tue Feb 7 15:16:52 2017 +0300

    Modify TARGET_NAME

(0063820)
rnv   
2017-02-15 15:24   
Dear Colleagues,

I've tested OCCT third-party configuration from CR27560 branch. On some platforms it works properly, but I faced a problem with the linking on Fedora-22 64 bit platform (seems it is the problem with ld linker on the modern platforms). Attached workaround occt_cmake_3-rd_party_configuration.patch solves this problem.

Dear apn, could you please revise, test and integrate it?
(0065194)
bugmaster   
2017-04-13 10:52   
Andrey,

Please take into account 0027485, 0027486, 0027487 during works under this issue.
And please make environment files like in attched environment_files.zip.
(0079548)
git   
2018-10-01 11:16   
Branch CR27560 has been updated forcibly by apn.

SHA-1: a66a9c6e320627f02768c6e085257e6e5b6918fb
(0082977)
oan   
2019-03-15 12:49   
(edited on: 2019-03-15 12:51)
DC,

I have a suggestion on how it would be possible to avoid hard-coded paths in cmake files.

In cmake it is possible to run custom commands or create custom targets.
So it is possible to run external process that can collect all necessary paths and references and create *.TXT or even *.cmake file local to products build, not for entire OCCT, that can be further loaded by cmake script.

For instance, the following snippet creates custom target that runs batch command where env.bat is called first to define running environment and dumps all necessary data to txt file. I suppose the same can be done for Linux.

If we can implement it as a unified procedure and place it to OCCT cmake folder, we can use it in any OCCT-dependent project, including Products.

set (PREREQUISITES_TMP_FILE prerequisites.txt)
list (APPEND PREREQUISITES_REF_LIBRARIES TKernel.dll freeimage.dll freetype.dll tbb.dll)
add_custom_target(
    prerequisites ALL
    COMMAND ${CMAKE_COMMAND} -E remove -f ${PREREQUISITES_TMP_FILE}
    COMMAND ${CMAKE_COMMAND} -E touch ${PREREQUISITES_TMP_FILE}
    COMMAND
    COMMAND call "${CMAKE_BINARY_DIR}/env.bat" ${VCVER} ${ARCH} $(ConfigurationName)
    COMMAND FOR %P IN (${PREREQUISITES_REF_LIBRARIES}) DO (where %P >> ${PREREQUISITES_TMP_FILE})
    COMMENT "Collecting prerequisites"
    VERBATIM
  )
  
Note that we can also dump all CSF_ variables defined in env.bat by calling
COMMAND set CSF_ > ${PREREQUISITES_TMP_FILE}