From 1bdc95a4981be86687cbe01457014a4c5a39ad8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Lucr=C3=A8ce=20C=C3=A9leste?= Date: Fri, 23 Aug 2019 15:40:36 -0400 Subject: [PATCH] [CMake] properly declare FPIC use CMAKE_POSITION_INDEPENDENT_CODE instead of manually addinf -fPIC to CXX args. modified: CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index da9bd233..e456e2ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,7 +53,7 @@ include_directories (BEFORE SYSTEM ./ext/gtest/include) if (UNIX) if (NOT APPLE) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") + set (CMAKE_POSITION_INDEPENDENT_CODE TRUE) endif() # For config.h, detect the libraries, functions, etc.