diff --git a/Makefile b/Makefile index 1a27fa77..4b036045 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,11 @@ ifeq ($(relaxed_build), on) $(warning $(NAME) will be built with most compiler warnings deactivated. This is fine if you want to test $(NAME) but will become an issue when you want to contribute code.) else LIB_CFLAGS += -Wall -Werror + # Clang: ensure files end with newline. Missing final newlines here triggered + # -Wnewline-eof warnings in downstream projects (e.g., Hyrise). + ifneq (,$(findstring clang,$(shell $(CXX) --version 2>/dev/null))) + LIB_CFLAGS += -Wnewline-eof + endif endif static ?= no diff --git a/src/SQLParser.h b/src/SQLParser.h index 6e783a17..707ba8ea 100644 --- a/src/SQLParser.h +++ b/src/SQLParser.h @@ -32,4 +32,4 @@ class SQLParser { } // namespace hsql -#endif \ No newline at end of file +#endif diff --git a/src/SQLParserResult.h b/src/SQLParserResult.h index e8329b5e..c33bc3d0 100644 --- a/src/SQLParserResult.h +++ b/src/SQLParserResult.h @@ -91,4 +91,4 @@ class SQLParserResult { } // namespace hsql -#endif // SQLPARSER_SQLPARSER_RESULT_H \ No newline at end of file +#endif // SQLPARSER_SQLPARSER_RESULT_H diff --git a/src/parser/parser_typedef.h b/src/parser/parser_typedef.h index 329235b1..61afef4a 100644 --- a/src/parser/parser_typedef.h +++ b/src/parser/parser_typedef.h @@ -30,4 +30,4 @@ struct HSQL_CUST_LTYPE { #define HSQL_LTYPE HSQL_CUST_LTYPE #define HSQL_LTYPE_IS_DECLARED 1 -#endif \ No newline at end of file +#endif diff --git a/src/sql/DropStatement.h b/src/sql/DropStatement.h index 63b7a2bf..bdb4db7b 100755 --- a/src/sql/DropStatement.h +++ b/src/sql/DropStatement.h @@ -22,4 +22,4 @@ struct DropStatement : SQLStatement { }; } // namespace hsql -#endif \ No newline at end of file +#endif