Apply -fPIC to C sources too.
authorOscar Fuentes <ofv@wanadoo.es>
Sun, 9 Jan 2011 17:38:31 +0000 (17:38 +0000)
committerOscar Fuentes <ofv@wanadoo.es>
Sun, 9 Jan 2011 17:38:31 +0000 (17:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123122 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt

index 7daaa82eef454ed60f604a189952551d177430c4..7b2f2c67ff26aa3d3a66861b1fc78870a71e7155 100644 (file)
@@ -210,6 +210,7 @@ if( LLVM_ENABLE_PIC )
     if( SUPPORTS_FPIC_FLAG )
       message(STATUS "Building with -fPIC")
       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+      set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
     else( SUPPORTS_FPIC_FLAG )
       message(WARNING "-fPIC not supported.")
     endif()