summaryrefslogtreecommitdiff
path: root/cmake/base-config-ix.cmake
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-06-17 17:48:52 +0000
committerReid Kleckner <rnk@google.com>2016-06-17 17:48:52 +0000
commitd80ed424db5879f5250e0be79332bc4c31a8ef29 (patch)
treed91110cbe004fdc4ee4215cabf5af4c4c361aa64 /cmake/base-config-ix.cmake
parent820e56d16151e68193754349bfdbbd5682a7fb15 (diff)
Fix some warnings in the MSVC build
- Fixes warnings about the ignored -fms-compatibility-version flag. - Fixes warnings about overriding /W4 with /W3 and back. - Fixes a warning where PREFETCH() expanded to nothing in a braceless if block. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273021 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/base-config-ix.cmake')
-rw-r--r--cmake/base-config-ix.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
index 5d71fa9c1..d252ef8d9 100644
--- a/cmake/base-config-ix.cmake
+++ b/cmake/base-config-ix.cmake
@@ -106,6 +106,10 @@ macro(test_targets)
# Add this flag into the host build if this is clang-cl.
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
append("${MSVC_VERSION_FLAG}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ elseif (COMPILER_RT_TEST_COMPILER_ID MATCHES "Clang")
+ # Add this flag to test compiles to suppress clang's auto-detection
+ # logic.
+ append("${MSVC_VERSION_FLAG}" COMPILER_RT_TEST_COMPILER_CFLAGS)
endif()
endif()
endif()
@@ -126,9 +130,9 @@ macro(test_targets)
test_target_arch(i386 __i386__ "-m32")
else()
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
- test_target_arch(i386 "" "${MSVC_VERSION_FLAG}")
+ test_target_arch(i386 "" "")
else()
- test_target_arch(x86_64 "" "${MSVC_VERSION_FLAG}")
+ test_target_arch(x86_64 "" "")
endif()
endif()
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc")