Build fixes for updating dEQP's version of amber (#634)
* CMakeLists.txt: Remove clang-only flags from gcc builds
Fixes: #628
* Avoid implicit conversion of size_t to double
Fixes: #628
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aa09507..80a249f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -194,18 +194,20 @@
-Wall
-Werror
-Wextra
- -Wno-c++98-compat
- -Wno-c++98-compat-pedantic
- -Wno-format-pedantic
-Wno-padded
-Wno-switch-enum
-Wno-unknown-pragmas
- -Wno-unknown-warning-option
-pedantic-errors
)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- target_compile_options(${TARGET} PRIVATE -Weverything)
+ target_compile_options(${TARGET} PRIVATE
+ -Wno-c++98-compat
+ -Wno-c++98-compat-pedantic
+ -Wno-format-pedantic
+ -Wno-unknown-warning-option
+ -Weverything
+ )
endif()
endif()
diff --git a/src/buffer.cc b/src/buffer.cc
index f160923..b349832 100644
--- a/src/buffer.cc
+++ b/src/buffer.cc
@@ -193,7 +193,7 @@
for (const auto val : diffs)
sum += (val * val);
- sum /= diffs.size();
+ sum /= static_cast<double>(diffs.size());
double rmse = std::sqrt(sum);
if (rmse > static_cast<double>(tolerance)) {
return Result("Root Mean Square Error of " + std::to_string(rmse) +