cmake: Disable pie

This commit is contained in:
yzct12345
2021-07-30 01:33:39 +00:00
committed by GitHub
parent c09557acd8
commit ca8b36b0cf

View File

@@ -144,6 +144,11 @@ else()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
add_compile_options(-fno-pie -no-pie)
add_link_options(-no-pie)
endif()
# Output binaries to bin/
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)