Closed mtaillefumier closed 1 year ago
Can one of the admins verify this patch?
@dev-zero Are all requests for change addressed? If so, let's merge this contribution.
https://cmake.org/cmake/help/latest/prop_tgt/POSITION_INDEPENDENT_CODE.html
So, setting it explicitly does not make sense.
it does as we often link static libraries and dynamic libraries together. Doing so results in potential errors during linking time which is due to the absence of -fPIC during compilation. We can leave it on all the time as the address resolution will happen at linking time if we use archive libraries instead of shared libraries. it has absolutely no influence on performance.
it has absolutely no influence on performance
Well, -fPIC
can have an impact but that's nothing to worry about. Though, -fPIC
is a necessity for shared libraries and indeed the risk of linking together non-PIC and PIC-objects is far more worrisome.
trivial change needed when the shared version of libcp2k is needed. OFF by default