build: use POSITION_INDEPENDENT_CODE CMake property

Use the POSITION_INDEPENDENT_CODE target property to indicate that we
should be building with -fPIC or the equivalent flag based on the
toolchain that we are using.  This makes the check more portable and
simplifies the flags management.  Because we don't want this setting to
propagate in the case of an in-tree build, set the property on the
targets we construct explicitly rather than setting
CMAKE_POSITION_INDEPENDENT_CODE to ON globally.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@305174 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed