[CMake] Refactor common settings and flags

These are needed by both libraries, so we can do that in a
common namespace and unify configuration parameters.
Also make sure that the user isn't requesting libomptarget
if the library cannot be built on the system. Issue an error
in that case.

Differential Revision: https://reviews.llvm.org/D40081

llvm-svn: 319342
GitOrigin-RevId: 5af381acade8a285ff2e3c8c8e6018d5432116d3
12 files changed