From 9b741710138053b21e195dcd5f7991d3a4b1ad03 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Thu, 21 Dec 2023 15:05:10 +0000 Subject: [PATCH] Remove exec_program call Signed-off-by: Michael Carroll --- cmake/GzSetCompilerFlags.cmake | 13 +------------ cmake/GzUtils.cmake | 6 ------ 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/cmake/GzSetCompilerFlags.cmake b/cmake/GzSetCompilerFlags.cmake index f4d0aa83..6d87dc05 100644 --- a/cmake/GzSetCompilerFlags.cmake +++ b/cmake/GzSetCompilerFlags.cmake @@ -77,18 +77,7 @@ endmacro() # Configure settings for Unix # Internal to gz-cmake. macro(_gz_setup_unix) - - find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin ) - if(CMAKE_UNAME) - exec_program(${CMAKE_UNAME} ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR) - set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR} CACHE INTERNAL - "processor type (i386 and x86_64)") - if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") - set(GZ_ADD_fPIC_TO_LIBRARIES true) - set(IGN_ADD_fPIC_TO_LIBRARIES ${GZ_ADD_fPIC_TO_LIBRARIES}) # TODO(CH3): Deprecated. Remove on tock. - endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") - endif(CMAKE_UNAME) - + # No custom setup for Unix systems endmacro() ################################################# diff --git a/cmake/GzUtils.cmake b/cmake/GzUtils.cmake index 2fc63e69..f35c7c9f 100644 --- a/cmake/GzUtils.cmake +++ b/cmake/GzUtils.cmake @@ -214,12 +214,6 @@ macro(_gz_add_library_or_component) add_library(${lib_name} ${sources}) endif() - #------------------------------------ - # Add fPIC if we are supposed to - if(GZ_ADD_fPIC_TO_LIBRARIES AND NOT _gz_add_library_INTERFACE) - target_compile_options(${lib_name} PRIVATE -fPIC) - endif() - if(NOT _gz_add_library_INTERFACE) #------------------------------------