File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ if (VSG_SUPPORTS_Windowing)
9898 endif ()
9999endif ()
100100
101- set (VSG_USE_DYNAMIC_CAST 0 CACHE STRING "Use dynamic_cast in vsg::Object::cast<T>(), 0 for off, 1 for enabled." )
101+ option (VSG_USE_dynamic_cast "Use dynamic_cast in vsg::Object::cast<T>(), 0 for off, 1 for enabled." OFF )
102102
103103# this line needs to be after the call to setup_build_vars()
104104configure_file ("${VSG_SOURCE_DIR} /src/vsg/core/Version.h.in" "${VSG_VERSION_HEADER} " )
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ namespace vsg
8585 virtual const std::type_info& type_info () const noexcept { return typeid (Object); }
8686 virtual bool is_compatible (const std::type_info& type) const noexcept { return typeid (Object) == type; }
8787
88- #if VSG_USE_DYNAMIC_CAST == 1
88+ #if VSG_USE_dynamic_cast
8989 template <class T >
9090 T* cast () { return dynamic_cast <T*>(this ); }
9191
Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ extern "C"
4545 /// Native Windowing support provided with vsg::Window::create(windowTraits) enabled when 1, disabled when 0
4646 #cmakedefine01 VSG_SUPPORTS_Windowing
4747
48- /// Define VSG_USE_DYNAMIC_CAST to avoid typeid(T) comparisons in vsg::Object::cast<T>()
49- #define VSG_USE_DYNAMIC_CAST @VSG_USE_DYNAMIC_CAST@
48+ /// Define VSG_USE_dynamic_cast to avoid typeid(T) comparisons in vsg::Object::cast<T>()
49+ #cmakedefine01 VSG_USE_dynamic_cast
5050
5151 struct VsgVersion
5252 {
You can’t perform that action at this time.
0 commit comments