Skip to content

Commit 6b6ba51

Browse files
authored
Add option to enable position independent code
1 parent f1d5ceb commit 6b6ba51

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
cmake_minimum_required (VERSION 3.13)
22

33
### Basic compilation settings
4-
if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
5-
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE CACHE BOOL "Build position independent code")
6-
endif()
4+
option(HTTPS_USE_FPIC "Enable CMAKE_POSITION_INDEPENDENT_CODE" ON)
5+
if (HTTPS_USE_FPIC)
6+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
7+
endif ()
8+
79
set (CMAKE_CXX_STANDARD 14)
810

911
include_directories (

0 commit comments

Comments
 (0)