occt: master 3536158f

Author Committer Branch Timestamp Parent
ddzama smoskvin master 2022-10-06 13:29:08 master cb77bfc4
Affected Issues  0033153: Configuration: Linker error when building from source for VS2022 x64
Changeset 0033153: Configuration: Linker error when building from source for VS2022 x64.

With enabled flag BUILD_USE_PCH we get an error of compilation of TKService:

1>Image_VideoRecorder.obj :
  error LNK2019:
    unresolved external symbol
      "int __cdecl av_strerror(int,char *,unsigned __int64)"
      (?av_strerror@@YAHHPEAD_K@Z) referenced in function
      "protected: class TCollection_AsciiString __cdecl Image_VideoRecorder::formatAvError(int)const "
      (?formatAvError@Image_VideoRecorder@@IEBA?AVTCollection_AsciiString@@H@Z)
1>Media_FormatContext.obj :
  error LNK2001:
    unresolved external symbol
      "int __cdecl av_strerror(int,char *,unsigned __int64)" (?av_strerror@@YAHHPEAD_K@Z)

And many other similar errors. Similar errors occures in some other projects too:

TKService
TKOpenGl
TKOpenGles
TKXCAF
TKXDEDRAW
TKDFBrowser
TKMessageModel
TKMessageView
TKShapeView
TKTInspector
TKTreeModel
TKVInspector
TKView

Proposed solution: turn off cotire from targets, whose compilation cause error while applying cotire tool.
In this ticket migration to cotire 1.8.1 (from 1.7.9) is done.

COTIRE_PREFIX_HEADER_IGNORE_PATH does not apply here, because its employing
causes some errors in 3rdparty libraries (for example, in TKService project).

Projects (TKDFBrowser TKMessageModel TKMessageView TKShapeView TKTInspector TKTreeModel TKVInspector TKView)
which use Qt may be proceeded by cotire tool, but after fixing a bug of cotire:

https://gitlab.kitware.com/cmake/cmake/-/issues/18353

0033153: Fix cotire bug, causing impossibility of compilation targets depending from Qt.

Solution is proposed in:
https://gitlab.kitware.com/cmake/cmake/-/issues/18353
mod - adm/cmake/cotire.cmake Diff File
mod - adm/cmake/occt_toolkit.cmake Diff File
mod - src/TKOpenGl/CMakeLists.txt Diff File
mod - src/TKOpenGles/CMakeLists.txt Diff File
mod - src/TKService/CMakeLists.txt Diff File
mod - src/TKXCAF/CMakeLists.txt Diff File
mod - src/TKXDEDRAW/CMakeLists.txt Diff File
mod - tools/TKDFBrowser/CMakeLists.txt Diff File
mod - tools/TKMessageModel/CMakeLists.txt Diff File
mod - tools/TKMessageView/CMakeLists.txt Diff File
mod - tools/TKShapeView/CMakeLists.txt Diff File
mod - tools/TKTInspector/CMakeLists.txt Diff File
mod - tools/TKTreeModel/CMakeLists.txt Diff File
mod - tools/TKView/CMakeLists.txt Diff File
mod - tools/TKVInspector/CMakeLists.txt Diff File