sensics / OSVR-RenderManager

Apache License 2.0
64 stars 45 forks source link

Fix infinite loop #342

Closed rpavlik closed 6 years ago

rpavlik commented 6 years ago

This was @russell-taylor 's work I just saw on gitk - is this ready to merge? Is it possibly related to https://github.com/OSVR/OSVR-Core/issues/562 ?

rpavlik commented 6 years ago

It would be preferable if we could just do a compiler test for that flag to see if it's supported, rather than just enabling it by force when we see "Linux", FWIW - in theory I know how to do this, given the documentation...

godbyk commented 6 years ago

I've used the compiler flag test before:

include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-fext-numeric-literals SUPPORTS_EXT_NUMERIC_LITERALS)
if(SUPPORTS_EXT_NUMERIC_LITERALS)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fext-numeric-literals")
endif()
russell-taylor commented 6 years ago

@rpavlik Kevin's fix seems to work on both Windows and Linux and I've added it to the pull request. It could easily be that this fixes the OSVR-Core issue by avoiding overlinking.