# !! Please read the generic detection procedure in SalomeMacros.cmake !!
#
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Telemac TELEMAC_ROOT_DIR 0)
-MARK_AS_ADVANCED(TELEMAC_LIBRARY_api_telemac2d
+MARK_AS_ADVANCED(TELEMAC_LIBRARY_api
TELEMAC_LIBRARY_bief
TELEMAC_LIBRARY_damocles
TELEMAC_LIBRARY_parallel
# You should have received a copy of the GNU General Public License
# along with SALOME HYDRO module. If not, see <http://www.gnu.org/licenses/>.
-FIND_LIBRARY(TELEMAC_LIBRARY_api_telemac2d api_telemac2d
- PATHS ${TELEMAC_ROOT_DIR}/wrap_api/lib)
+FIND_LIBRARY(TELEMAC_LIBRARY_api api
+ PATHS ${TELEMAC_ROOT_DIR}/builds/salome/wrap_api/lib)
FIND_LIBRARY(TELEMAC_LIBRARY_bief bief
- PATHS ${TELEMAC_ROOT_DIR}/wrap_api/lib)
+ PATHS ${TELEMAC_ROOT_DIR}/builds/salome/wrap_api/lib)
FIND_LIBRARY(TELEMAC_LIBRARY_damocles damocles
- PATHS ${TELEMAC_ROOT_DIR}/wrap_api/lib)
+ PATHS ${TELEMAC_ROOT_DIR}/builds/salome/wrap_api/lib)
FIND_LIBRARY(TELEMAC_LIBRARY_parallel parallel
- PATHS ${TELEMAC_ROOT_DIR}/wrap_api/lib)
+ PATHS ${TELEMAC_ROOT_DIR}/builds/salome/wrap_api/lib)
FIND_LIBRARY(TELEMAC_LIBRARY_sisyphe sisyphe
- PATHS ${TELEMAC_ROOT_DIR}/wrap_api/lib)
+ PATHS ${TELEMAC_ROOT_DIR}/builds/salome/wrap_api/lib)
FIND_LIBRARY(TELEMAC_LIBRARY_special special
- PATHS ${TELEMAC_ROOT_DIR}/wrap_api/lib)
+ PATHS ${TELEMAC_ROOT_DIR}/builds/salome/wrap_api/lib)
FIND_LIBRARY(TELEMAC_LIBRARY_telemac2d telemac2d
- PATHS ${TELEMAC_ROOT_DIR}/wrap_api/lib)
+ PATHS ${TELEMAC_ROOT_DIR}/builds/salome/wrap_api/lib)
FIND_LIBRARY(TELEMAC_LIBRARY_tomawac tomawac
- PATHS ${TELEMAC_ROOT_DIR}/wrap_api/lib)
+ PATHS ${TELEMAC_ROOT_DIR}/builds/salome/wrap_api/lib)
# FIND_LIBRARY(TELEMAC_LIBRARY_gretel gretel
-# PATHS ${TELEMAC_ROOT_DIR}/wrap_api/lib)
+# PATHS ${TELEMAC_ROOT_DIR}/salome/wrap_api/lib)
# FIND_LIBRARY(TELEMAC_LIBRARY_partel partel
-# PATHS ${TELEMAC_ROOT_DIR}/wrap_api/lib)
+# PATHS ${TELEMAC_ROOT_DIR}/salome/wrap_api/lib)
FIND_LIBRARY(TELEMAC_LIBRARY_hermes hermes
- PATHS ${TELEMAC_ROOT_DIR}/wrap_api/lib)
+ PATHS ${TELEMAC_ROOT_DIR}/builds/salome/wrap_api/lib)
IF(NOT EXISTS ${TELEMAC_LIBRARY_hermes})
MESSAGE("Warning: ${TELEMAC_LIBRARY_hermes} does not exist")
SET(TELEMAC_LIBRARY_hermes "")
ENDIF()
FIND_PATH(TELEMAC_INCLUDE_DIR interface_telemac2d.mod
- PATHS ${TELEMAC_ROOT_DIR}/wrap_api/include)
-FIND_PATH(TELEMAC_API_SRC_DIR api_interface_t2d.f90
- PATHS ${TELEMAC_ROOT_DIR}/wrap_api/src)
+ PATHS ${TELEMAC_ROOT_DIR}/builds/salome/wrap_api/include)
+FIND_PATH(TELEMAC_API_SRC_DIR api_interface.f90
+ PATHS ${TELEMAC_ROOT_DIR}/builds/salome/wrap_api/src)
# The order of the libraries is important for the API wrapper compilation
-SET(TELEMAC_LIBRARIES ${TELEMAC_LIBRARY_api_telemac2d}
+SET(TELEMAC_LIBRARIES ${TELEMAC_LIBRARY_api}
${TELEMAC_LIBRARY_gretel}
${TELEMAC_LIBRARY_partel}
${TELEMAC_LIBRARY_telemac2d}
# Handle the standard arguments of the find_package() command:
INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Telemac REQUIRED_VARS TELEMAC_LIBRARY_api_telemac2d
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Telemac REQUIRED_VARS TELEMAC_LIBRARY_api
TELEMAC_LIBRARY_bief
TELEMAC_LIBRARY_damocles
TELEMAC_LIBRARY_parallel
nom = "PYTEL", op = None,
fr = u"Définition d'un cas pour le lanceur Pytel",
ang = u"Definition of a case for the Pytel launcher",
- CODE = SIMP(statut = "o", typ = "TXM", into = codelist, defaut = "telemac2d",
+ CODE = SIMP(statut = "o", typ = "TXM", into = codelist, defaut = "telemac2d",
fr = u"Code à exécuter",
ang = u"Code to run"),
FICHIER_CAS = SIMP(statut = "o", typ = 'Fichier',
fr = u"Fichier de description du cas",
ang = u"Case description file"),
- REPERTOIRE_TRAVAIL = SIMP(statut = "f", typ = 'Repertoire',
+ REPERTOIRE_TRAVAIL = SIMP(statut = "f", typ = 'Repertoire',
fr = u"Répertoire de travail",
ang = u"Working directory"),
- ENTREE_MED = FACT(statut = 'f', max = 1,
- FICHIER_MED = SIMP(statut = "o",
- typ = ('Fichier', 'Fichiers MED (*.med)',),
- fr = u"Fichier de maillage d'entrée au format MED",
- ang = u"Input mesh file in MED format"),
- FICHIER_BCD = SIMP(statut = "o",
- typ = ('Fichier', 'Fichiers BCD (*.bcd)',),
- fr = u"Fichier de définition des conditions limites au format BCD",
- ang = u"Boundary conditions definition file in BCD format"),
- ),
- SORTIE_MED = SIMP(statut = "f",
- typ = ('Fichier', 'Fichiers MED (*.med)', "Sauvegarde"),
- fr = u"Fichier de sortie au format MED",
- ang = u"Output file in MED format"),
)
# along with SALOME HYDRO module. If not, see <http://www.gnu.org/licenses/>.
ADD_SUBDIRECTORY(eficas)
-
-# --- Python files ---
-
-SET(PYFILES
- __init__.py
- polygon.py
-)
-
-SET(INSTALL_DIR ${SALOME_INSTALL_PYTHON}/salome/hydro/telemac2d)
-
-# --- rules ---
-
-SALOME_INSTALL_SCRIPTS("${PYFILES}" ${INSTALL_DIR})
-
-# This macro is used to transform the list of libraries against which the
-# module is linked into a list of linker flags (-L and -l). If we just use the
-# list of libraries in the linker command, the full path of the libraries is
-# registered in the module dependencies, so it doesn't work when the installation
-# is moved.
-MACRO(LIB_LIST_TO_LINKER_FLAGS LINKER_FLAGS_VAR LIB_LIST)
- SET(${LINKER_FLAGS_VAR})
- FOREACH(LIB ${LIB_LIST})
- GET_FILENAME_COMPONENT(DIRNAME ${LIB} PATH)
- # Get the library filename without the shortest extension. We can't use
- # command GET_FILENAME_COMPONENT with option NAME_WE because it returns
- # the filename without the longest extension. For example, we need to get
- # "libpython2.7" from "libpython2.7.so" and not "libpython2".
- GET_FILENAME_COMPONENT(LIBFILENAME ${LIB} NAME)
- STRING(FIND ${LIBFILENAME} "." DOTPOS REVERSE)
- STRING(SUBSTRING ${LIBFILENAME} 0 ${DOTPOS} FILENAME_WO_EXT)
- STRING(SUBSTRING ${FILENAME_WO_EXT} 3 -1 LIBNAME)
- LIST(APPEND ${LINKER_FLAGS_VAR} "-L${DIRNAME}" "-l${LIBNAME}")
- ENDFOREACH(LIB ${LIB_LIST})
-ENDMACRO(LIB_LIST_TO_LINKER_FLAGS)
-
-LIB_LIST_TO_LINKER_FLAGS(LINKER_FLAGS "${TELEMAC_LIBRARIES};${HDF5_hdf5_LIBRARY};${MEDFILE_LIBRARIES};${PYTHON_LIBRARY}")
-
-# Python wrapping for Telemac2D created with f2py
-SET(T2D_WRAP_API_LIB _apit2d.so)
-SET(T2D_WRAP_API_PYF_FILE apit2d.pyf)
-SET(T2D_WRAP_API_SRC_FILES ${TELEMAC_API_SRC_DIR}/api_handle_var_t2d.f90
- ${TELEMAC_API_SRC_DIR}/api_interface_t2d.f90
- ${TELEMAC_API_SRC_DIR}/api_handle_error_t2d.f90)
-
-# This sed string is used to add necessary definitions to the pyf file
-SET(SEDSTRING "s:python module _apit2d ! in:python module _apit2d ! in\\nusercode '''const int nb_var_t2d=100\\;\\n''':")
-
-ADD_CUSTOM_COMMAND(OUTPUT ${T2D_WRAP_API_LIB}
- COMMAND f2py -c ${T2D_WRAP_API_PYF_FILE} -I${TELEMAC_INCLUDE_DIR} ${LINKER_FLAGS}
- MAIN_DEPENDENCY ${T2D_WRAP_API_PYF_FILE}
- )
-
-ADD_CUSTOM_COMMAND(OUTPUT ${T2D_WRAP_API_PYF_FILE}
- COMMAND f2py -h ${T2D_WRAP_API_PYF_FILE} -m _apit2d ${T2D_WRAP_API_SRC_FILES}
- skip: get_boolean_t2d_d get_double_t2d_d get_integer_t2d_d get_string_t2d_d get_var_size_t2d_d
- set_boolean_t2d_d set_double_t2d_d set_integer_t2d_d set_string_t2d_d :
- COMMAND sed -i -e \"${SEDSTRING}\" ${T2D_WRAP_API_PYF_FILE}
- MAIN_DEPENDENCY ${T2D_WRAP_API_SRC_FILES}
- )
-
-ADD_CUSTOM_TARGET(BUILD_T2D_WRAP_API_LIB ALL DEPENDS ${T2D_WRAP_API_LIB})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${T2D_WRAP_API_LIB} DESTINATION ${INSTALL_DIR})
(fd, self.user_fortran_lib_path) = tempfile.mkstemp(prefix = root + "_", suffix = ".so")
os.close(fd)
python_version = "%d.%d" % (sys.version_info[0], sys.version_info[1])
- t2d_ld_flags = "-L${TELEMAC_DIR}/wrap_api/lib -lapi_telemac2d -ltelemac2d -lsisyphe -ltomawac "
+ t2d_ld_flags = "-L${TELEMAC_DIR}/builds/salome/wrap_api/lib -lapi -ltelemac2d -lsisyphe -ltomawac "
#t2d_ld_flags += "-lbief -lparallel -lpartel -lgretel -lhermes -ldamocles -lspecial "
t2d_ld_flags += "-lbief -lparallel -lhermes -ldamocles -lspecial "
t2d_ld_flags += "-L${MED3HOME}/lib -L${HDF5HOME}/lib -lhdf5 -lmed"