Fixed CMake warnings/bugs caused by #1670 and #1714
authorRoman Donchenko <roman.donchenko@itseez.com>
Wed, 30 Oct 2013 12:10:02 +0000 (16:10 +0400)
committerRoman Donchenko <roman.donchenko@itseez.com>
Wed, 30 Oct 2013 12:21:50 +0000 (16:21 +0400)
commit104b14e0e0f74cafad3b837922f44bb341816cfe
treedf54b5fd0b4d31da306a8a3344f82fd3adae270b
parent8a4f1bbbdf0552705508414fc928edc96b6602c3
Fixed CMake warnings/bugs caused by #1670 and #1714

include() doesn't create a variable scope, so the settings of
CMAKE_MODULE_PATH and CMAKE_FIND_ROOT_PATH_MODE_* were polluting
everything included after OpenCVDetectCUDA.cmake.

Also, FindCUDA includes FindPackageHandleStandardArgs, which includes
CMakeParseArguments, which causes warnings related to policy CMP0017.
Setting it to NEW seems safe enough.
CMakeLists.txt
cmake/OpenCVDetectCUDA.cmake