From 63444b3a546f057591b080dfaea86b7476bb6a18 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 18 Oct 2009 19:59:44 +0000 Subject: [PATCH] Try to unbreak MSVC build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84433 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/CIndex/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/CIndex/CMakeLists.txt b/tools/CIndex/CMakeLists.txt index 71bbde546a..ee77c0398f 100644 --- a/tools/CIndex/CMakeLists.txt +++ b/tools/CIndex/CMakeLists.txt @@ -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)