From ef28d12d85d65009f1b7f34dd1368a28eaa103ec Mon Sep 17 00:00:00 2001 From: withmorten Date: Tue, 2 Feb 2021 14:02:42 +0100 Subject: fix gcc/clang build by adding -fpermssive and -Wno-address-of-temporary --- premake5.lua | 7 +++++++ src/CMakeLists.txt | 2 ++ 2 files changed, 9 insertions(+) diff --git a/premake5.lua b/premake5.lua index 2a8e6c93..010810a0 100644 --- a/premake5.lua +++ b/premake5.lua @@ -71,6 +71,13 @@ workspace "reLCS" symbols "Full" staticruntime "off" + -- for CVECTORHACK + configuration { "gmake*" } + buildoptions { "-fpermissive" } + + filter { "platforms:macosx*" } + buildoptions { "-Wno-address-of-temporary" } + if _OPTIONS["with-asan"] then buildoptions { "-fsanitize=address -g3 -fno-omit-frame-pointer" } linkoptions { "-fsanitize=address" } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f3d51b06..8325938c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -102,6 +102,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang if (NOT LIBRW_PLATFORM_PS2) target_compile_options(${EXECUTABLE} PRIVATE + -fpermissive # for CVECTORHACK + -Wno-address-of-temporary # for CVECTORHACK -Wextra -Wdouble-promotion -Wpedantic -- cgit v1.2.3