[polly] r242775 - Remove gcc-specific flags from Visual Studio build

Michael Kruse llvm at meinersbur.de
Tue Jul 21 05:22:36 PDT 2015

Author: meinersbur
Date: Tue Jul 21 07:22:36 2015
New Revision: 242775

URL: http://llvm.org/viewvc/llvm-project?rev=242775&view=rev
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


Modified: polly/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/CMakeLists.txt?rev=242775&r1=242774&r2=242775&view=diff
--- polly/trunk/CMakeLists.txt (original)
+++ polly/trunk/CMakeLists.txt Tue Jul 21 07:22:36 2015
@@ -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)
+  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

More information about the llvm-commits mailing list