ocl: correct disabling of OpenCL code

This commit is contained in:
Alexander Alekhin
2015-06-19 20:52:14 +03:00
parent 190d00ea3e
commit 7213e5f68a
16 changed files with 127 additions and 18 deletions

View File

@@ -26,6 +26,8 @@ set(STR_CPP "// This file is auto-generated. Do not edit!
#include \"precomp.hpp\"
#include \"${OUTPUT_HPP_NAME}\"
#ifdef HAVE_OPENCL
namespace cv
{
namespace ocl
@@ -40,6 +42,8 @@ set(STR_HPP "// This file is auto-generated. Do not edit!
#include \"opencv2/core/ocl_genbase.hpp\"
#include \"opencv2/core/opencl/ocl_defs.hpp\"
#ifdef HAVE_OPENCL
namespace cv
{
namespace ocl
@@ -82,8 +86,8 @@ foreach(cl ${cl_list})
set(STR_HPP "${STR_HPP}${STR_HPP_DECL}")
endforeach()
set(STR_CPP "${STR_CPP}}\n${nested_namespace_end}}\n")
set(STR_HPP "${STR_HPP}}\n${nested_namespace_end}}\n")
set(STR_CPP "${STR_CPP}}\n${nested_namespace_end}}\n#endif\n")
set(STR_HPP "${STR_HPP}}\n${nested_namespace_end}}\n#endif\n")
file(WRITE "${OUTPUT}" "${STR_CPP}")