Added libCCMIO
This commit is contained in:
parent
0d45ee3a16
commit
d1128a1056
8 changed files with 107 additions and 5 deletions
|
@ -116,6 +116,13 @@ if(PARMGRIDGEN_FOUND)
|
||||||
set_property(TARGET parmgridgen PROPERTY IMPORTED_LOCATION ${PARMGRIDGEN_LIBRARY})
|
set_property(TARGET parmgridgen PROPERTY IMPORTED_LOCATION ${PARMGRIDGEN_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package(CCMIO REQUIRED)
|
||||||
|
if(CCMIO_FOUND)
|
||||||
|
add_library(ccmio SHARED IMPORTED)
|
||||||
|
set_property(TARGET ccmio PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CCMIO_INCLUDE_DIRS})
|
||||||
|
set_property(TARGET ccmio PROPERTY IMPORTED_LOCATION ${CCMIO_LIBRARY})
|
||||||
|
set_property(TARGET ccmio PROPERTY INTERFACE_LINK_LIBRARIES ${CCMIO_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
|
||||||
#
|
#
|
||||||
# Recurse into the source
|
# Recurse into the source
|
||||||
|
|
|
@ -52,4 +52,4 @@ add_subdirectory(plot3dToFoam)
|
||||||
add_subdirectory(fluent3DMeshToFoam)
|
add_subdirectory(fluent3DMeshToFoam)
|
||||||
add_subdirectory(tetgenToFoam)
|
add_subdirectory(tetgenToFoam)
|
||||||
add_subdirectory(fluentMeshToFoam)
|
add_subdirectory(fluentMeshToFoam)
|
||||||
add_subdirectory(star4ToFoam)
|
add_subdirectory(star4ToFoam)
|
||||||
|
|
|
@ -30,4 +30,4 @@
|
||||||
#
|
#
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
|
|
||||||
#add_subdirectory(ccm26ToFoam)
|
add_subdirectory(ccm26ToFoam)
|
||||||
|
|
|
@ -41,6 +41,6 @@ if(NOT FOAM_FOUND)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_foam_executable(ccm26ToFoam
|
add_foam_executable(ccm26ToFoam
|
||||||
DEPENDS finiteVolume meshTools
|
DEPENDS finiteVolume meshTools ccmio
|
||||||
SOURCES ${SOURCES}
|
SOURCES ${SOURCES}
|
||||||
)
|
)
|
||||||
|
|
|
@ -34,7 +34,7 @@ add_subdirectory(foamToEnsight)
|
||||||
add_subdirectory(smapToFoam)
|
add_subdirectory(smapToFoam)
|
||||||
add_subdirectory(foamToVTK)
|
add_subdirectory(foamToVTK)
|
||||||
add_subdirectory(foamToEnsightParts)
|
add_subdirectory(foamToEnsightParts)
|
||||||
#add_subdirectory(foamToTecplot360)
|
add_subdirectory(foamToTecplot360)
|
||||||
add_subdirectory(foamToFieldview9)
|
add_subdirectory(foamToFieldview9)
|
||||||
add_subdirectory(foamDataToFluent)
|
add_subdirectory(foamDataToFluent)
|
||||||
add_subdirectory(foamToGMV)
|
add_subdirectory(foamToGMV)
|
||||||
|
|
|
@ -31,3 +31,20 @@
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
|
|
||||||
add_subdirectory(tecio)
|
add_subdirectory(tecio)
|
||||||
|
|
||||||
|
list(APPEND SOURCES
|
||||||
|
tecplotWriter.C
|
||||||
|
vtkMesh.C
|
||||||
|
foamToTecplot360.C
|
||||||
|
)
|
||||||
|
|
||||||
|
# Set minimal environment for external compilation
|
||||||
|
if(NOT FOAM_FOUND)
|
||||||
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
find_package(FOAM REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_foam_executable(foamToTecplot360
|
||||||
|
DEPENDS finiteVolume meshTools tecio
|
||||||
|
SOURCES ${SOURCES}
|
||||||
|
)
|
||||||
|
|
|
@ -51,6 +51,43 @@ list(APPEND SOURCES
|
||||||
TranslatedString.cpp
|
TranslatedString.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
add_foam_library(tecio SHARED ${SOURCES})
|
add_foam_library(tecio SHARED ${SOURCES})
|
||||||
|
|
||||||
#target_link_libraries(tecio finiteVolume)
|
|
||||||
|
target_compile_definitions(tecio PRIVATE MAKEARCHIVE USEENUM THREED ENGINE)
|
||||||
|
if(UNIX)
|
||||||
|
target_compile_definitions(tecio PRIVATE LINUX)
|
||||||
|
target_compile_options(tecio PRIVATE -U_WIN32)
|
||||||
|
if(CMAKE_${LANG}_COMPILER_ID STREQUAL "Intel")
|
||||||
|
target_compile_definitions(tecio PRIVATE LINUXI64)
|
||||||
|
else()
|
||||||
|
target_compile_definitions(tecio PRIVATE LINUX64)
|
||||||
|
target_compile_options(tecio PRIVATE -U_WIN32)
|
||||||
|
endif()
|
||||||
|
elseif(APPLE)
|
||||||
|
target_compile_definitions(tecio PRIVATE DARWIN LINUX64)
|
||||||
|
target_compile_options(tecio PRIVATE -U_WIN32)
|
||||||
|
elseif(MINGW)
|
||||||
|
target_compile_definitions(tecio PRIVATE LINUX)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# This tries to mimic
|
||||||
|
#
|
||||||
|
#if defined(linux64)
|
||||||
|
# TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUX64 -DUSEENUM -DTHREED -U_WIN32 -DENGINE
|
||||||
|
#elif defined(darwinIntel) || defined(darwinIntel64) || defined(darwinPpc) || defined(darwinPpc64)
|
||||||
|
# TECIO_FLAGS = -DMAKEARCHIVE -DDARWIN -DUSEENUM -DTHREED -U_WIN32 -DENGINE
|
||||||
|
#elif defined(linuxIA64)
|
||||||
|
# TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUXI64 -DUSEENUM -DTHREED -U_WIN32 -DENGINE
|
||||||
|
#elif defined(linux)
|
||||||
|
# TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUX64 -DUSEENUM -DTHREED -U_WIN32 -DENGINE
|
||||||
|
#elif defined(darwinIntel)
|
||||||
|
# warning "DarwinIntel architecture detected"
|
||||||
|
# TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUX64 -DUSEENUM -DTHREED -U_WIN32 -DENGINE
|
||||||
|
#elif defined(mingw)
|
||||||
|
# warning "MSWin mingw architecture detected"
|
||||||
|
# TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DUSEENUM -DTHREED -DENGINE
|
||||||
|
#else
|
||||||
|
#error "architecture not supported for compiling tecio."
|
||||||
|
#endif
|
||||||
|
|
41
cmake/FindCCMIO.cmake
Normal file
41
cmake/FindCCMIO.cmake
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
|
||||||
|
include(LibFindMacros)
|
||||||
|
|
||||||
|
# Use pkg-config to get hints about paths
|
||||||
|
libfind_pkg_check_modules(CCMIO_PKGCONF mesquite)
|
||||||
|
|
||||||
|
# Include dir
|
||||||
|
find_path(CCMIO_INCLUDE_DIR
|
||||||
|
NAMES libccmio/ccmio.h
|
||||||
|
HINTS
|
||||||
|
ThirdParty/packages/libccmio-2.6.1/platforms/linux64GccDPOpt/include
|
||||||
|
${MESQUITE_PKGCONF_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_path(CCMIO_INCLUDE_DIR2
|
||||||
|
NAMES ccmio.h
|
||||||
|
HINTS
|
||||||
|
ThirdParty/packages/libccmio-2.6.1/platforms/linux64GccDPOpt/include/libccmio
|
||||||
|
${MESQUITE_PKGCONF_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Finally the library itself
|
||||||
|
find_library(CCMIO_LIBRARY
|
||||||
|
NAMES ccmio
|
||||||
|
HINTS
|
||||||
|
ThirdParty/packages/libccmio-2.6.1/platforms/linux64GccDPOpt/lib
|
||||||
|
${CCMIO_PKGCONF_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(CCMIO_LIBRARY2
|
||||||
|
NAMES adf_ccmio
|
||||||
|
HINTS
|
||||||
|
ThirdParty/packages/libccmio-2.6.1/platforms/linux64GccDPOpt/lib
|
||||||
|
${CCMIO_PKGCONF_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Set the include dir variables and the libraries and let libfind_process do the rest.
|
||||||
|
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
|
||||||
|
set(CCMIO_PROCESS_INCLUDES CCMIO_INCLUDE_DIR CCMIO_INCLUDE_DIR2)
|
||||||
|
set(CCMIO_PROCESS_LIBS CCMIO_LIBRARY CCMIO_LIBRARY2)
|
||||||
|
libfind_process(CCMIO)
|
Reference in a new issue