Disable exception handling in opencv during compilation

Hi,

I am using TI ARM clang compiler and at the moment it doesn’t support C++ exception handling fully. Hence I wanna disable exception handling code that’s present in the opencv with a cmake command flag during configuring stage.

I tried using -DBUILD_WITHOUT_EXCEPTIONS=ON but it didn’t work. Is there is any such flag I can use? Because manually commenting the throw, try code is very tedious.

Thanks

Any suggestions here?