From 6589c54036872f3547a76134fdd0597b32e7108f Mon Sep 17 00:00:00 2001 From: Anush Elangovan Date: Fri, 10 Jun 2022 05:58:18 +0000 Subject: [PATCH] Set Position independent code in CMake Static builds of PyTorch get further along. Partially fixes https://github.com/pytorch/tensorpipe/issues/449 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 77df76da7..111cddb78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,7 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR) project(tensorpipe LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 14) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")