From: vsr Date: Mon, 12 Aug 2013 10:51:49 +0000 (+0000) Subject: Merge from V7_2_BR 09/08/2013 X-Git-Tag: V7_3_0a1~32 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=229f703ec60fcc5c0b5e97956e540193273d80e9;p=plugins%2Fnetgenplugin.git Merge from V7_2_BR 09/08/2013 --- diff --git a/adm_local/cmake_files/FindNETGEN.cmake b/adm_local/cmake_files/FindNETGEN.cmake index 05e49a8..25a07df 100644 --- a/adm_local/cmake_files/FindNETGEN.cmake +++ b/adm_local/cmake_files/FindNETGEN.cmake @@ -25,11 +25,11 @@ SET(NETGEN_INCLUDES ${NETGEN_INCLUDES} -DNO_PARALLEL_THREADS -DOCCGEOMETRY) SET(NETGEN_LIBS) FIND_LIBRARY(NETGEN_LIB_csg csg PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX) -#FIND_LIBRARY(NETGEN_LIB_gen gen PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX) +FIND_LIBRARY(NETGEN_LIB_gen gen PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX) FIND_LIBRARY(NETGEN_LIB_geom2d geom2d PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX) -#FIND_LIBRARY(NETGEN_LIB_gprim gprim PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX) +FIND_LIBRARY(NETGEN_LIB_gprim gprim PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX) FIND_LIBRARY(NETGEN_LIB_interface interface PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX) -#FIND_LIBRARY(NETGEN_LIB_la la PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX) +FIND_LIBRARY(NETGEN_LIB_la la PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX) FIND_LIBRARY(NETGEN_LIB_mesh mesh PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX) FIND_LIBRARY(NETGEN_LIB_occ occ PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX) FIND_LIBRARY(NETGEN_LIB_stl stl PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX) @@ -37,11 +37,11 @@ FIND_LIBRARY(NETGEN_LIB_nglib nglib PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LI FOREACH(LIBNAME ${NETGEN_LIB_csg} -# ${NETGEN_LIB_gen} + ${NETGEN_LIB_gen} ${NETGEN_LIB_geom2d} -# ${NETGEN_LIB_gprim} + ${NETGEN_LIB_gprim} ${NETGEN_LIB_interface} -# ${NETGEN_LIB_la} + ${NETGEN_LIB_la} ${NETGEN_LIB_mesh} ${NETGEN_LIB_occ} ${NETGEN_LIB_stl} @@ -70,11 +70,16 @@ FILE(WRITE ${tmp_check_netgen} "return 0; \n" "} \n" ) +IF(WINDOWS) + STRING(REPLACE "\\" "/" CAS_CPPFLAGS_TMP ${CAS_CPPFLAGS}) + STRING(REPLACE "\\" "/" NETGEN_INCLUDES_TMP ${NETGEN_INCLUDES}) +ENDIF(WINDOWS) + TRY_COMPILE(NETGEN_V5 ${CMAKE_BINARY_DIR} ${tmp_check_netgen} CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=${NETGEN_LIB_nglib}" - COMPILE_DEFINITIONS ${CAS_CPPFLAGS} ${NETGEN_INCLUDES} + COMPILE_DEFINITIONS ${CAS_CPPFLAGS_TMP} ${NETGEN_INCLUDES_TMP} OUTPUT_VARIABLE OUTPUT ) FILE(REMOVE ${tmp_check_netgen}) diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index a15b44f..1abc1a3 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -3030,11 +3030,14 @@ double NETGENPlugin_Mesher::GetProgress(const SMESH_Algo* holder, void NETGENPlugin_Mesher::RemoveTmpFiles() { - if ( SMESH_File("test.out").remove() && netgen::testout) + bool rm = SMESH_File("test.out").remove() ; +#ifndef WIN32 + if (rm && netgen::testout) { delete netgen::testout; netgen::testout = 0; } +#endif SMESH_File("problemfaces").remove(); SMESH_File("occmesh.rep").remove(); }