View Issue Details

IDProjectCategoryView StatusLast Update
0028135Open CASCADEOCCT:Configurationpublic2020-06-11 08:30
Reporterkgv Assigned Toapn  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Target Version7.2.0Fixed in Version7.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

Relationships

related to 0024888 closedbugmaster Refactoring of OCCT CMake meta-project 
parent of 0031606 closedbugmaster Configuration, CMake - build fails with Android NDK + CLang compiler + MinGW Makefiles 
child of 0025146 closedbugmaster Porting to Android 

Activities

git

2016-12-21 16:51

administrator   ~0061959

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

ski

2016-12-21 17:04

developer   ~0061960

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.

ski

2016-12-21 17:06

developer   ~0061961

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

Documentation was updated.

ski

2016-12-21 17:12

developer   ~0061962

Dear ibs,

please review.

kgv

2016-12-21 17:20

developer   ~0061963

Last edited: 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.

kgv

2016-12-21 17:35

developer   ~0061964

Last edited: 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.

git

2016-12-21 19:38

administrator   ~0061970

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.

git

2016-12-21 19:50

administrator   ~0061971

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.

ski

2016-12-21 19:52

developer   ~0061972

Done.

kgv

2016-12-22 11:13

developer   ~0061987

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)?

ski

2016-12-22 11:21

developer   ~0061992

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)

kgv

2016-12-22 11:41

developer   ~0061993

> The default value is gnustl_static.
Please set this variable to "gnustl_shared" and provide description in our documentation.

git

2016-12-22 12:51

administrator   ~0062001

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.

ski

2016-12-22 12:51

developer   ~0062002

Done.

git

2016-12-22 18:54

administrator   ~0062020

Branch CR28135 has been updated forcibly by ibs.

SHA-1: 2b673719c6c2770a485c6e7f5e774a925f18e2c4

ibs

2016-12-22 18:54

developer   ~0062021

dear bugmastre,
there are no remarks, please integrate

kgv

2016-12-23 13:57

developer   ~0062061

I suppose that weekly Android builds should be now based on this procedure.

git

2017-02-08 11:31

administrator   ~0063546

Branch CR28135 has been deleted by kgv.

SHA-1: 2b673719c6c2770a485c6e7f5e774a925f18e2c4

Related Changesets

occt: master a20cce39

2016-12-21 10:41:04

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.
Affected Issues
0028135
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
2016-12-21 17:20 kgv Note Added: 0061963
2016-12-21 17:32 kgv Note Edited: 0061963
2016-12-21 17:35 kgv Note Added: 0061964
2016-12-21 17:35 kgv Note Edited: 0061964
2016-12-21 17:35 kgv Note Edited: 0061964
2016-12-21 17:36 kgv Note Edited: 0061964
2016-12-21 17:36 kgv Note Edited: 0061964
2016-12-21 17:37 kgv Note Edited: 0061964
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 aiv Fixed in Version => 7.2.0
2017-09-29 16:31 aiv Status verified => closed
2020-06-11 08:30 kgv Relationship added parent of 0031606