liboqs
liboqs copied to clipboard
CMAKE_POSITION_INDEPENDENT_CODE should be optional
In order to use OQS for an embedded target (which does not use dynamic linking, and hence does not provision a Global Offset Table or Procedure Linkage Table), I would like to build it as a static library with CMAKE_POSITION_INDEPENDENT_CODE set OFF. However, the CMakeLists.txt hard codes this to ON, with no capability to override. It would be useful to allow this setting to be chosen from externally, for example in the CMake toolchain file. It should be noted that CMake's default choice in the absence of a setting is usually a sensible one (depending on the type of library or executable being built).