Add compiler flags for -Wall and -Werror to Xcode project files and CMake configuration

This commit is contained in:
Tristan Penman 2016-01-17 11:48:39 +11:00
parent 0d028fb188
commit f2eed08cab
3 changed files with 28 additions and 3 deletions

View File

@ -1,7 +1,8 @@
cmake_minimum_required (VERSION 2.6)
project (valijson)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
if(VALIJSON_CXX11_ADAPTERS STREQUAL "disabled")
message(STATUS "Building with C++11 support disabled")
else()

View File

@ -47,8 +47,8 @@ public:
ValidationResults *results)
: target(target),
context(context),
strictTypes(strictTypes),
results(results) { }
results(results),
strictTypes(strictTypes) { }
/**
* @brief Validate the target against a schema.

View File

@ -1233,6 +1233,10 @@
LIBRARY_SEARCH_PATHS = /usr/local/lib;
PRODUCT_NAME = custom_schema;
VALID_ARCHS = x86_64;
WARNING_CFLAGS = (
"-Wall",
"-Werror",
);
};
name = Debug;
};
@ -1247,6 +1251,10 @@
LIBRARY_SEARCH_PATHS = /usr/local/lib;
PRODUCT_NAME = custom_schema;
VALID_ARCHS = x86_64;
WARNING_CFLAGS = (
"-Wall",
"-Werror",
);
};
name = Release;
};
@ -1274,6 +1282,10 @@
LIBRARY_SEARCH_PATHS = /usr/local/lib;
PRELINK_LIBS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
WARNING_CFLAGS = (
"-Wall",
"-Werror",
);
};
name = Debug;
};
@ -1300,6 +1312,10 @@
LIBRARY_SEARCH_PATHS = /usr/local/lib;
PRELINK_LIBS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
WARNING_CFLAGS = (
"-Wall",
"-Werror",
);
};
name = Release;
};
@ -1370,6 +1386,10 @@
LIBRARY_SEARCH_PATHS = /usr/local/lib;
PRODUCT_NAME = "$(TARGET_NAME)";
VALID_ARCHS = x86_64;
WARNING_CFLAGS = (
"-Wall",
"-Werror",
);
};
name = Debug;
};
@ -1384,6 +1404,10 @@
LIBRARY_SEARCH_PATHS = /usr/local/lib;
PRODUCT_NAME = "$(TARGET_NAME)";
VALID_ARCHS = x86_64;
WARNING_CFLAGS = (
"-Wall",
"-Werror",
);
};
name = Release;
};