1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-28 23:03:03 +04:00

Fixed cmake and build issues when using Visual Studio 2015

This commit is contained in:
Maksim Shabunin
2015-10-26 16:55:42 +03:00
parent 4552ca98c4
commit f49936a849
59 changed files with 520 additions and 460 deletions
+6 -6
View File
@@ -397,16 +397,16 @@ struct ProgramFileCache
sizeof(size_t),
&binarySize, NULL));
std::vector<char> binary(binarySize);
std::vector<char> localBinary(binarySize);
char* ptr = &binary[0];
char* ptr = &localBinary[0];
openCLSafeCall(clGetProgramInfo(program,
CL_PROGRAM_BINARIES,
sizeof(char*),
&ptr,
NULL));
if (!writeConfigurationToFile(options, binary))
if (!writeConfigurationToFile(options, localBinary))
{
std::cerr << "Can't write data to file: " << fileName_ << std::endl;
}
@@ -463,7 +463,7 @@ cl_program ProgramCache::getProgram(const Context *ctx, const cv::ocl::ProgramEn
}
{
cv::AutoLock lockCache(mutexCache);
cv::AutoLock localLockCache(mutexCache);
cl_program program = ProgramCache::getProgramCache()->progLookup(src_sign.str());
if (!!program)
{
@@ -478,7 +478,7 @@ cl_program ProgramCache::getProgram(const Context *ctx, const cv::ocl::ProgramEn
// second check
if (source->name)
{
cv::AutoLock lockCache(mutexCache);
cv::AutoLock localLockCache(mutexCache);
cl_program program = ProgramCache::getProgramCache()->progLookup(src_sign.str());
if (!!program)
{
@@ -504,7 +504,7 @@ cl_program ProgramCache::getProgram(const Context *ctx, const cv::ocl::ProgramEn
//Cache the binary for future use if build_options is null
if (source->name)
{
cv::AutoLock lockCache(mutexCache);
cv::AutoLock localLockCache(mutexCache);
this->addProgram(src_sign.str(), program);
}
return program;