create CMake variable for x86
Currently gmx_cpuid and the CUDA setup both try to find out if they are on x86, and do so slightly differently. I think we should unify this logic before it spreads further.
The only reliable way to detect this is to ask the compiler what architecture it is targetting. CMake itself refuses to get involved. GMX_X86_SSE2 is not an acceptable proxy, because you might be on ARM, or be wanting no acceleration.
I suggest we create a CMake variable GMX_IS_X86, and compile a test function in CMake that uses the #ifdefs from gmx_cpuid to avoid emitting an #error. Successful compilation will signal x86.
That CMake variable configures a #define in src/config.h.cmakein so the rest of the code can have the information. When CMake compiles the gmx_cpuid code for the acceleration detection, I believe we can pass a compiler define there, so that it can also test for #ifdef GMX_IS_X86.
Rename GMX_IS_* to GMX_TARGET_*
This addresses some confusion that developed between release-4-6 and
master with me trying to develop the kernels in master branch so I
could have unit testing support, and then cherry-pick them back. I
had intended to solve #1269 in a separate commit, but it didn't happen
As #1269 discusses, the code sometimes needs to know what architecture
is being targetted by the compiler. This information is held in the
GMX_TARGET_X86 and GMX_TARGET_BGQ CMake and preprocessor
variables. Note that this information is distinct from what CPU
acceleration is being used (which might be "None" on either platform).
gmx_cpuid.c needs GMX_TARGET_X86 defined to work correctly on x86, and
is called at configure time (at which time config.h is
unavailable). So, this in CMake is treated via a command-line
definition of GMX_TARGET_X86 when required.
Fixes #1269 (even though I98c5791ec silently did this already)