Skip to content

Commit

Permalink
Remove exec_program call
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll committed Dec 21, 2023
1 parent 40db6b2 commit 9b74171
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
13 changes: 1 addition & 12 deletions cmake/GzSetCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

#################################################
Expand Down
6 changes: 0 additions & 6 deletions cmake/GzUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

#------------------------------------
Expand Down

0 comments on commit 9b74171

Please sign in to comment.