MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0028135Open CASCADE[OCCT] OCCT:Configurationpublic2016-11-21 12:592017-09-29 16:31
Reporterkgv 
Assigned Toapn 
PrioritynormalSeverityfeature 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.2.0Fixed in Version[OCCT] 7.2.0 
Summary0028135: Configuration - adopt building script for using built-in Android cross-compiling support in CMake 3.7
DescriptionCMake 3.7 introduces built-in support for Android platform (in contrast to third-party toolchain for CMake). This procedure should be analyzed and OCCT CMake scripts / Readme should be updated if needed.

https://cmake.org/cmake/help/v3.7/manual/cmake-toolchains.7.html#cross-compiling-for-android [^]
Steps To Reproduce• Set variable CMAKE_ANDROID_NDK equal to yout Android NDK path in file occt\adm\templates\android.toolchain.config.cmake
• Run CMake 3.7.x as usual
• Press Configure -> Select "MinGW Makefiles" generator and use third checkbox (about toolchain file) -> Next
• Select file occt\adm\templates\android.toolchain.config.cmake
• Repeat all other steps as usual (set install/3rd-party directories, etc)
• Build and install solution
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
related to 0024888closedbugmaster Refactoring of OCCT CMake meta-project 
child of 0025146closedbugmaster Porting to Android 

-  Notes
(0061959)
git (administrator)
2016-12-21 16:51

Branch CR28135 has been created by ski.

SHA-1: 0e475365a9863e2a5204f73256eb229cfd8d5ee5


Detailed log of new commits:

Author: ski
Date: Wed Dec 21 13:41:04 2016 +0300

    Eliminated CMake warning CMP0054 for Android platform build.

Author: ski
Date: Wed Dec 21 13:41:04 2016 +0300

    0028135: Configuration - adopt building script for using built-in Android cross-compiling support in CMake 3.7
    
    Added toolchain file for using built-in Android cross-compiling support in CMake 3.7
(0061960)
ski (developer)
2016-12-21 17:04

CMake warning CMP0054 appears because line 222 from file "occt/adm/cmake/occt_toolkit.cmake":

if (NOT "${CURRENT_CSF}" STREQUAL "")

in case of Android build, variable CSF_ThreadLibs contains "c" string.
Also, variable "c" is defined in CMake.
Because of these two factors warning CMP0054 appears.
(0061961)
ski (developer)
2016-12-21 17:06

I have checked compilation of occt for Android platform using this patch on CMake 3.7.0 and 3.7.1.

Documentation was updated.
(0061962)
ski (developer)
2016-12-21 17:12

Dear ibs,

please review.
(0061963)
kgv (developer)
2016-12-21 17:20
edited on: 2016-12-21 17:32

+Note that CMake supports Cross Compiling for Android with simple toolchain files since version **3.7.0**.


The references to obsolete solution should be eliminated from documentation.

(0061964)
kgv (developer)
2016-12-21 17:35
edited on: 2016-12-21 17:37

Remark from abv,

in OCCT 7.1.0 release notes:
On configuration step of CMake, select "Visual Studio 14 2015" as generator
and specify optional toolset, pointing to the file
adm/templates/uwp.toolchain.config.cmake located within OCCT sources.
Alternatively, run CMake with options -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0.


Please extend the OCCT documentation with similar suggestion for UWP and Android which does not require using addition toolsets just defining 2-4 additional CMake variables.

(0061970)
git (administrator)
2016-12-21 19:38

Branch CR28135 has been updated by ski.

SHA-1: f4c674082e2fbb00c9fe6897d631e0206624fa02


Detailed log of new commits:

Author: ski
Date: Wed Dec 21 19:38:50 2016 +0300

    Updated documentation about building of occt for Android platform via CMake.

(0061971)
git (administrator)
2016-12-21 19:50

Branch CR28135 has been updated by ski.

SHA-1: ae46dba43dba6107219acf7af07a8a3f16e29273


Detailed log of new commits:

Author: ski
Date: Wed Dec 21 19:50:07 2016 +0300

    Updated documentation about building of occt for UWP via CMake.

(0061972)
ski (developer)
2016-12-21 19:52

Done.
(0061987)
kgv (developer)
2016-12-22 11:13

I see on the screenshot, that CMake chooses gcc as compiler in NDK (NDK provides two options - gcc and CLang, we prefer gcc for now).

But is there some information concerning which C++ standard library / STL implementation is used (gnustl_static / gnustl_shared / stlport_static / stlport_shared)?
(0061992)
ski (developer)
2016-12-22 11:21

It is possible to add one more variable to android toolchain file (or use it from command line):

CMAKE_ANDROID_STL_TYPE
    Set to specify which C++ standard library to use. If not specified, a default will be selected as described in the variable documentation.
(see https://cmake.org/cmake/help/v3.7/variable/CMAKE_ANDROID_STL_TYPE.html#variable:CMAKE_ANDROID_STL_TYPE [^])
(0061993)
kgv (developer)
2016-12-22 11:41

> The default value is gnustl_static.
Please set this variable to "gnustl_shared" and provide description in our documentation.
(0062001)
git (administrator)
2016-12-22 12:51

Branch CR28135 has been updated by ski.

SHA-1: 00cd4e5eb2997ca3e06f8ef5741aef46a929a89e


Detailed log of new commits:

Author: ski
Date: Thu Dec 22 12:51:24 2016 +0300

    Added variable CMAKE_ANDROID_STL_TYPE for Android platform build via CMake.

(0062002)
ski (developer)
2016-12-22 12:51

Done.
(0062020)
git (administrator)
2016-12-22 18:54

Branch CR28135 has been updated forcibly by ibs.

SHA-1: 2b673719c6c2770a485c6e7f5e774a925f18e2c4
(0062021)
ibs (developer)
2016-12-22 18:54

dear bugmastre,
there are no remarks, please integrate
(0062061)
kgv (developer)
2016-12-23 13:57

I suppose that weekly Android builds should be now based on this procedure.
(0063546)
git (administrator)
2017-02-08 11:31

Branch CR28135 has been deleted by kgv.

SHA-1: 2b673719c6c2770a485c6e7f5e774a925f18e2c4

- Related Changesets
occt: master a20cce39
Timestamp: 2016-12-21 10:41:04
Author: ski
Committer: apn
Details ] Diff ]
0028135: Configuration - adopt building script for using built-in Android cross-compiling support in CMake 3.7

Added toolchain file for using built-in Android cross-compiling support in CMake 3.7

Added variable CMAKE_ANDROID_STL_TYPE for Android platform build via CMake.

Updated documentation about building of occt for UWP and Android via CMake.

Eliminated CMake warning CMP0054 for Android platform build.
mod - adm/cmake/occt_toolkit.cmake Diff ] File ]
add - adm/templates/android.toolchain.config.cmake Diff ] File ]
mod - dox/dev_guides/building/android/android.md Diff ] File ]
mod - dox/dev_guides/building/android/images/android_image001.png Diff ] File ]
mod - dox/dev_guides/building/android/images/android_image002.png Diff ] File ]
mod - dox/dev_guides/building/android/images/android_image003.png Diff ] File ]
mod - dox/dev_guides/building/android/images/android_image004.png Diff ] File ]
mod - dox/dev_guides/building/android/images/android_image005.png Diff ] File ]
mod - dox/dev_guides/building/android/images/android_image006.png Diff ] File ]
mod - dox/dev_guides/building/cmake/cmake.md Diff ] File ]

- Issue History
Date Modified Username Field Change
2016-11-21 12:59 kgv New Issue
2016-11-21 12:59 kgv Assigned To => ski
2016-11-21 13:03 kgv Relationship added related to 0024888
2016-11-21 13:03 kgv Relationship added child of 0025146
2016-12-21 16:51 git Note Added: 0061959
2016-12-21 16:52 ski Status new => assigned
2016-12-21 17:04 ski Note Added: 0061960
2016-12-21 17:06 ski Note Added: 0061961
2016-12-21 17:12 ski Note Added: 0061962
2016-12-21 17:12 ski Assigned To ski => ibs
2016-12-21 17:12 ski Status assigned => resolved
2016-12-21 17:12 ski Steps to Reproduce Updated View Revisions
2016-12-21 17:20 kgv Note Added: 0061963
2016-12-21 17:32 kgv Note Edited: 0061963 View Revisions
2016-12-21 17:35 kgv Note Added: 0061964
2016-12-21 17:35 kgv Note Edited: 0061964 View Revisions
2016-12-21 17:35 kgv Note Edited: 0061964 View Revisions
2016-12-21 17:36 kgv Note Edited: 0061964 View Revisions
2016-12-21 17:36 kgv Note Edited: 0061964 View Revisions
2016-12-21 17:37 kgv Note Edited: 0061964 View Revisions
2016-12-21 19:38 git Note Added: 0061970
2016-12-21 19:50 git Note Added: 0061971
2016-12-21 19:52 ski Note Added: 0061972
2016-12-22 11:13 kgv Note Added: 0061987
2016-12-22 11:21 ski Note Added: 0061992
2016-12-22 11:41 kgv Note Added: 0061993
2016-12-22 12:51 git Note Added: 0062001
2016-12-22 12:51 ski Note Added: 0062002
2016-12-22 18:54 git Note Added: 0062020
2016-12-22 18:54 ibs Note Added: 0062021
2016-12-22 18:54 ibs Assigned To ibs => bugmaster
2016-12-22 18:54 ibs Status resolved => reviewed
2016-12-22 19:36 apv Assigned To bugmaster => apv
2016-12-23 11:59 apn Assigned To apv => apn
2016-12-23 12:05 apn Test case number => Not needed
2016-12-23 12:05 apn Assigned To apn => bugmaster
2016-12-23 12:05 apn Status reviewed => tested
2016-12-23 13:57 kgv Note Added: 0062061
2016-12-30 18:08 apn Changeset attached => occt master a20cce39
2016-12-30 18:08 apn Assigned To bugmaster => apn
2016-12-30 18:08 apn Status tested => verified
2016-12-30 18:08 apn Resolution open => fixed
2017-02-08 11:31 git Note Added: 0063546
2017-09-29 16:21 user533 Fixed in Version => 7.2.0
2017-09-29 16:31 user533 Status verified => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker