Skip to content

Commit f1d5ceb

Browse files
authored
Ensure position independent code setting is defined
1 parent e1b7704 commit f1d5ceb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/CMakeLists.txt

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

33
### Basic compilation settings
4-
set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
4+
if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
5+
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE CACHE BOOL "Build position independent code")
6+
endif()
57
set (CMAKE_CXX_STANDARD 14)
68

79
include_directories (

0 commit comments

Comments
 (0)