Skip to content

Commit

Permalink
CMakeLists.txt: Use PIC/PIE code generation even for static libs.
Browse files Browse the repository at this point in the history
  • Loading branch information
wilx committed Sep 3, 2018
1 parent cc93711 commit eed493f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Expand Up @@ -14,6 +14,9 @@ set (CMAKE_LEGACY_CYGWIN_WIN32 0)
project (log4cplus)
cmake_minimum_required (VERSION 3.1)

# Use "-fPIC" / "-fPIE" for all targets by default, including static libs.
set (CMAKE_POSITION_INDEPENDENT_CODE ON)

enable_language (CXX)
if (MSVC)
set (CMAKE_CXX_STANDARD 17)
Expand Down

0 comments on commit eed493f

Please sign in to comment.