For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Preperation for upcomming 6.8.0 and removal of TKAdvTools

Sebastian Hoogen's picture

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 # 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

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?