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")
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()
DEFINE_STANDARD_ALLOC
- //! A tool to manage threads
- //!
//! Sets signal and exception handlers.
- //! <b>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
//!
//! If @a theFloatingSignal is TRUE then floating point exceptions will be
//! generated in accordance with the mask
- //! <tt>_EM_INVALID | _EM_DENORMAL | _EM_ZERODIVIDE | _EM_OVERFLOW<\tt> that is
+ //! <tt>_EM_INVALID | _EM_DENORMAL | _EM_ZERODIVIDE | _EM_OVERFLOW</tt> 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.
//!
- //! <b>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
//! When compiled with OBJS macro defined, already set signal handlers (e.g.
//! by Data Base Managers) are not redefined.
//!
- //! <b>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
//! ::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.