From 6108188c18e9ce5287570e8ad15f405c96729896 Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 24 Oct 2013 15:16:58 +0000 Subject: [PATCH] Win32 compilation. --- src/HexoticPlugin/CMakeLists.txt | 3 ++- src/HexoticPlugin/HexoticPlugin_Hexotic.cxx | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/HexoticPlugin/CMakeLists.txt b/src/HexoticPlugin/CMakeLists.txt index 021ad53..ac451f1 100644 --- a/src/HexoticPlugin/CMakeLists.txt +++ b/src/HexoticPlugin/CMakeLists.txt @@ -50,12 +50,13 @@ SET(_link_LIBRARIES ${SMESH_SMESHimpl} ${SMESH_SMESHEngine} ${SMESH_StdMeshersEngine} + ${SMESH_MeshDriverGMF} ${SMESH_SMDS} ${SMESH_SMESHDS} ${SMESH_SalomeIDLSMESH} ${SMESH_SMESHUtils} ${KERNEL_SalomeGenericObj} - ${KERNEL_SALOMELocalTrace} + ${KERNEL_SALOMELocalTrace} SalomeIDLHexoticPLUGIN ) diff --git a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx index 47248a4..c6bae59 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx +++ b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx @@ -31,6 +31,7 @@ #include #else #include +#include #endif #ifdef _DEBUG_ @@ -866,6 +867,7 @@ static TCollection_AsciiString getTmpDir() Tmp_dir = getenv("TEMP"); if( Tmp_dir== NULL ) Tmp_dir = getenv("TMP"); + } #endif if(Tmp_dir != NULL) { @@ -899,7 +901,11 @@ static TCollection_AsciiString getSuffix() aSuffix += "_"; aSuffix += Kernel_Utils::GetHostname().c_str(); aSuffix += "_"; +#ifndef WIN32 aSuffix += getpid(); +#else + aSuffix += _getpid(); +#endif return aSuffix; } @@ -1268,7 +1274,7 @@ void HexoticPlugin_Hexotic::subdivideTriangle( const gp_Pnt& p1, // If the traingles share a Vertex and no Edge the distance of the mass centers // to the Vertices is 2*D < S so the mass centers are distant of less than 2*S - double threshold = sqrt( 3 ) * theSize; + double threshold = sqrt( 3. ) * theSize; if ( (p1.Distance(p2) > threshold || p2.Distance(p3) > threshold || @@ -1752,7 +1758,7 @@ bool HexoticPlugin_Hexotic::Evaluate(SMESH_Mesh& aMesh, void HexoticPlugin_Hexotic::CancelCompute() { _compute_canceled = true; -#ifdef WNT +#ifdef WIN32 #else TCollection_AsciiString aTmpDir = getTmpDir(); TCollection_AsciiString Hexotic_In = aTmpDir + "Hexotic_In.mesh"; -- 2.39.2