]> granicus.if.org Git - clang/commitdiff
Try to unbreak MSVC build.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 18 Oct 2009 19:59:44 +0000 (19:59 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 18 Oct 2009 19:59:44 +0000 (19:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84433 91177308-0d34-0410-b5e6-96231b3b80d8

tools/CIndex/CMakeLists.txt

index 71bbde546a6ee7eeaeb4fd01928c3109abe06486..ee77c0398f729e6ff5aebf3329ba97c1c4f2cc60 100644 (file)
@@ -22,6 +22,13 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     )
 endif()
 
+if(MSVC)
+  # windows.h doesn't compile with /Za
+  get_target_property(NON_ANSI_COMPILE_FLAGS CIndex COMPILE_FLAGS)
+  string(REPLACE /Za "" NON_ANSI_COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
+  set_target_properties(CIndex PROPERTIES COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
+endif(MSVC)
+
 set_target_properties(CIndex
   PROPERTIES
   LINKER_LANGUAGE CXX)