summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorKefu Chai <kchai@redhat.com>2016-06-29 09:49:26 +0200
committerKefu Chai <kchai@redhat.com>2016-06-29 16:26:25 +0200
commit6b12a395eb6ba293d13d62dcf690272ab5605e8e (patch)
tree68c91a0ffb932f79600e394d60d7fc0d2cf9c901 /src/CMakeLists.txt
parentcmake: move librados.cc out of libradosstriper (diff)
downloadceph-6b12a395eb6ba293d13d62dcf690272ab5605e8e.tar.xz
ceph-6b12a395eb6ba293d13d62dcf690272ab5605e8e.zip
cmake: use CMAKE_POSITION_INDEPENDENT_CODE property instead of -fPIC
use the global setting of CMAKE_POSITION_INDEPENDENT_CODE instead of hardwiring the CMAKE_C_FLAGS with -fPIC. this helps to reduce the overhead of symbol resolution when user is using static libraries. see https://cmake.org/cmake/help/v2.8.11/cmake.html#variable:CMAKE_POSITION_INDEPENDENT_CODE Signed-off-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to '')
-rw-r--r--src/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a5519fe4b64..0b3880a2a97 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -19,7 +19,7 @@ add_definitions("-DHAVE_CONFIG_H -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT
set(CMAKE_ASM_COMPILER ${PROJECT_SOURCE_DIR}/src/yasm-wrapper)
set(CMAKE_ASM_FLAGS "-f elf64")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -rdynamic -Wall -Wtype-limits -Wignored-qualifiers -Winit-self -Wpointer-arith -Werror=format-security -fno-strict-aliasing -fsigned-char -fPIC")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -rdynamic -Wall -Wtype-limits -Wignored-qualifiers -Winit-self -Wpointer-arith -Werror=format-security -fno-strict-aliasing -fsigned-char")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Default BUILD_TYPE is RelWithDebInfo, other options are: Debug, Release, and MinSizeRel." FORCE)