Updated VCPKG workflow to follow the type of linking with the triplet.
Removed symbolic linker flag. As a result downgrade of performance.
The symbolic flag has high risk of instability, better to disable.
The basic implementation of VCPKG as a beta version.
By default will be disabled.
To enable needs to remove CMake cache and reconfigure with BUILD_USE_VCPKG flag to ON.
The current version do not support whole list of 3rd-party, only limited.
and VCPKG_ROOT reachable as a CMake or env variable
Add vcpkg support for FFmpeg and Jemalloc, including configuration files and patches.
Make C++ standard to be enable from cmake settings:
User will be able choosing C++ language standard by selecting cmake variable BUILD_CPP_STANDARD.
For correct working, CMAKE_CXX_STANDARD cmake built-in variable should be available.
To enable CMAKE_CXX_STANDARD, minimum CMAKE version has been updated to 3.1.
Available next standard items:
C++11
C++14
C++17
C++20
C++23
This issue consists from several steps to achive main goal:
1) Configuratiuon, CMake - allow selecting C++ standard.
2) Require minimum CMAKE version 3.1 (for enabling CMAKE_CXX_STANDARD).
3) More flexible CMAKE_CXX_COMPILER_ID identification (fixups previous commit!)
4) Add description of new CMAKE variable `BUILD_CPP_STANDARD` into documentation.
5) Update CMAKE requirements in documentation.
6) Set C++11 standard for several projects.
WNT_Window::ProcessMessage() now redirects WM_TOUCH events to AIS_ViewController,
so that it is possible to use multitouch displays in Draw Harness on Windows platform.
_WIN32_WINNT in CMake configuration for MinGW has been raised from 0x0501 to 0x0601.
CLang is now checked before MINGW within occt_defs_flags.cmake.
Added "-Wl,-s" linker flag when using CLang for stripping symbols consistently to GCC builds.
Build tools are updated to support building with Visual Studion 2019 toolset ClangCL (LLVM clang-cl):
- In CMake builds, use of unsupported option "-std=c++0x" is avoided
- Tool genconf recognizes availability of ClangCL toolset and proposes it in the list
- Tool genproj recognizes new compiler specification VCVER=vclang and generates VS 2019 projects for it
Note that vclang configuration puts binaries to folder "vc14" as it is compatible with vc14 CRT.
Code is updated to build with Clang for Windows without errors and warnings:
- In BVH classes, pure virtual destructors are replaced by empty ones, to avoid bogus compiler warning
- In .lex files, pragmas are added to disable warnings in parser code
- In OSD, signature of function _osd_wnt_set_error() is corrected to avoid warning on incorrect use of va_args (undefined behavior)
- In OSD_Host, OSD_Parallel_TBB, warnings on usage of deprecated function are disabled
- In Quantity_ColorRGBA and ViewerTest_CmdParser, incorrect use of predefined macro __FUNCTION__ assuming it was a string literal is avoided
- In Standard_Macro.hxx, code is reordered to handle Clang for Windows appropriately
- In AdvApp2Var_SysBase.hxx, inclusion of obsolete (MSVC-specific) header file is replaced by Standard_TypeDef.hxx
- In Standard_ErrorHandler.hxx, empty statements added to avoid warning on unused class fields
- In IVtkDraw and ViewerTest, interface is corrected to use actual type avoiding unnecessary type casts
Off-topic: corrections of some errors (uninitialized class fields) reported by VS Code Analysis in TKernel
Setting signal handler is enabled in OSD::SetSignal() for MinGW (works only for SEH builds of MinGW, not for SJLJ builds).
Due to absence of function _set_se_translator(), handler is set using C signal() function and thus is called asynchronously.
Macro OCC_CONVERT_SIGNALS is enabled for MinGW build to support converting signals to C++ exceptions using long jumps (the same as on Linux).
Code raising exceptions in OSD::SetSignal() is corrected to use method Jump() instead of C++ throw.
Forcing CMAKE_CXX_FLAGS_RELEASE to -O2 -DNDEBUG, if the compiler is MinGW-w64.
Switched to replacing optimization parameter instead of overwriting
CMAKE_CXX_FLAGS_RELEASE string
Linking against 3rd-party libs when configuring a static OCCT build is eliminated.
math library is not linked if build is static
also: an info message is expanded by several words describing using of only header files of 3rdparties
Removed unnecessary for static build CMake gui variables
AIS_ColorScale, AIS_Dimension - the protected method DrawText()
has been renamed to drawText() to avoid name collisions with macros.
_MSC_VER/_WIN32 misuse has been fixed in several places.
Header <malloc.h> is now included where alloca() is used.
Draw_Window - dllimport flag has been dropped from inline methods.
TKernel - mandatory dependencies Winspool.lib and Psapi.lib
are now linked explicitly (instead of msvc-specific pragma syntax).
CMake scripts - the option -std=c++0x has been replaced by -std=gnu++0x
for mingw to allow extensions (like _wfopen() and others).
The minimum Windows version has been set to _WIN32_WINNT=0x0501.
Invalid options "-z defs" and "-lm" have been dropped for mingw.
Flag --export-all-symbols has been added to CMAKE_SHARED_LINKER_FLAGS
to workaround missing vtable symbols when using mingw.
FreeType is now linked explicitly on Windows.
Draw::Load() - "lib" suffix is now prepended on mingw as well.
Drop redundant declaration of _TINT from OSD_WNT_1.hxx.
NCollection_UtfString::FromLocale() - platform-specific code has been moved to .cxx file.
Draw_BasicCommands - fixed incorrect mingw64 version macros.
genproj, cbp - added workaround for process argument list limits on Windows.
TKSTEP linkage is failing on this platform due to too long list of files.
The list of object files to link is now stored in dedicated file which is passed to gcc.
Option "-z defs" removed from CMake linker options to avoid problems when building with different configurations of VTK on Linux
Some MinGW-specific compiler warnings (potentially uninitialized vars, use of NULL, parentheses in conditional expressions) are fixed (speculatively)
Added ldl dependency for TKernel only (other toolkits were checked, no undefined symbols)
Added option "-z defs" for linking on Linux
Added lm dependency for all toolkits
Patch removes option -wd4996 from VS project settings (which suppresses old deprecation warnings).
Instead, macros _CRT_SECURE_NO_WARNINGS (suppresses 444 warnings) and _CRT_NONSTDC_NO_DEPRECATE (suppresses 17 warnings) have been added.
Deprecation warning on GetVersionEx() has been suppressed locally in OSD_Host.cxx.
In STEPConstruct_AP203Context.cxx, OSD_Host is used instead of low-level system functions.
This eliminates dependency of TKSTEP on winsock32.lib on Windows.
CMake script is corrected to add compiler options (except macro definitions) to CMAKE_CXX_FLAGS and CMAKE_C_FLAGS variables directly, instead of using add_definitions() command.
This eliminates failure of build by NMake due to incorrect options passed to RC compiler.
CSF_VTK removed from CMake meta-projects (this variable is left in EXTERNLIB because it is used by genproj.tcl)
USE_VTK shown if toolkits using VTK involved in the solution
VTK_DIR removed from the advanced variables
Warning messages 'Warning. .../a.hxx~ is not involved into .../FILES' renamed with 'Warning: File .../a.hxx~ is not listed in .../FILES'
the search algorithms fitted with one logic.
3rdparty_dir is not specified by-default
3rdparty_<name>_dir has higher priority than 3rdparty_dir
frameworks are considered on Mac OS;
CMake - continue method (cmake version >= 3.2) removed
vtk installation disabled
Mac OS X - link /usr/X11/lib if X11 library is linked
FILES parsing optimized
search X11 package for every time when it used on MAC
CSF_XwLibs used by a toolkit using Tk
break a package processing if all the files from FILES file have been processed
1) Macro definition WNT replaced by _WIN32 and _MSC_VER for platform and compiler detection accordingly.
2) Macro definition LIN replaced by __linux__ macro.
3) Macro definition DEB replaced by OCCT_DEBUG macro.
All CMake meta-projects for OCCT are put to OCCT code (including fragments previously generated by WOK).
"/bigobj" compiler flag added to TKQADraw because of the size of its object file
[GeomToStep & Graphic3d] private headers are included from current dir of including source file