Preperation for upcomming 6.8.0 and removal of TKAdvTools

We are using CMake to build our project. Depending if we build against OCCT Does anyone know how to implement a check for the OCCT version in CMakeLists.txt?

Daniel Neander's picture

Hello Sebastian,

Standard_Version.hxx defines version macros.

if (OCC_VERSION_COMPLETE LESS "6.7.3" OR OCC_VERSION_DEVELOPMENT)
# OCC version <= 6.7.3 and
# link against TKAdvTools
# Note OCC_VERSION_DEVELOPMENT is not found (commented out) in official release.
else()
# don't link TKAdvTools
endif()

There is other macros in there that you can find :P
Note I don't use cmake so syntax may be incorrect.
Kind regards
Daniel

Forum supervisor's picture

Hello Sebastian,

to check whether TKAdvTools should be linked with we recommend to use the following test: "OCC_VERSION_HEX <= 0x060702".

Regards,
Forum Supervisor

Sebastian Hoogen's picture

OCC_VERSION_HEX is a preprocessor macro. AFAIK CMake does not expand those. Did anyone yet implement such check either compiling a program for try_run or parsing Standard_Version.h using regular expressions?