From: Michael Kruse Date: Tue, 21 Jul 2015 12:22:36 +0000 (+0000) Subject: Remove gcc-specific flags from Visual Studio build X-Git-Tag: studio-1.4~2007 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=441357dca2fbe9cac5c178efe533314e520623cd;p=platform%2Fupstream%2Fllvm.git Remove gcc-specific flags from Visual Studio build Remove the flags -fno-exceptions -fno-rtti and add the equivalent for compiling with MSVC. Reviewers: grosser llvm-svn: 242775 --- diff --git a/polly/CMakeLists.txt b/polly/CMakeLists.txt index 5c0270e..64c671e 100644 --- a/polly/CMakeLists.txt +++ b/polly/CMakeLists.txt @@ -75,10 +75,13 @@ if (CMAKE_COMPILER_IS_GNUCXX) # FIXME: Turn off exceptions, RTTI: # -fno-exceptions -fno-rtti set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -fno-exceptions -fno-rtti") +elseif (MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHs-c-") + add_definitions("-D_HAS_EXCEPTIONS=0") +else () + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti") endif () -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti") - # Define the FLAGS for the compilation of isl and imath # # Those are the only C files we have in the repository. Hence, we can just use