Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unix-specific fPIC flag #399

Merged
merged 2 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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