Unverified Commit 9caca9d4 authored by Kip's avatar Kip Committed by GitHub

Merge pull request #855 from uilianries/feature/optional-fpic

Make fPIC optional
parents 2a8ea402 236f6051
...@@ -29,6 +29,7 @@ option(PISTACHE_BUILD_EXAMPLES "build examples alongside the project" OFF) ...@@ -29,6 +29,7 @@ option(PISTACHE_BUILD_EXAMPLES "build examples alongside the project" OFF)
option(PISTACHE_BUILD_DOCS "build docs alongside the project" OFF) option(PISTACHE_BUILD_DOCS "build docs alongside the project" OFF)
option(PISTACHE_INSTALL "add pistache as install target (recommended)" ON) option(PISTACHE_INSTALL "add pistache as install target (recommended)" ON)
option(PISTACHE_USE_SSL "add support for SSL server" OFF) option(PISTACHE_USE_SSL "add support for SSL server" OFF)
option(PISTACHE_PIC "Enable pistache PIC" ON)
# require fat LTO objects in static library # require fat LTO objects in static library
if(CMAKE_INTERPROCEDURAL_OPTIMIZATION OR CMAKE_CXX_FLAGS MATCHES "-flto" OR CMAKE_CXX_FLAGS MATCHES "-flto=thin") if(CMAKE_INTERPROCEDURAL_OPTIMIZATION OR CMAKE_CXX_FLAGS MATCHES "-flto" OR CMAKE_CXX_FLAGS MATCHES "-flto=thin")
......
...@@ -12,7 +12,7 @@ set(SOURCE_FILES ...@@ -12,7 +12,7 @@ set(SOURCE_FILES
) )
add_library(pistache OBJECT ${SOURCE_FILES}) add_library(pistache OBJECT ${SOURCE_FILES})
set_target_properties(pistache PROPERTIES POSITION_INDEPENDENT_CODE 1) set_target_properties(pistache PROPERTIES POSITION_INDEPENDENT_CODE ${PISTACHE_PIC})
add_definitions(-DONLY_C_LOCALE=1) add_definitions(-DONLY_C_LOCALE=1)
set(PISTACHE_INCLUDE set(PISTACHE_INCLUDE
...@@ -56,7 +56,7 @@ if (BUILD_SHARED_LIBS) ...@@ -56,7 +56,7 @@ if (BUILD_SHARED_LIBS)
) )
endif () endif ()
set_target_properties(pistache_static PROPERTIES set_target_properties(pistache_static PROPERTIES
OUTPUT_NAME ${Pistache_OUTPUT_NAME} OUTPUT_NAME ${Pistache_OUTPUT_NAME}
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment