Commit c90dee66 authored by Alexander Alekhin's avatar Alexander Alekhin

cmake: fix optimization filter

Check file name only:
    Excluding from source files list (optimization is disabled):
    C:/Code/SrcExt/OpenCV/Buildv3.2_x64/modules/core/opencl_kernels_core.cpp
parent 85321807
......@@ -520,6 +520,7 @@ macro(ocv_compiler_optimization_process_sources SOURCES_VAR_NAME LIBS_VAR_NAME T
endforeach()
foreach(fname ${${SOURCES_VAR_NAME}})
string(TOLOWER "${fname}" fname_LOWER)
get_filename_component(fname_LOWER "${fname_LOWER}" NAME)
if(fname_LOWER MATCHES "\\.(.*)\\.cpp$")
string(TOUPPER "${CMAKE_MATCH_1}" OPT_)
if(OPT_ MATCHES "(CUDA.*|DISPATCH.*|OCL)") # don't touch files like filename.cuda.cpp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment