From eb6d511565f4faf97bd468e73d05eaa04ed1ddb0 Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Fri, 16 Sep 2011 22:52:47 +0000 Subject: [PATCH] Premake4 build system fix: only disable exception handling for msvc 2008, 2010, not for 2005 because it fails without service pack. --- msvc/premake4.lua | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/msvc/premake4.lua b/msvc/premake4.lua index 40c273432..abb3f58d2 100644 --- a/msvc/premake4.lua +++ b/msvc/premake4.lua @@ -3,12 +3,7 @@ solution "0BulletSolution" - -- Multithreaded compiling - --if _ACTION == "vs2010" or _ACTION=="vs2008" then - --vs2008 seems unstable with /MP, causing internal linker errors - if _ACTION == "vs2010" then - buildoptions { "/MP" } - end + newoption { trigger = "with-nacl", @@ -65,9 +60,22 @@ solution "0BulletSolution" if not _OPTIONS["with-nacl"] then - flags { "NoRTTI", "NoExceptions"} + + flags { "NoRTTI"} + targetdir "../bin" + + -- Disable exception handling on MSVC 2008 and higher. MSVC 2005 without service pack has some linker issue (ConvexDecompositionDemo uses STL through HACD library) + if _ACTION == "vs2010" or _ACTION=="vs2008" then + flags { "NoExceptions"} defines { "_HAS_EXCEPTIONS=0" } - targetdir "../bin" + end + + -- Multithreaded compiling + if _ACTION == "vs2010" then + buildoptions { "/MP" } + end + + else targetdir "../bin_html" end