diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake index fb70c15e1a..acadf4a557 100644 --- a/adm/cmake/occt_defs_flags.cmake +++ b/adm/cmake/occt_defs_flags.cmake @@ -5,6 +5,12 @@ if(FLAGS_ALREADY_INCLUDED) endif() set(FLAGS_ALREADY_INCLUDED 1) +# force option -fp:precise for Visual Studio projects. +# +# Note that while this option is default for MSVC compiler, Visual Studio +# project can be switched later to use Intel Compiler (ICC). +# Enforcing -fp:precise ensures that in such case ICC will use correct +# option instead of its default -fp:fast which is harmful for OCCT. if (MSVC) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fp:precise") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp:precise") @@ -31,7 +37,7 @@ endif() string (REGEX MATCH "EHsc" ISFLAG "${CMAKE_CXX_FLAGS}") if (ISFLAG) string (REGEX REPLACE "EHsc" "EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") -elseif (WIN32) +elseif (MSVC) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -EHa") endif() diff --git a/src/OSD/OSD.hxx b/src/OSD/OSD.hxx index 024633b010..f3a1cd2e59 100644 --- a/src/OSD/OSD.hxx +++ b/src/OSD/OSD.hxx @@ -53,10 +53,10 @@ public: DEFINE_STANDARD_ALLOC - //! A tool to manage threads - //! //! Sets signal and exception handlers. - //! Windows-specific notes<\b> + //! + //! ### Windows-specific notes + //! //! Compiled with MS VC++ sets 3 main handlers: //! @li Signal handlers (via ::signal() functions) that translate system signals //! (SIGSEGV, SIGFPE, SIGILL) into C++ exceptions (classes inheriting @@ -75,12 +75,13 @@ public: //! //! If @a theFloatingSignal is TRUE then floating point exceptions will be //! generated in accordance with the mask - //! _EM_INVALID | _EM_DENORMAL | _EM_ZERODIVIDE | _EM_OVERFLOW<\tt> that is + //! _EM_INVALID | _EM_DENORMAL | _EM_ZERODIVIDE | _EM_OVERFLOW that is //! used to call ::_controlfp() system function. If @a theFloatingSignal is FALSE //! corresponding operations (e.g. division by zero) will gracefully complete //! without an exception. //! - //! Unix-specific notes<\b> + //! ### Unix-specific notes + //! //! OSD::SetSignal() sets handlers (via ::sigaction()) for multiple signals //! (SIGFPE, SIGSEGV, etc). Currently the number of handled signals is much //! greater than for Windows, in the future this may change to provide better @@ -92,7 +93,8 @@ public: //! When compiled with OBJS macro defined, already set signal handlers (e.g. //! by Data Base Managers) are not redefined. //! - //! Common notes<\b> + //! ### Common notes + //! //! If OSD::SetSignal() method is used in at least one thread, it must also be //! called in any other thread where Open CASCADE will be used, to ensure //! consistency of behavior. Its @a aFloatingSignal argument must be consistent @@ -102,6 +104,7 @@ public: //! ::throw() will be called) is regulated by the NO_CXX_EXCEPTIONS and //! OCC_CONVERT_SIGNALS macros used during compilation of Open CASCADE and //! user's code. Refer to Foundation Classes User's Guide for further details. + //! Standard_EXPORT static void SetSignal (const Standard_Boolean theFloatingSignal = Standard_True); //! Commands the process to sleep for a number of seconds.