From 441357dca2fbe9cac5c178efe533314e520623cd Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 21 Jul 2015 12:22:36 +0000 Subject: [PATCH] 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 --- polly/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.7.4