From: eap Date: Fri, 12 Dec 2014 18:18:15 +0000 (+0300) Subject: To build NETGEN-5 X-Git-Tag: V7_6_0a1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a219ef71b86e96cad95e1b18401ea0e71fd68ddc;p=plugins%2Fnetgenplugin.git To build NETGEN-5 --- diff --git a/adm_local/cmake_files/FindNetgen.cmake b/adm_local/cmake_files/FindNetgen.cmake index e04799d..bf05a80 100644 --- a/adm_local/cmake_files/FindNetgen.cmake +++ b/adm_local/cmake_files/FindNetgen.cmake @@ -79,12 +79,33 @@ ENDIF(WIN32) INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETGEN REQUIRED_VARS NETGEN_INCLUDE_DIRS NETGEN_LIBRARIES) +INCLUDE(CheckCXXSourceCompiles) + IF(NETGEN_FOUND) + + SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES} ${NETGEN_INCLUDE_DIRS}") + SET(CMAKE_REQUIRED_LIBRARIES "${NETGEN_LIBRARIES}") + CHECK_CXX_SOURCE_COMPILES(" + #include + + int main() + { + netgen::Mesh* ngMesh; + ngMesh->CalcLocalH(1.0); + } +" NETGEN_V5 + ) + IF(NOT Netgen_FIND_QUIETLY) MESSAGE(STATUS "Netgen library: ${NETGEN_LIBRARIES}") ENDIF() SET(NETGEN_DEFINITIONS "-DOCCGEOMETRY") + IF(NETGEN_V5) + MESSAGE(STATUS "NETGEN V5 or later found") + SET(NETGEN_DEFINITIONS "${NETGEN_DEFINITIONS} -DNETGEN_V5") + ENDIF(NETGEN_V5) + #RNV: currently on windows use netgen without thread support. #TODO: check support of the multithreading on windows IF(WIN32) diff --git a/src/NETGENPlugin/CMakeLists.txt b/src/NETGENPlugin/CMakeLists.txt index 1911300..ec0654d 100644 --- a/src/NETGENPlugin/CMakeLists.txt +++ b/src/NETGENPlugin/CMakeLists.txt @@ -37,6 +37,7 @@ ADD_DEFINITIONS( ${OMNIORB_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} + ${NETGEN_DEFINITIONS} ) # libraries to link to