Ignore -fPIC test on Windows. Suggested by Yonggang Luo.
authorOscar Fuentes <ofv@wanadoo.es>
Wed, 26 Aug 2009 17:05:06 +0000 (17:05 +0000)
committerOscar Fuentes <ofv@wanadoo.es>
Wed, 26 Aug 2009 17:05:06 +0000 (17:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80111 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/config-ix.cmake

index abb4afc74db9c2701a3bb9df0b2c5552dec3e5ab..52025a9ee2c12ecf41fdf5c4e8759d2679f0cc7d 100755 (executable)
@@ -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)