From 474ba68bba935277ea132f73f601898754c3d82c Mon Sep 17 00:00:00 2001 From: Kamil Rojewski Date: Mon, 12 Feb 2018 17:37:51 +0100 Subject: [PATCH] Fix for aligned new for gcc >= 7.1 (#4621) * Eclipse ignore * TypeScript support * Prefixing enums * Test results * Merged JS and TS generators * Fixed AppVeyor build problems * Fixed more AppVeyor build problems * Fixed more AppVeyor build problems * Changed TS flag to options struct * Storing options by value * Removed unneeded const * Re-export support for unions * Uint support * Casting bools to numbers for mutation * TS shell tests * Reverted generates js test file to original version * Backing up js tests and properly generating test data * Not importing flatbuffers for TS test generation * Not overwriting generated js for tests * AppVeyor test fixes * Generating the most strict TS code possible * Not returning null when creating vectors * Not returning null from struct contructors * Vector of unions for ts/js * Sanity check for languages * Indentation fix + output test files * Vectors of unions for php * Fixes to union vector handling + tests * Fix for strictPropertyInitialization * Fix for new aligned operator new for gcc >= 7.1 --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index acae9fe4d..6f2f7c24b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,7 +120,11 @@ elseif(CMAKE_COMPILER_IS_GNUCXX) endif(CYGWIN) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra -Werror=shadow") - if (GCC_VERSION VERSION_GREATER 4.4) + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.4) + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) + set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -faligned-new") + endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-result -Werror=unused-result \ -Wunused-parameter -Werror=unused-parameter")