summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-01-09 17:38:31 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-01-09 17:38:31 +0000
commit6abea2b0a451afd0ae47f471a3bb2bdc5b1d3f04 (patch)
tree5e537a4feadaa1dd37f053345e7d16750e2bd81d /CMakeLists.txt
parentaa2be8435693dfe73dac64de3e2b6b3f19df1eac (diff)
downloadllvm-6abea2b0a451afd0ae47f471a3bb2bdc5b1d3f04.tar.gz
llvm-6abea2b0a451afd0ae47f471a3bb2bdc5b1d3f04.tar.bz2
llvm-6abea2b0a451afd0ae47f471a3bb2bdc5b1d3f04.tar.xz
Apply -fPIC to C sources too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123122 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7daaa82eef..7b2f2c67ff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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()