Skip to content

Commit

Permalink
pie needs check_pie
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Nov 28, 2023
1 parent acf286b commit f0b466f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/compilers.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include(CheckCompilerFlag)
include(CheckPIESupported)
# --- compiler check

set(cargs "$<$<COMPILE_LANGUAGE:C>:Add_>")
Expand Down Expand Up @@ -45,5 +46,6 @@ endif()

# fixes errors about needing -fPIC -- needed by targets linking to this
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND BUILD_SHARED_LIBS)
check_pie_supported()
set(CMAKE_POSITION_INDEPENDENT_CODE true)
endif()

0 comments on commit f0b466f

Please sign in to comment.