mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
fix compilation with clang 10
Add flag -Wno-deprecated-copy only for clang >= 10.0 Signed-off-by: Jacek Danecki <jacek.danecki@intel.com> https://github.com/intel/compute-runtime/pull/289 Change-Id: I40cbc40a245f82a5dc9798851a276ead9e9ab74b
This commit is contained in:

committed by
sys_ocldev

parent
c6cd582f78
commit
41e18a9616
@ -747,6 +747,9 @@ if(NOT MSVC)
|
||||
if (NOT (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0))
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register") # Added for htons()
|
||||
endif()
|
||||
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-copy")
|
||||
endif()
|
||||
else()
|
||||
# gcc only
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs -Wno-unused-but-set-variable")
|
||||
|
@ -81,7 +81,7 @@ cl_int Program::compile(
|
||||
|
||||
options = (buildOptions != nullptr) ? buildOptions : "";
|
||||
|
||||
for (const auto optionString : {CompilerOptions::gtpinRera, CompilerOptions::greaterThan4gbBuffersRequired}) {
|
||||
for (const auto &optionString : {CompilerOptions::gtpinRera, CompilerOptions::greaterThan4gbBuffersRequired}) {
|
||||
size_t pos = options.find(optionString);
|
||||
if (pos != std::string::npos) {
|
||||
options.erase(pos, optionString.length());
|
||||
|
Reference in New Issue
Block a user