File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ option(SPDLOG_BUILD_SHARED "Build shared library" OFF)
6161# precompiled headers option
6262option (SPDLOG_ENABLE_PCH "Build static or shared library using precompiled header to speed up compilation time" OFF )
6363
64+ # build position independent code
65+ option (SPDLOG_BUILD_PIC "Build position independent code (-fPIC)" OFF )
66+
6467# example options
6568option (SPDLOG_BUILD_EXAMPLE "Build example" ${SPDLOG_MASTER_PROJECT} )
6669option (SPDLOG_BUILD_EXAMPLE_HO "Build header only example" OFF )
@@ -132,6 +135,10 @@ if(SPDLOG_TIDY)
132135 message (STATUS "Enabled clang-tidy" )
133136endif ()
134137
138+ if (SPDLOG_BUILD_PIC)
139+ set (CMAKE_POSITION_INDEPENDENT_CODE ON )
140+ endif ()
141+
135142find_package (Threads REQUIRED )
136143message (STATUS "Build type: " ${CMAKE_BUILD_TYPE} )
137144# ---------------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments