Commit ac2e142e authored by Christophe Geuzaine's avatar Christophe Geuzaine

better model find

parent 1bc94bb5
Pipeline #1645 passed with stage
in 63 minutes and 31 seconds
......@@ -15,14 +15,7 @@ else(APPNAME)
endif(APPNAME)
# find all benchmarks who provide infos.xml
if("${APPNAME}" STREQUAL "BBEMG")
find_path(BENCHMARKSDIR benchmarks_private/ HINTS ../../../getdp/)
file(GLOB BENCHMARKSDIR ${BENCHMARKSDIR}/benchmarks_private/bbemg*)
else("${APPNAME}" STREQUAL "BBEMG")
find_path(BENCHMARKSDIR models/ HINTS ../../../onelab_doc/)
file(GLOB BENCHMARKSDIR ${BENCHMARKSDIR}/models/*)
endif("${APPNAME}" STREQUAL "BBEMG")
file(GLOB BENCHMARKSDIR ${MODELS_DIR}/*)
foreach(SUBDIR ${BENCHMARKSDIR})
if(IS_DIRECTORY ${SUBDIR})
file(GLOB INFOSFILE ${SUBDIR}/infos.xml)
......@@ -205,10 +198,13 @@ if(ENABLE_BUILD_ANDROID)
)
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 make_directory
${CMAKE_CURRENT_BINARY_DIR}/models)
add_custom_command(TARGET androidProject POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove
${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
${DIR} ${CMAKE_CURRENT_BINARY_DIR}/models/${DIRNAME})
endforeach(DIR)
......
......@@ -36,13 +36,6 @@ gmsh_git="${HOME}/src/gmsh"
getdp_git="${HOME}/src/getdp"
frameworks_dir="${HOME}/src/gmsh/contrib/mobile/frameworks_${android}"
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_lib="$frameworks_dir/petsc"
slepc_lib="$frameworks_dir/slepc"
occ_lib="$frameworks_dir/occt/lib"
......@@ -50,6 +43,15 @@ occ_inc="$frameworks_dir/occt/inc"
android_ndk="${HOME}/Library/Android/sdk/ndk-bundle/"
android_sdk="${HOME}/Library/Android/sdk/"
if [ "$appname" != "Onelab" ] ; then
models_dir="${HOME}/src/getdp/benchmarks_private"
else
models_dir="${HOME}/src/onelab_doc/models"
fi
if [ -f ${models_dir}/cleanup.sh ]; then
cd ${models_dir} && ./cleanup.sh
fi
if [ $enable_simulator != 0 ]; then
cmake_default="-DDEFAULT=0 -DENABLE_PRIVATE_API=1 -DCMAKE_TOOLCHAIN_FILE=${android_ndk}/build/cmake/android.toolchain.cmake -DANDROID_STL_FORCE_FEATURES=1 -DENABLE_BUILD_ANDROID=1 -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI=x86_64"
else
......@@ -101,11 +103,10 @@ fi
cd $gmsh_git/contrib/mobile/build_${android}_${appname}
cmake $cmake_default -DAPPNAME:STRING=${appname} \
-DCMAKE_INCLUDE_PATH="$getdp_git/" \
-DMODELS_DIR="$models_dir" \
-DBLAS_LIB="$petsc_lib/libf2cblas.so" -DLAPACK_LIB="$petsc_lib/libf2clapack.so" \
-DPETSC_LIB="$petsc_lib/libpetsc.so" -DSLEPC_LIB="$slepc_lib/libslepc.so" \
-DGMSH_INC="$gmsh_git/build_${android}/Headers" -DGMSH_LIB="$gmsh_git/build_${android}/libs/libgmsh.so" \
-DBENCHMARKSDIR="$getdp_git/" \
-DGETDP_INC="$getdp_git/build_${android}/Headers" -DGETDP_LIB="$getdp_git/build_${android}/libs/libgetdp.so" ..
check
make androidOnelab -j$cmake_thread
......
......@@ -39,20 +39,21 @@ fi
gmsh_git="${HOME}/src/gmsh/"
getdp_git="${HOME}/src/getdp/"
frameworks_dir="${HOME}/src/gmsh/contrib/mobile/frameworks_${ios}/"
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"
if [ "$appname" != "Onelab" ] ; then
models_dir="${HOME}/src/getdp/benchmarks_private"
else
models_dir="${HOME}/src/onelab_doc/models"
fi
if [ -f ${models_dir}/cleanup.sh ]; then
cd ${models_dir} && ./cleanup.sh
fi
if [ $enable_simulator != 0 ]; then
cmake_default="-DDEFAULT=0 -DENABLE_PRIVATE_API=1 -DCMAKE_TOOLCHAIN_FILE=$gmsh_git/contrib/mobile/utils/iOS.cmake -DIOS_PLATFORM=SIMULATOR -DENABLE_BUILD_IOS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=x86_64 -GXcode"
else
......@@ -102,7 +103,7 @@ cp $getdp_git/build_${ios}/Headers/*.h $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}
cmake -DCMAKE_INCLUDE_PATH="$frameworks_dir;$getdp_git" -DAPPNAME:STRING=${appname} ..
cmake -DMODELS_DIR="$models_dir" -DCMAKE_INCLUDE_PATH="$frameworks_dir" -DAPPNAME:STRING=${appname} ..
make xcodeProject
if [ $enable_simulator != 0 ]; then
......
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