Skip to content

Commit

Permalink
build(PythonPackages): Enable CMAKE_POSITION_INDEPENDENT_CODE
Browse files Browse the repository at this point in the history
For:

/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: _deps/libcbor-build/src/libcbor.a(serialization.c.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
2701
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: _deps/libcbor-build/src/libcbor.a(common.c.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
2702
collect2: error: ld returned 1 exit status
  • Loading branch information
thewtex committed Dec 23, 2022
1 parent 1fa7dbd commit c4fe622
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Expand Up @@ -31,6 +31,9 @@ set(_itk_build_testing ${BUILD_TESTING})
set(BUILD_TESTING OFF)
set(_itk_build_shared ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS OFF)
if(NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()

# Uses newer CMake
set(RapidJSON_GIT_REPOSITORY "https://github.com/thewtex/rapidjson.git")
Expand Down

0 comments on commit c4fe622

Please sign in to comment.