CMakeLists.txt: Don't set CMAKE_POSITION_INDEPENDENT_CODE to TRUE if it is already defined
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
efe7d8ca57
commit
510e7a24f3
|
@ -24,7 +24,9 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
|||
include(CheckPIESupported)
|
||||
check_pie_supported(LANGUAGES CXX)
|
||||
if (CMAKE_CXX_LINK_PIE_SUPPORTED)
|
||||
if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif()
|
||||
else()
|
||||
message(NOTICE "Position-Independent Code (PIC) is not supported by the current toolchain")
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue