Merge pull request #3 from zeux/warnings

Use warnings-as-errors and high warning levels
This commit is contained in:
Arseny Kapoulkine
2017-06-04 18:10:33 -07:00
committed by GitHub
3 changed files with 7 additions and 3 deletions
+4
View File
@@ -5,6 +5,10 @@ option(BUILD_DEMO "Build demo" OFF)
set(CMAKE_CXX_STANDARD 11)
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /WX")
endif(MSVC)
set(SOURCES
src/meshoptimizer.hpp
src/indexgenerator.cpp
+2 -2
View File
@@ -8,8 +8,8 @@ OBJECTS=$(SOURCES:%=$(BUILD)/%.o)
EXECUTABLE=$(BUILD)/meshoptimizer
CXXFLAGS=-g -Wall -std=c++11 -O3 -DNDEBUG
LDFLAGS=-pthread
CXXFLAGS=-g -Wall -Wextra -Wno-missing-field-initializers -Werror -std=c++11 -O3 -DNDEBUG
LDFLAGS=
all: $(EXECUTABLE)
+1 -1
View File
@@ -31,7 +31,7 @@ Mesh generatePlane(unsigned int N)
for (unsigned int y = 0; y <= N; ++y)
for (unsigned int x = 0; x <= N; ++x)
{
Vertex v = {float(x), float(y), 0, 0, 0, 1};
Vertex v = {float(x), float(y), 0, 0, 0, 1, float(x) / float(N), float(y) / float(N)};
result.vertices.push_back(v);
}