From: Eduardo DAVILA Date: Mon, 15 Nov 2021 08:59:16 +0000 (+0100) Subject: #3445 device TDx Connexion3D X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=973572d0003778357312ad4140823377e4dde02d;p=creaToolsTools.git #3445 device TDx Connexion3D --- diff --git a/Linux/installscript b/Linux/installscript index e5ce151..9c899b0 100755 --- a/Linux/installscript +++ b/Linux/installscript @@ -48,7 +48,7 @@ configureFile="scripts/CreaTools-configure.sh" # default configuration parameters OperatingSystem=`getDistrib` corenumber=`getncore` -generationdir=$HOME/Creatis/creaTools +generationdir=$HOME/Creatis/C11 installPrefixThird= installPrefix= docgeneration=OFF @@ -60,6 +60,7 @@ buildType=Release gdcmVersion=GDCM1 ITKVersion=ITK3 export ETC_BASHRC=`getbashrc` +TDx=ON function usage { @@ -180,7 +181,7 @@ fi ################################################################################## ############################ check configuration parameters -# check distrib +# check distribÒ checkDistrib $OperatingSystem # complete default install prefix @@ -217,6 +218,7 @@ if [ `checkVal $command config all` == true ] ; then echo "gdcmVersion=$gdcmVersion" >> $configureFile echo "ITKVersion=$ITKVersion" >> $configureFile echo "ETC_BASHRC=$ETC_BASHRC" >> $configureFile + echo "TDx=$TDx" >> $configureFile fi diff --git a/Linux/scripts/CreaTools-compile.sh b/Linux/scripts/CreaTools-compile.sh index 3cab2f5..09a442c 100644 --- a/Linux/scripts/CreaTools-compile.sh +++ b/Linux/scripts/CreaTools-compile.sh @@ -67,6 +67,8 @@ fi echo $scriptDir echo --start_point-- echo $start_point + echo --TDx-- + echo $TDx echo "------" if [ ! -f $installPrefixThird/share/creatools/creatools_third_party_library_config.sh ] @@ -137,7 +139,7 @@ then then bash $scriptDir/cmakemod.sh $creasource $generationdir $installPrefix $buildType - bash $scriptDir/creaVariables.sh $creasource $generationdir $docgeneration + bash $scriptDir/creaVariables.sh $creasource $generationdir $docgeneration $TDx bash $scriptDir/compilemod.sh $buildType $creasource $generationdir $corenumber bash $scriptDir/ctestmod.sh $creasource $generationdir fi @@ -164,7 +166,7 @@ then # BBTK echo ========================================================= $bbtksource $generationdir $installPrefix $buildType bash $scriptDir/cmakemod.sh $bbtksource $generationdir $installPrefix $buildType - bash $scriptDir/bbtkVariables.sh $bbtksource $generationdir $docgeneration $gdcmVersion + bash $scriptDir/bbtkVariables.sh $bbtksource $generationdir $docgeneration $gdcmVersion $TDx bash $scriptDir/compilemod.sh $buildType $bbtksource $generationdir $corenumber bbtk bash $scriptDir/compilemod.sh $buildType $bbtksource $generationdir $corenumber bbi bash $scriptDir/compilemod.sh $buildType $bbtksource $generationdir $corenumber bbfy @@ -203,7 +205,7 @@ then then # creaMaracasVisu bash $scriptDir/cmakemod.sh $creamaracassource $generationdir $installPrefix $buildType - bash $scriptDir/creaMaracasVariables.sh $creamaracassource $generationdir $docgeneration + bash $scriptDir/creaMaracasVariables.sh $creamaracassource $generationdir $docgeneration $TDx bash $scriptDir/compilemod.sh $buildType $creamaracassource $generationdir $corenumber bash $scriptDir/ctestmod.sh $creamaracassource $generationdir fi @@ -287,7 +289,7 @@ then then # creaImageIO bash $scriptDir/cmakemod.sh $creaimagesource $generationdir $installPrefix $buildType - bash $scriptDir/creaImageIOVariables.sh $creaimagesource $generationdir $docgeneration $gdcmVersion + bash $scriptDir/creaImageIOVariables.sh $creaimagesource $generationdir $docgeneration $gdcmVersion $TDx bash $scriptDir/compilemod.sh $buildType $creaimagesource $generationdir $corenumber bash $scriptDir/ctestmod.sh $creaimagesource $generationdir fi @@ -315,7 +317,7 @@ then then # creaContours bash $scriptDir/cmakemod.sh $creacontourssource $generationdir $installPrefix $buildType - bash $scriptDir/creaContoursVariables.sh $creacontourssource $generationdir $docgeneration + bash $scriptDir/creaContoursVariables.sh $creacontourssource $generationdir $docgeneration $TDx bash $scriptDir/compilemod.sh $buildType $creacontourssource $generationdir $corenumber bash $scriptDir/ctestmod.sh $creacontourssource $generationdir fi @@ -342,7 +344,7 @@ then if [ true = true ] then bash $scriptDir/cmakemod.sh $crearigidregistrationssource $generationdir $installPrefix $buildType - bash $scriptDir/creaRigidRegistrationVariables.sh $crearigidregistrationssource $generationdir $docgeneration + bash $scriptDir/creaRigidRegistrationVariables.sh $crearigidregistrationssource $generationdir $docgeneration $TDx bash $scriptDir/compilemod.sh $buildType $crearigidregistrationssource $generationdir $corenumber bash $scriptDir/ctestmod.sh $crearigidregistrationssource $generationdir fi @@ -362,7 +364,7 @@ then then # bbtkGEditor bash $scriptDir/cmakemod.sh $bbtkgeditorsource $generationdir $installPrefix $buildType - bash $scriptDir/bbtkGEditorVariables.sh $bbtkgeditorsource $generationdir $docgeneration + bash $scriptDir/bbtkGEditorVariables.sh $bbtkgeditorsource $generationdir $docgeneration $TDx bash $scriptDir/compilemod.sh $buildType $bbtkgeditorsource $generationdir $corenumber bash $scriptDir/ctestmod.sh $bbtkgeditorsource $generationdir fi @@ -439,7 +441,7 @@ then then # creaVtk bash $scriptDir/cmakemod.sh $creavtksource $generationdir $installPrefix $buildType - bash $scriptDir/creaVtkVariables.sh $creavtksource $generationdir $docgeneration + bash $scriptDir/creaVtkVariables.sh $creavtksource $generationdir $docgeneration $TDx bash $scriptDir/compilemod.sh $buildType $creavtksource $generationdir $corenumber bash $scriptDir/ctestmod.sh $creavtksource $generationdir fi diff --git a/Linux/scripts/LocalFunctions.sh b/Linux/scripts/LocalFunctions.sh index 662fbae..b87239d 100644 --- a/Linux/scripts/LocalFunctions.sh +++ b/Linux/scripts/LocalFunctions.sh @@ -168,6 +168,7 @@ function printconfig { echo " Build type : $buildType" echo " Gdcm version : $gdcmVersion" echo " ITK version : $ITKVersion" + echo " TDx : $TDx" echo } diff --git a/Linux/scripts/bbtkGEditorVariables.sh b/Linux/scripts/bbtkGEditorVariables.sh index 5f8828c..42938fa 100644 --- a/Linux/scripts/bbtkGEditorVariables.sh +++ b/Linux/scripts/bbtkGEditorVariables.sh @@ -24,11 +24,21 @@ # $1 : creaBruker # $2 : generationdir # $3 : ON/OFF (generate doc) +# $4 : ON/OFF TDx + binfolder=$2/creatools_bin/$1Bin cd $binfolder -cmake -D CMAKE_CXX_FLAGS:STRING=-fPIC CMakeCache.txt + +TDx=$4 +cxxFlags='-fPIC ' +# TDx is declared in: CreaTools-configure.sh +if [ "$TDx" == "ON" ]; then + cxxFlags=$cxxFlags'-F/Library/Frameworks ' +fi + +cmake -D CMAKE_CXX_FLAGS:STRING="$cxxFlags" CMakeCache.txt cmake -D crea_DIR:PATH=$2/creatools_bin/creaBin CMakeCache.txt cmake -D BBTK_DIR:PATH=$2/creatools_bin/bbtkBin CMakeCache.txt cmake -D creaMaracasVisu_DIR:PATH=$2/creatools_bin/creaMaracasVisuBin CMakeCache.txt diff --git a/Linux/scripts/bbtkVariables.sh b/Linux/scripts/bbtkVariables.sh index ce42ac0..68b124e 100644 --- a/Linux/scripts/bbtkVariables.sh +++ b/Linux/scripts/bbtkVariables.sh @@ -28,6 +28,8 @@ # $2 : generationdir # $3 : ON/OFF (generate doc) # $4 : GDCM1 / GDCM2 +# $5 : ON/OFF TDx + binfolder=$2/creatools_bin/$1Bin @@ -42,7 +44,16 @@ boolgdcm2=OFF boolgdcm1=ON fi -cmake -D CMAKE_CXX_FLAGS:STRING=-fPIC -D crea_DIR:PATH=$2/creatools_bin/creaBin CMakeCache.txt +#This line es not working in MacOs +#cxxFlags='-fPIC -fopenmp ' +cxxFlags='-fPIC ' +TDx=$5 +# TDx is declared in: CreaTools-configure.sh +if [ "$TDx" == "ON" ]; then + cxxFlags=$cxxFlags'-F/Library/Frameworks ' +fi + +cmake -DCMAKE_CXX_FLAGS:STRING="$cxxFlags" -D crea_DIR:PATH=$2/creatools_bin/creaBin CMakeCache.txt cmake -D 0-BUILD_ALL:BOOL=ON CMakeCache.txt echo ============================================================================================= cmake -D USE_GDCM2:BOOL=$boolgdcm2 -D USE_GDCM:BOOL=$boolgdcm1 -D BUILD_BBTK_DOC_GUIDES_HTML:BOOL=$3 -D BUILD_BBTK_DOC_GUIDES_PDF:BOOL=$3 -D BUILD_BBTK_DOC_DOXYGEN:BOOL=$3 -D BUILD_BBTK_DOC_PACKAGE:BOOL=$3 CMakeCache.txt diff --git a/Linux/scripts/creaContoursVariables.sh b/Linux/scripts/creaContoursVariables.sh index df3e040..6a5a75f 100644 --- a/Linux/scripts/creaContoursVariables.sh +++ b/Linux/scripts/creaContoursVariables.sh @@ -29,7 +29,15 @@ binfolder=$2/creatools_bin/$1Bin cd $binfolder -cmake -D CMAKE_CXX_FLAGS:STRING=-fPIC CMakeCache.txt +TDx=$4 +cxxFlags='-fPIC ' +# TDx is declared in: CreaTools-configure.sh +if [ "$TDx" == "ON" ]; then + cxxFlags=$cxxFlags'-F/Library/Frameworks ' +fi + + +cmake -D CMAKE_CXX_FLAGS:STRING="$cxxFlags" CMakeCache.txt cmake -D crea_DIR:PATH=$2/creatools_bin/creaBin CMakeCache.txt cmake -D BBTK_DIR:PATH=$2/creatools_bin/bbtkBin CMakeCache.txt cmake -D BBTK_DIR:PATH=$2/creatools_bin/bbtkBin CMakeCache.txt diff --git a/Linux/scripts/creaImageIOVariables.sh b/Linux/scripts/creaImageIOVariables.sh index 077ddd1..720091e 100644 --- a/Linux/scripts/creaImageIOVariables.sh +++ b/Linux/scripts/creaImageIOVariables.sh @@ -28,6 +28,7 @@ # $2 : generationdir # $3 : ON/OFF (generate doc) # $4 : GDCM1 / GDCM2 +# $5 : ON/OFF TDx currentdir=$2 binfolder=$2/creatools_bin/$1Bin @@ -43,8 +44,14 @@ boolgdcm2=OFF boolgdcm1=ON fi +TDx=$5 +cxxFlags='-fPIC ' +# TDx is declared in: CreaTools-configure.sh +if [ "$TDx" == "ON" ]; then + cxxFlags=$cxxFlags'-F/Library/Frameworks ' +fi -cmake -D CMAKE_CXX_FLAGS:STRING=-fPIC CMakeCache.txt +cmake -D CMAKE_CXX_FLAGS:STRING="$cxxFlags" CMakeCache.txt cmake -D crea_DIR:PATH=$currentdir/creatools_bin/creaBin CMakeCache.txt cmake -D BBTK_DIR:PATH=$currentdir/creatools_bin/bbtkBin CMakeCache.txt cmake -D creaBruker_DIR:PATH=$currentdir/creatools_bin/creaBrukerBin CMakeCache.txt diff --git a/Linux/scripts/creaMaracasVariables.sh b/Linux/scripts/creaMaracasVariables.sh index 8a80c31..5e3b824 100644 --- a/Linux/scripts/creaMaracasVariables.sh +++ b/Linux/scripts/creaMaracasVariables.sh @@ -32,16 +32,20 @@ currentdir=$2 binfolder=$2/creatools_bin/$1Bin cd $binfolder - if [ $OperatingSystem = "MacOS" ] - then - cmake -D CMAKE_CXX_COMPILER:FILE=/usr/bin/g++ -## /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - cmake -D CMAKE_CXX_FLAGS:STRING=-Xpreprocessor -fopenmp CMakeCache.txt - else - cmake -D CMAKE_CXX_FLAGS:STRING=-fopenmp CMakeCache.txt - fi - -cmake -D CMAKE_CXX_FLAGS:STRING=-fPIC CMakeCache.txt + +TDx=$4 + +# this line is not working in MacOs +#cxxFlags='-fPIC -fopenmp ' +cxxFlags='-fPIC ' + +# TDx is declared in: CreaTools-configure.sh +if [ "$TDx" == "ON" ]; then + cxxFlags=$cxxFlags'-F/Library/Frameworks -DVTK_USE_TDX ' +fi + + +cmake -D CMAKE_CXX_FLAGS:STRING="$cxxFlags" CMakeCache.txt cmake -D BBTK_DIR:PATH=$currentdir/creatools_bin/bbtkBin CMakeCache.txt cmake -D crea_DIR:PATH=$currentdir/creatools_bin/creaBin CMakeCache.txt cmake -D BUILD_BBTK_PACKAGE_creaMaracasVisu:BOOL=ON CMakeCache.txt diff --git a/Linux/scripts/creaRigidRegistrationVariables.sh b/Linux/scripts/creaRigidRegistrationVariables.sh index e1d89bc..77f09e4 100644 --- a/Linux/scripts/creaRigidRegistrationVariables.sh +++ b/Linux/scripts/creaRigidRegistrationVariables.sh @@ -29,7 +29,14 @@ binfolder=$2/creatools_bin/$1Bin cd $binfolder -cmake -D CMAKE_CXX_FLAGS:STRING=-fPIC -D crea_DIR:PATH=$currentdir$2 -D BUILD_BBTK_PACKAGE_PackRecalage:BOOL=ON -D BUILD_creaRigidRegistration_DOC:BOOL=$3 -D crea_DIR:PATH=$2/creatools_bin/creaBin CMakeCache.txt +TDx=$4 +cxxFlags='-fPIC ' +# TDx is declared in: CreaTools-configure.sh +if [ "$TDx" == "ON" ]; then + cxxFlags=$cxxFlags'-F/Library/Frameworks ' +fi + +cmake -D CMAKE_CXX_FLAGS:STRING="$cxxFlags" -D crea_DIR:PATH=$currentdir$2 -D BUILD_BBTK_PACKAGE_PackRecalage:BOOL=ON -D BUILD_creaRigidRegistration_DOC:BOOL=$3 -D crea_DIR:PATH=$2/creatools_bin/creaBin CMakeCache.txt cmake CMakeCache.txt cmake CMakeCache.txt diff --git a/Linux/scripts/creaVariables.sh b/Linux/scripts/creaVariables.sh index 0f34967..e755593 100644 --- a/Linux/scripts/creaVariables.sh +++ b/Linux/scripts/creaVariables.sh @@ -27,19 +27,24 @@ # $1 : bbtk # $2 : generationdir # $3 : ON/OFF (generate doc) --> Not used +# $4 : ON/OFF TDx binfolder=$2/creatools_bin/$1Bin cd $binfolder if [[ "$OSTYPE" == "linux-gnu" ]]; then - cxxFlags='-fPIC' -elif [[ "$OSTYPE" == "darwin" ]]; then - cxxFlags='-fPIC -ObjC++C' + cxxFlags='-fPIC ' fi +TDx=$4 +# TDx is declared in: CreaTools-configure.sh +if [ "$TDx" == "ON" ]; then + cxxFlags=$cxxFlags'-F/Library/Frameworks -DVTK_USE_TDX ' +#Borrame cmake -D VTK_USE_TDX:BOOL=ON CMakeCache.txt +fi -cmake -D CMAKE_CXX_FLAGS:STRING=$cxxFlags -D CREA_BUILD_VTK:BOOL=ON -D CREA_BUILD_WX:BOOL=ON CMakeCache.txt +cmake -D CMAKE_CXX_FLAGS:STRING="$cxxFlags" -D CREA_BUILD_VTK:BOOL=ON -D CREA_BUILD_WX:BOOL=ON CMakeCache.txt cmake CMakeCache.txt cmake CMakeCache.txt diff --git a/Linux/scripts/creaVtkVariables.sh b/Linux/scripts/creaVtkVariables.sh index a03f86d..25e647e 100644 --- a/Linux/scripts/creaVtkVariables.sh +++ b/Linux/scripts/creaVtkVariables.sh @@ -32,7 +32,18 @@ currentdir=$2 binfolder=$2/creatools_bin/$1Bin cd $binfolder -cmake -D CMAKE_CXX_FLAGS:STRING=-fPIC -fopenmp CMakeCache.txt +TDx=$4 +#This line es not working in MacOs +#cxxFlags='-fPIC -fopenmp ' +cxxFlags='-fPIC ' + +# TDx is declared in: CreaTools-configure.sh +if [ "$TDx" == "ON" ]; then + cxxFlags=$cxxFlags'-F/Library/Frameworks ' +fi + + +cmake -D CMAKE_CXX_FLAGS:STRING="$cxxFlags" CMakeCache.txt cmake -D BBTK_DIR:PATH=$currentdir/creatools_bin/bbtkBin CMakeCache.txt cmake -D crea_DIR:PATH=$currentdir/creatools_bin/creaBin CMakeCache.txt cmake -D BUILD_BBTK_PACKAGE_creaVtk:BOOL=ON CMakeCache.txt