[SWDEV-545751] CMAKE - Enable fPIC (#629)
Change-Id: Iaade10e70b3a39d6bca23ae98f9f501339ffd76d Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
Este cometimento está contido em:
cometido por
GitHub
ascendente
e12d270693
cometimento
cd33b75540
@@ -97,6 +97,10 @@ option(ENABLE_ASAN_PACKAGING "" OFF)
|
||||
option(ENABLE_ESMI_LIB "Build ESMI Library" ON)
|
||||
option(BUILD_EXAMPLES "Build examples" OFF)
|
||||
|
||||
# If amdsmi is built as a static library, it should support being embedded in other programs. The setting below essentially enables the -fPIC flag.
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "Enable position independent code for all targets")
|
||||
mark_as_advanced(CMAKE_POSITION_INDEPENDENT_CODE)
|
||||
|
||||
include(CMakeDependentOption)
|
||||
# these options don't work without BUILD_SHARED_LIBS
|
||||
cmake_dependent_option(BUILD_WRAPPER "Rebuild AMDSMI-wrapper" OFF "BUILD_SHARED_LIBS" OFF)
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador