View Issue Details

IDProjectCategoryView StatusLast Update
0029980Open CASCADEOCCT:Configurationpublic2018-07-28 12:46
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version7.3.0 
Target Version7.4.0Fixed in Version7.4.0 
Summary0029980: Configuration, CMake - impossible to override CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS
DescriptionCMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS is hard-coded to 1 within OCCT CMake scripts, which causes troubles when using with linker not supporting this option.

Since this variable is assigned unconditionally, it is also impossible overriding it without modifying CMake scripts.
Steps To Reproduce
#!/bin/bash

# Auxiliary script for semi-automated building of OCCT for iOS platform.
# Script should be placed into root of OCCT repository, edited with paths
# to CMake and 3rd-parties.
# https://dev.opencascade.org/

# FreeType should be specified as mandatory dependency
# (should be manually build or taken from earlier builds).
# https://www.opencascade.com/content/3rd-party-components

# CMake toolchain definition should be cloned from the following git repository: 
# https://github.com/leetal/ios-cmake 

# CMake can be downloaded from official site:
# https://cmake.org/download/

# go to the script directory
aScriptPath=${BASH_SOURCE%/*}
if [ -d "$aScriptPath" ]; then cd "$aScriptPath"; fi
aScriptPath="$PWD"

aCasSrc=$aScriptPath
aNbJobs="$(getconf _NPROCESSORS_ONLN)"

PATH=/Applications/CMake.app/Contents/bin:$PATH

aToolchain=$HOME/Develop/3rdparty-ios/ios-cmake.git/ios.toolchain.cmake

# paths to pre-built 3rd-parties
aFreeType=$HOME/Develop/3rdparty-ios/freetype-2.7.1-ios

# build stages to perform
toSimulator=0
toCMake=1
toClean=1
toMake=1
toInstall=1
toPack=1

export MACOSX_DEPLOYMENT_TARGET=
export IPHONEOS_DEPLOYMENT_TARGET=8.0

anAbi=arm64
aPlatform=OS
aPlatformAndCompiler=ios-$anAbi-clang
if [[ $toSimulator == 1 ]]; then
  anAbi=x86_64
  aPlatform=SIMULATOR64 
  aPlatformAndCompiler=ios-simulator64-clang
fi
aWorkDir=work/${aPlatformAndCompiler}-make
aDestDir=$aCasSrc/work/$aPlatformAndCompiler
aLogFile=$aCasSrc/build-${aPlatformAndCompiler}.log

# include some information about OCCT into archive
echo \<pre\>> VERSION.html
git status >> VERSION.html
git log -n 100 >> VERSION.html
echo \</pre\>>> VERSION.html

mkdir -p $aWorkDir
rm    -f $aLogFile

pushd $aWorkDir

aTimeZERO=$SECONDS
set -o pipefail

function logDuration {
  if [[ $1 == 1 ]]; then
    aDur=$(($4 - $3))
    echo $2 time: $aDur sec>> $aLogFile
  fi
}

# (re)generate Make files
if [[ $toCMake == 1 ]]; then
  echo Configuring OCCT for iOS...
  cmake -G "Unix Makefiles" \
  -D CMAKE_TOOLCHAIN_FILE:FILEPATH="$aToolchain" \
  -D IOS_PLATFORM :STRING="$aPlatform" \
  -D IOS_ARCH:STRING ="$anAbi" \
  -D  IOS_DEPLOYMENT_TARGET :STRING ="$IPHONEOS_DEPLOYMENT_TARGET" \
  -D  CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS :BOOL="OFF" \
  -D  CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS :BOOL="OFF" \
  -D CMAKE_BUILD_TYPE:STRING="Release" \
  -D BUILD_LIBRARY_TYPE:STRING="Static" \
  -D INSTALL_DIR:PATH="$aDestDir" \
  -D INSTALL_DIR_INCLUDE:STRING="inc" \
  -D INSTALL_DIR_LIB:STRING="lib" \
  -D INSTALL_DIR_RESOURCE:STRING="src" \
  -D INSTALL_NAME_DIR:STRING="@executable_path/../Frameworks" \
  -D 3RDPARTY_FREETYPE_DIR:PATH="$aFreeType" \
  -D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="$aFreeType/include" \
  -D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="$aFreeType/include" \
  -D 3RDPARTY_FREETYPE_LIBRARY_DIR:PATH="$aFreeType/lib" \
  -D USE_FREEIMAGE:BOOL="OFF" \
  -D BUILD_MODULE_Draw:BOOL="OFF" \
  "$aCasSrc" 2>&1 | tee -a $aLogFile
  aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi
fi
aTimeGEN=$SECONDS
logDuration $toCMake "Generation" $aTimeZERO $aTimeGEN

# clean up from previous build
if [[ $toClean == 1 ]]; then
  make clean
fi

# build the project
if [[ $toMake == 1 ]]; then
  echo Building...
  make -j $aNbJobs 2>&1 | tee -a $aLogFile
  aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi
fi
aTimeBUILD=$SECONDS
logDuration $toMake "Building"       $aTimeGEN  $aTimeBUILD
logDuration $toMake "Total building" $aTimeZERO $aTimeBUILD

# install the project
if [[ $toInstall == 1 ]]; then
  echo Installing into $aCasSrc/work/$aPlatformAndCompiler...
  make install 2>&1 | tee -a $aLogFile
  cp -f $aCasSrc/VERSION.html $aDestDir/VERSION.html
fi
aTimeINSTALL=$SECONDS
logDuration $toInstall "Install" $aTimeBUILD $aTimeINSTALL

# create an archive
if [[ $toPack == 1 ]]; then
  anArchName=occt-$aPlatformAndCompiler.tar.bz2
  echo Creating an archive $aCasSrc/work/$anArchName...
  rm $aCasSrc/work/$aPlatformAndCompiler/../$anArchName &>/dev/null
  pushd $aCasSrc/work/$aPlatformAndCompiler
  tar -jcf $aCasSrc/work/$aPlatformAndCompiler/../$anArchName *
  popd
fi
aTimePACK=$SECONDS
logDuration $toPack "Packing archive" $aTimeINSTALL $aTimePACK

# finished
DURATION=$(($aTimePACK - $aTimeZERO))
echo Total time: $DURATION sec
logDuration 1 "Total" $aTimeZERO $aTimePACK

popd
TagsNo tags attached.
Test case numberNot needed

Activities

git

2018-07-23 19:15

administrator   ~0077941

Branch CR29980 has been created by kgv.

SHA-1: 9a44c144ae5d06b8431824714a9fa93d12437a26


Detailed log of new commits:

Author: kgv
Date: Mon Jul 23 19:13:29 2018 +0300

    0029980: Configuration, CMake - impossible to override CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS
    
    Variables are not assigning only if have not been previously defined.

Author: emv
Date: Tue Jul 17 12:07:59 2018 +0300

    0028113: BOPAlgo_Builder produces invalid shape
    
    Fast rebuilding of the face is now avoided if its edges have been unified during the intersection.
    Full rebuilding of the face is required in this case (using BuilderFace algorithm).

git

2018-07-23 19:20

administrator   ~0077942

Branch CR29980 has been updated forcibly by kgv.

SHA-1: 2a5145a747ca6da6fb556ceaffa1534e14320bcf

kgv

2018-07-23 19:20

developer   ~0077943

Patch is ready for review.

apn

2018-07-24 17:27

administrator   ~0077969

Reviewed, please integrate.

bugmaster

2018-07-24 18:47

administrator   ~0077975

Testing is not requared

git

2018-07-28 12:38

administrator   ~0078138

Branch CR29980 has been deleted by inv.

SHA-1: 2a5145a747ca6da6fb556ceaffa1534e14320bcf

Related Changesets

occt: master 27a4b067

2018-07-23 16:13:29

kgv


Committer: bugmaster Details Diff
0029980: Configuration, CMake - impossible to override CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS

Variables are not assigning only if have not been previously defined.
Affected Issues
0029980
mod - adm/cmake/occt_defs_flags.cmake Diff File

Issue History

Date Modified Username Field Change
2018-07-23 19:12 kgv New Issue
2018-07-23 19:12 kgv Assigned To => bugmaster
2018-07-23 19:15 git Note Added: 0077941
2018-07-23 19:20 git Note Added: 0077942
2018-07-23 19:20 kgv Note Added: 0077943
2018-07-23 19:20 kgv Assigned To bugmaster => apn
2018-07-23 19:20 kgv Status new => resolved
2018-07-23 19:20 kgv Product Version => 7.3.0
2018-07-23 23:39 kgv Steps to Reproduce Updated
2018-07-24 17:27 apn Test case number => Not needed
2018-07-24 17:27 apn Note Added: 0077969
2018-07-24 17:27 apn Assigned To apn => bugmaster
2018-07-24 17:27 apn Status resolved => reviewed
2018-07-24 18:47 bugmaster Note Added: 0077975
2018-07-24 18:47 bugmaster Status reviewed => tested
2018-07-28 12:26 bugmaster Changeset attached => occt master 27a4b067
2018-07-28 12:26 bugmaster Status tested => verified
2018-07-28 12:26 bugmaster Resolution open => fixed
2018-07-28 12:38 git Note Added: 0078138