summaryrefslogtreecommitdiff
path: root/cmake/config-ix.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/config-ix.cmake')
-rwxr-xr-xcmake/config-ix.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index abb4afc74d..52025a9ee2 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -81,7 +81,11 @@ endif()
include(CheckAtomic)
include(CheckCXXCompilerFlag)
-check_cxx_compiler_flag("-fPIC" SUPPORTS_FPIC_FLAG)
+# On windows all code is position-independent and mingw warns if -fPIC
+# is in the command-line.
+if( NOT WIN32 )
+ check_cxx_compiler_flag("-fPIC" SUPPORTS_FPIC_FLAG)
+endif()
include(GetTargetTriple)
get_target_triple(LLVM_HOSTTRIPLE)