Commit 1aea8997 by Jean-François Remacle

Merge branch 'master' of http://gitlab.onelab.info/gmsh/gmsh

parents 3a3b14fa 3278dece
Pipeline #169 failed with stage
in 9 minutes 17 seconds
......@@ -1090,7 +1090,6 @@ if(HAVE_SOLVER)
endif(HAVE_SOLVER)
if(ENABLE_OCC)
set(OCC_VERSION "")
set(OCC_MINIMAL_VERSION "6.9.1")
if(WIN32 OR CYGWIN)
if(HAVE_64BIT_SIZE_T)
......@@ -1106,21 +1105,23 @@ if(ENABLE_OCC)
if(OCC_INC)
file(STRINGS ${OCC_INC}/Standard_Version.hxx
OCC_MAJOR REGEX "#define OCC_VERSION_MAJOR.*")
string(REGEX MATCH "[0-9]+" OCC_MAJOR ${OCC_MAJOR})
file(STRINGS ${OCC_INC}/Standard_Version.hxx
OCC_MINOR REGEX "#define OCC_VERSION_MINOR.*")
string(REGEX MATCH "[0-9]+" OCC_MINOR ${OCC_MINOR})
file(STRINGS ${OCC_INC}/Standard_Version.hxx
OCC_MAINT REGEX "#define OCC_VERSION_MAINTENANCE.*")
string(REGEX MATCH "[0-9]+" OCC_MAINT ${OCC_MAINT})
set(OCC_VERSION "${OCC_MAJOR}.${OCC_MINOR}.${OCC_MAINT}")
message(STATUS "Found OpenCASCADE version ${OCC_VERSION} in ${OCC_INC}")
if(OCC_MAJOR AND OCC_MINOR AND OCC_MAINT)
string(REGEX MATCH "[0-9]+" OCC_MAJOR "${OCC_MAJOR}")
string(REGEX MATCH "[0-9]+" OCC_MINOR "${OCC_MINOR}")
string(REGEX MATCH "[0-9]+" OCC_MAINT "${OCC_MAINT}")
set(OCC_VERSION "${OCC_MAJOR}.${OCC_MINOR}.${OCC_MAINT}")
message(STATUS "Found OpenCASCADE version ${OCC_VERSION} in ${OCC_INC}")
endif(OCC_MAJOR AND OCC_MINOR AND OCC_MAINT)
endif(OCC_INC)
if(OCC_VERSION STRLESS ${OCC_MINIMAL_VERSION})
if(OCC_VERSION AND OCC_VERSION STRLESS ${OCC_MINIMAL_VERSION})
message(WARNING "Gmsh requires OpenCASCADE >= ${OCC_MINIMAL_VERSION}")
message(WARNING "Use CMAKE_PREFIX_PATH or the CASROOT environment variable "
"to explicitely specify the installation path of OpenCASCADE")
else (OCC_VERSION STRLESS ${OCC_MINIMAL_VERSION})
else(OCC_VERSION AND OCC_VERSION STRLESS ${OCC_MINIMAL_VERSION})
set(OCC_LIBS_REQUIRED
# subset of DataExchange
TKSTEP TKSTEP209 TKSTEPAttr TKSTEPBase TKIGES TKXSBase
......@@ -1139,7 +1140,8 @@ if(ENABLE_OCC)
else(OCC_LIBS)
set(OCC_LIBS)
foreach(OCC ${OCC_LIBS_REQUIRED})
find_library(OCC_LIB ${OCC} HINTS ENV CASROOT PATH_SUFFIXES lib ${OCC_SYS_NAME}/lib ${OCC_SYS_NAME}/vc8/lib)
find_library(OCC_LIB ${OCC} HINTS ENV CASROOT PATH_SUFFIXES
lib ${OCC_SYS_NAME}/lib ${OCC_SYS_NAME}/vc8/lib)
if(OCC_LIB)
list(APPEND OCC_LIBS ${OCC_LIB})
else(OCC_LIB)
......@@ -1163,7 +1165,7 @@ if(ENABLE_OCC)
add_definitions(-DWNT)
endif(CYGWIN)
endif(NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED)
endif(OCC_VERSION STRLESS ${OCC_MINIMAL_VERSION})
endif(OCC_VERSION AND OCC_VERSION STRLESS ${OCC_MINIMAL_VERSION})
endif(ENABLE_OCC)
if(ENABLE_ACIS)
......
......@@ -913,7 +913,7 @@ StringXNumber GeometryOptions_Number[] = {
"Display geometry surfaces?" },
{ F|O, "SurfaceNumbers" , opt_geometry_surfaces_num , 0. ,
"Display surface numbers?" },
{ F|O, "SurfaceType" , opt_geometry_surface_type , 2. ,
{ F|O, "SurfaceType" , opt_geometry_surface_type , 0. ,
"Surface display type (0=cross, 1=wireframe, 2=solid)" },
{ F|O, "Tangents" , opt_geometry_tangents , 0. ,
......
......@@ -9,10 +9,11 @@
#include "avl.h"
#include "ListUtils.h"
typedef struct {
class Tree_T {
public:
int size;
avl_tree *root;
} Tree_T;
};
Tree_T *Tree_Create(int size, int (*fcmp)(const void *a, const void *b));
void Tree_Delete(Tree_T *Tree);
......
......@@ -56,10 +56,10 @@ static void draw_stl(std::vector<SPoint3> &vertices, std::vector<SVector3> &norm
{
GLint mode[2];
glGetIntegerv(GL_POLYGON_MODE, mode);
if(CTX::instance()->geom.surfaceType > 1)
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
else
if(CTX::instance()->geom.surfaceType == 1)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
else
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glEnable(GL_LIGHTING);
glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
glColor4ubv((GLubyte *) & CTX::instance()->color.geom.highlight[0]);
......
......@@ -6,15 +6,15 @@
#ifndef _GMODELIO_GEO_H_
#define _GMODELIO_GEO_H_
#include "ListUtils.h"
#include "TreeUtils.h"
class GModel;
class ExtrudeParams;
class gmshSurface;
class List_T;
class Tree_T;
class GEO_Internals{
public:
// this will become private
Tree_T *Points, *Curves, *EdgeLoops, *Surfaces, *SurfaceLoops, *Volumes;
Tree_T *DelPoints, *DelCurves, *DelSurfaces, *DelVolumes;
List_T *PhysicalGroups, *DelPhysicalGroups;
......
......@@ -905,8 +905,8 @@ bool OCC_Internals::_addSpline(int &tag, const std::vector<int> &vertexTags, int
Msg::Error("OpenCASCADE edge with tag %d already exists", tag);
return false;
}
if(vertexTags.size() < 2 || vertexTags.size() > 20){
Msg::Error("Number of control points should be in [2,20]");
if(vertexTags.size() < 2){
Msg::Error("Number of control points should be at least 2");
return false;
}
......@@ -1221,8 +1221,8 @@ bool OCC_Internals::addSurfaceFilling(int &tag, int wireTag)
TopoDS_Edge edge = TopoDS::Edge(exp0.Current());
f.Add(edge, GeomAbs_C0);
// face filling will duplicate the edge
if(_edgeTag.IsBound(edge))
unbind(edge, _edgeTag.Find(edge), true);
//if(_edgeTag.IsBound(edge))
// unbind(edge, _edgeTag.Find(edge), true);
}
// TODO: add optional point constraints using f.Add(gp_Pnt(x, y, z);
f.Build();
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.geuz.onelab"
android:versionName="2.0.0"
android:versionCode="31"
android:versionCode="32"
android:installLocation="auto" >
<uses-sdk android:minSdkVersion="14"
......
## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Sat Jun 03 17:49:42 CEST 2017
ndk.dir=/Users/geuzaine/Library/Android/sdk/ndk-bundle
sdk.dir=/Users/geuzaine/Library/Android/sdk
......@@ -202,20 +202,18 @@ if(ENABLE_BUILD_ANDROID)
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/models/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Android/ ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/res/raw
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/libs/armeabi-v7a/
COMMAND ${CMAKE_COMMAND} -E copy ${GMSH_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/libs/armeabi-v7a/
COMMAND ${CMAKE_COMMAND} -E copy ${GETDP_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/libs/armeabi-v7a/
COMMAND ${CMAKE_COMMAND} -E copy ${ONELAB_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/libs/armeabi-v7a/
COMMAND ${CMAKE_COMMAND} -E copy ${PETSC_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/libs/armeabi-v7a/
COMMAND ${CMAKE_COMMAND} -E copy ${SLEPC_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/libs/armeabi-v7a/
COMMAND ${CMAKE_COMMAND} -E copy ${LAPACK_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/libs/armeabi-v7a/
COMMAND ${CMAKE_COMMAND} -E copy ${BLAS_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/libs/armeabi-v7a/
COMMAND ${CMAKE_COMMAND} -E copy ${GMSH_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/app/src/main/jniLibs/armeabi-v7a/
COMMAND ${CMAKE_COMMAND} -E copy ${GETDP_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/app/src/main/jniLibs/armeabi-v7a/
COMMAND ${CMAKE_COMMAND} -E copy ${ONELAB_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/app/src/main/jniLibs/armeabi-v7a/
COMMAND ${CMAKE_COMMAND} -E copy ${PETSC_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/app/src/main/jniLibs/armeabi-v7a/
COMMAND ${CMAKE_COMMAND} -E copy ${SLEPC_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/app/src/main/jniLibs/armeabi-v7a/
COMMAND ${CMAKE_COMMAND} -E copy ${LAPACK_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/app/src/main/jniLibs/armeabi-v7a/
COMMAND ${CMAKE_COMMAND} -E copy ${BLAS_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/app/src/main/jniLibs/armeabi-v7a/
)
add_custom_command(TARGET androidProject POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove_directory
${CMAKE_CURRENT_BINARY_DIR}/models)
add_custom_command(TARGET androidProject POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove
${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/res/raw/models.zip)
${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/app/src/main/res/raw/models.zip)
foreach(DIR ${BENCHMARKS})
get_filename_component(DIRNAME ${DIR} NAME)
add_custom_command(TARGET androidProject POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory
......@@ -231,11 +229,10 @@ if(ENABLE_BUILD_ANDROID)
endforeach(DIR)
find_program(ZIP_COMMAND zip)
add_custom_command(TARGET androidProject POST_BUILD COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/models/ && zip -r
${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/res/raw/models.zip * --exclude=*.svn*)
${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/app/src/main/res/raw/models.zip * --exclude=*.svn*)
message(STATUS "")
message(STATUS "ONELAB for Android successfully configured:")
message(STATUS " * Run 'make androidProject' to create the project")
message(STATUS " * Then update android project with 'android update project --name ${APPNAME} --path ${APPNAME} --target [id] --subprojects'")
message(STATUS " * Finally build the app with ant 'ant debug'")
message(STATUS " * Finally build the app with gradle 'gradle assembleRelease'")
message(STATUS "")
endif(ENABLE_BUILD_ANDROID)
#/usr/bin/env bash
appname=Onelab
enable_occt=1
if [ $# -eq 1 ] ; then
appname=${1}
echo "Rebranding Onelab app as ${appname}"
enable_occt=0
enable_occ=1
enable_simulator=0
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
-n|--name)
appname=$2
enable_occ=0
echo "Rebranding Onelab app as ${appname}"
shift # past argument
;;
-s|--simulator)
enable_simulator=1
;;
--no-occ)
enable_occ=0
;;
*)
echo "Usage: $0 [-n|--name appname] [-s|--simulator] [--no-occ]"
exit 1
;;
esac
shift # past argument or value
done
ios=ios
iphoneos=iphoneos
iphoneos_version=iphoneos-version
if [ $enable_simulator != 0 ]; then
ios=iossimulator
iphoneos=iphonesimulator
iphoneos_version=ios-simulator-version
fi
gmsh_git="${HOME}/src/gmsh/"
getdp_git="${HOME}/src/getdp/"
frameworks_dir="${HOME}/src/gmsh/contrib/mobile/frameworks_ios/"
frameworks_dir="${HOME}/src/gmsh/contrib/mobile/frameworks_${ios}/"
if [ -f ${getdp_git}/benchmarks/cleanup.sh ]; then
cd ${getdp_git}/benchmarks && ./cleanup.sh
......@@ -25,7 +53,11 @@ gmsh_framework="$frameworks_dir/Gmsh.framework"
getdp_framework="$frameworks_dir/GetDP.framework"
occt_framework="$frameworks_dir/OCCT.framework"
cmake_default="-DDEFAULT=0 -DCMAKE_TOOLCHAIN_FILE=$gmsh_git/contrib/mobile/utils/iOS.cmake -DIOS_PLATFORM=OS -DENABLE_BUILD_IOS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=armv7;armv7s;arm64 -GXcode"
if [ $enable_simulator != 0 ]; then
cmake_default="-DDEFAULT=0 -DCMAKE_TOOLCHAIN_FILE=$gmsh_git/contrib/mobile/utils/iOS.cmake -DIOS_PLATFORM=SIMULATOR -DENABLE_BUILD_IOS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=i386;x86_64 -GXcode"
else
cmake_default="-DDEFAULT=0 -DCMAKE_TOOLCHAIN_FILE=$gmsh_git/contrib/mobile/utils/iOS.cmake -DIOS_PLATFORM=OS -DENABLE_BUILD_IOS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=armv7;armv7s;arm64 -GXcode"
fi
build_cmd="xcodebuild -target lib -configuration Release"
headers_cmd="xcodebuild -target get_headers -configuration Release"
......@@ -40,39 +72,45 @@ function check {
# build gmsh framework
cd $gmsh_git && git pull
mkdir -p $gmsh_git/build_ios
cd $gmsh_git/build_ios
cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_LIB=1 -DENABLE_MATHEX=1 -DENABLE_MESH=1 -DENABLE_ONELAB=1 -DENABLE_PARSER=1 -DENABLE_POST=1 -DENABLE_PLUGINS=1 -DENABLE_ANN=1 -DENABLE_TETGEN=1 -DENABLE_KBIPACK=1 -DENABLE_GMP=0 -DENABLE_ZIPPER=1 -DENABLE_OCC=$enable_occt -DOCC_LIBS="$occt_framework/OCCT" -DOCC_INC="$occt_framework/Headers/" ..
mkdir -p $gmsh_git/build_${ios}
cd $gmsh_git/build_${ios}
cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_LIB=1 -DENABLE_MATHEX=1 -DENABLE_MESH=1 -DENABLE_ONELAB=1 -DENABLE_PARSER=1 -DENABLE_POST=1 -DENABLE_PLUGINS=1 -DENABLE_ANN=1 -DENABLE_TETGEN=1 -DENABLE_KBIPACK=1 -DENABLE_GMP=0 -DENABLE_ZIPPER=1 -DENABLE_OCC=$enable_occ -DOCC_LIBS="$occt_framework/OCCT" -DOCC_INC="$occt_framework/Headers/" ..
check
$build_cmd OTHER_CFLAGS="-miphoneos-version-min=8.0 -fembed-bitcode" OTHER_CPLUSPLUSFLAGS="-miphoneos-version-min=8.0 -fembed-bitcode -std=c++11"
$build_cmd OTHER_CFLAGS="-m${iphoneos_version}-min=8.0 -fembed-bitcode" OTHER_CPLUSPLUSFLAGS="-m${iphoneos_version}-min=8.0 -fembed-bitcode -std=c++11"
check
$headers_cmd
mkdir -p $gmsh_framework/Headers
cp $gmsh_git/build_ios/Release-iphoneos/libGmsh.a $gmsh_framework/Gmsh
cp $gmsh_git/build_${ios}/Release-${iphoneos}/libGmsh.a $gmsh_framework/Gmsh
cd $gmsh_framework/Headers
cp $gmsh_git/build_ios/Headers/gmsh/* .
cp $gmsh_git/build_${ios}/Headers/gmsh/* .
ln -s . gmsh
# build getdp framework
cd $getdp_git && git pull
mkdir -p $getdp_git/build_ios
cd $getdp_git/build_ios
mkdir -p $getdp_git/build_${ios}
cd $getdp_git/build_${ios}
PETSC_DIR= PETSC_ARCH= SLEPC_DIR= cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_LIB=1 -DENABLE_GMSH=1 -DENABLE_KERNEL=1 -DENABLE_PETSC=1 -DPETSC_INC="$petsc_framework/Headers/" -DPETSC_LIBS="$petsc_framework/petsc" -DENABLE_SLEPC=1 -DSLEPC_INC="$slepc_framework/Headers/" -DSLEPC_LIB="$slepc_framework/slepc" -DGMSH_INC="$gmsh_framework/Headers/" -DGMSH_LIB="$gmsh_framework/Gmsh" ..
check
$build_cmd OTHER_CFLAGS="-miphoneos-version-min=8.0 -fembed-bitcode" OTHER_CPLUSPLUSFLAGS="-miphoneos-version-min=8.0 -fembed-bitcode"
$build_cmd OTHER_CFLAGS="-m${iphoneos_version}-min=8.0 -fembed-bitcode" OTHER_CPLUSPLUSFLAGS="-m${iphoneos_version}-min=8.0 -fembed-bitcode"
check
$headers_cmd
mkdir -p $getdp_framework/Headers
cp $getdp_git/build_ios/Release-iphoneos/libGetDP.a $getdp_framework/GetDP
cp $getdp_git/build_${ios}/Release-${iphoneos}/libGetDP.a $getdp_framework/GetDP
cd $getdp_framework/Headers
cp $getdp_git/build_ios/Headers/getdp/* .
cp $getdp_git/build_${ios}/Headers/getdp/* .
# create xcode project
mkdir $gmsh_git/contrib/mobile/build_ios_${appname}
cd $gmsh_git/contrib/mobile/build_ios_${appname}
mkdir $gmsh_git/contrib/mobile/build_${ios}_${appname}
cd $gmsh_git/contrib/mobile/build_${ios}_${appname}
cmake -DCMAKE_INCLUDE_PATH="$frameworks_dir;$getdp_git" -DAPPNAME:STRING=${appname} ..
make xcodeProject
if [ $enable_simulator != 0 ]; then
# change blas/lapack for simulator
sed -e "s|lastKnownFileType = archive.ar; name = libf2cblas.a; path = Onelab/frameworks/petsc.framework/libf2cblas.a;|lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework;|" -i "" $gmsh_git/contrib/mobile/build_iossimulator_${appname}/${appname}/${appname}.xcodeproj/project.pbxproj;
sed -e "s|lastKnownFileType = archive.ar; name = libf2clapack.a; path = Onelab/frameworks/petsc.framework/libf2clapack.a;|lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework;|" -i "" $gmsh_git/contrib/mobile/build_iossimulator_${appname}/${appname}/${appname}.xcodeproj/project.pbxproj;
fi
#TODO
#xcodebuild -project "Onelab" -target "Onelab" -configuration Release
#xcrun -sdk iphoneos PackageApplication -v "Onelab.app" -o "Onelab.ipa" --sign "iPhone Distribution: Your Signature\" --embed enterprise.mobileprovision
#/usr/bin/env bash
appname=Onelab
enable_occt=1
if [ $# -eq 1 ] ; then
appname=${1}
echo "Rebranding Onelab app as ${appname}"
enable_occt=0
fi
gmsh_git="${HOME}/src/gmsh/"
getdp_git="${HOME}/src/getdp/"
frameworks_dir="${HOME}/src/gmsh/contrib/mobile/frameworks_iossimulator/"
if [ -f ${getdp_git}/benchmarks/cleanup.sh ]; then
cd ${getdp_git}/benchmarks && ./cleanup.sh
fi
if [ -f ${getdp_git}/benchmarks_private/cleanup.sh ]; then
cd ${getdp_git}/benchmarks_private && ./cleanup.sh
fi
petsc_framework="$frameworks_dir/petsc.framework"
slepc_framework="$frameworks_dir/slepc.framework"
gmsh_framework="$frameworks_dir/Gmsh.framework"
getdp_framework="$frameworks_dir/GetDP.framework"
occt_framework="$frameworks_dir/OCCT.framework"
cmake_default="-DDEFAULT=0 -DCMAKE_TOOLCHAIN_FILE=$gmsh_git/contrib/mobile/utils/iOS.cmake -DIOS_PLATFORM=SIMULATOR -DENABLE_BUILD_IOS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=i386;x86_64 -GXcode"
build_cmd="xcodebuild -target lib -configuration Release"
headers_cmd="xcodebuild -target get_headers -configuration Release"
function check {
return_code=$?
if [ $return_code != 0 ]; then
echo "last command failed (return $return_code)"
exit $return_code
fi
}
# build gmsh framework
cd $gmsh_git && git pull
mkdir -p $gmsh_git/build_iossimulator
cd $gmsh_git/build_iossimulator
cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_LIB=1 -DENABLE_MATHEX=1 -DENABLE_MESH=1 -DENABLE_ONELAB=1 -DENABLE_PARSER=1 -DENABLE_POST=1 -DENABLE_PLUGINS=1 -DENABLE_ANN=1 -DENABLE_TETGEN=1 -DENABLE_KBIPACK=1 -DENABLE_GMP=0 -DENABLE_ZIPPER=1 -DENABLE_OCC=$enable_occt -DOCC_LIBS="$occt_framework/OCCT" -DOCC_INC="$occt_framework/Headers/" ..
check
$build_cmd OTHER_CFLAGS="-mios-simulator-version-min=8.0" OTHER_CPLUSPLUSFLAGS="-mios-simulator-version-min=8.0 -std=c++11"
check
$headers_cmd
mkdir -p $gmsh_framework/Headers
cp $gmsh_git/build_iossimulator/Release-iphonesimulator/libGmsh.a $gmsh_framework/Gmsh
cd $gmsh_framework/Headers
cp $gmsh_git/build_iossimulator/Headers/gmsh/* .
ln -s . gmsh
# build getdp framework
cd $getdp_git && git pull
mkdir -p $getdp_git/build_iossimulator
cd $getdp_git/build_iossimulator
PETSC_DIR= PETSC_ARCH= SLEPC_DIR= cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_LIB=1 -DENABLE_GMSH=1 -DENABLE_KERNEL=1 -DENABLE_PETSC=1 -DPETSC_INC="$petsc_framework/Headers/" -DPETSC_LIBS="$petsc_framework/petsc" -DENABLE_SLEPC=1 -DSLEPC_INC="$slepc_framework/Headers/" -DSLEPC_LIB="$slepc_framework/slepc" -DGMSH_INC="$gmsh_framework/Headers/" -DGMSH_LIB="$gmsh_framework/Gmsh" ..
check
$build_cmd OTHER_CFLAGS="-mios-simulator-version-min=8.0" OTHER_CPLUSPLUSFLAGS="-mios-simulator-version-min=8.0"
check
$headers_cmd
mkdir -p $getdp_framework/Headers
cp $getdp_git/build_iossimulator/Release-iphonesimulator/libGetDP.a $getdp_framework/GetDP
cd $getdp_framework/Headers
cp $getdp_git/build_iossimulator/Headers/getdp/* .
# create xcode project
mkdir $gmsh_git/contrib/mobile/build_iossimulator_${appname}
cd $gmsh_git/contrib/mobile/build_iossimulator_${appname}
cmake -DCMAKE_INCLUDE_PATH="$frameworks_dir;$getdp_git" -DAPPNAME:STRING=${appname} ..
make xcodeProject
# change blas/lapack for simulator
sed -e "s|lastKnownFileType = archive.ar; name = libf2cblas.a; path = Onelab/frameworks/petsc.framework/libf2cblas.a;|lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework;|" -i "" $gmsh_git/contrib/mobile/build_iossimulator_${appname}/${appname}/${appname}.xcodeproj/project.pbxproj
sed -e "s|lastKnownFileType = archive.ar; name = libf2clapack.a; path = Onelab/frameworks/petsc.framework/libf2clapack.a;|lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework;|" -i "" $gmsh_git/contrib/mobile/build_iossimulator_${appname}/${appname}/${appname}.xcodeproj/project.pbxproj
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment