Compare commits

...

3 Commits

2 changed files with 16 additions and 8 deletions

View File

@ -25,11 +25,11 @@ SET(NETGEN_INCLUDES ${NETGEN_INCLUDES} -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
SET(NETGEN_LIBS) SET(NETGEN_LIBS)
FIND_LIBRARY(NETGEN_LIB_csg csg PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX) 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_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_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_mesh mesh PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
FIND_LIBRARY(NETGEN_LIB_occ occ 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) 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 FOREACH(LIBNAME
${NETGEN_LIB_csg} ${NETGEN_LIB_csg}
# ${NETGEN_LIB_gen} ${NETGEN_LIB_gen}
${NETGEN_LIB_geom2d} ${NETGEN_LIB_geom2d}
# ${NETGEN_LIB_gprim} ${NETGEN_LIB_gprim}
${NETGEN_LIB_interface} ${NETGEN_LIB_interface}
# ${NETGEN_LIB_la} ${NETGEN_LIB_la}
${NETGEN_LIB_mesh} ${NETGEN_LIB_mesh}
${NETGEN_LIB_occ} ${NETGEN_LIB_occ}
${NETGEN_LIB_stl} ${NETGEN_LIB_stl}
@ -70,11 +70,16 @@ FILE(WRITE ${tmp_check_netgen}
"return 0; \n" "return 0; \n"
"} \n" "} \n"
) )
IF(WINDOWS)
STRING(REPLACE "\\" "/" CAS_CPPFLAGS_TMP ${CAS_CPPFLAGS})
STRING(REPLACE "\\" "/" NETGEN_INCLUDES_TMP ${NETGEN_INCLUDES})
ENDIF(WINDOWS)
TRY_COMPILE(NETGEN_V5 TRY_COMPILE(NETGEN_V5
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
${tmp_check_netgen} ${tmp_check_netgen}
CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=${NETGEN_LIB_nglib}" 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 OUTPUT_VARIABLE OUTPUT
) )
FILE(REMOVE ${tmp_check_netgen}) FILE(REMOVE ${tmp_check_netgen})

View File

@ -2900,11 +2900,14 @@ bool NETGENPlugin_Mesher::Evaluate(MapShapeNbElems& aResMap)
void NETGENPlugin_Mesher::RemoveTmpFiles() 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; delete netgen::testout;
netgen::testout = 0; netgen::testout = 0;
} }
#endif
SMESH_File("problemfaces").remove(); SMESH_File("problemfaces").remove();
SMESH_File("occmesh.rep").remove(); SMESH_File("occmesh.rep").remove();
} }