Add detection for ARMv7 cycle counter support
authorErik Lindahl <erik@kth.se>
Thu, 7 Jul 2016 11:45:47 +0000 (13:45 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Fri, 8 Jul 2016 13:16:23 +0000 (15:16 +0200)
commit0d4ea6033cba8cbfe6505f399ffd65e9aa412d3e
treeb3239947e306e1bd986daeab613b6d11d852e55d
parentfa1d62c66cfd845fcfda33783a7881bca7aa8c1d
Add detection for ARMv7 cycle counter support

ARMv7 requires special kernel settings to allow cycle
counters to be read. This change adds a cmake setting
to enable/disable counters. On all architectures but ARMv7
it is enabled by default, and on ARMv7 we run a small test
program to see if the can be executed successfully. When
cross-compiling to ARMv7 counters will be disabled, but
either choice can be overridden by setting a value for
GMX_CYCLECOUNTERS in cmake.

Fixes #1933.

Change-Id: I1e217d7a09f84a6bcf4eb5bf4a656d430465c915
CMakeLists.txt
cmake/TestARMv7.cpp [new file with mode: 0644]
cmake/TestARMv7CycleCounters.cpp [new file with mode: 0644]
cmake/gmxDetectTargetArchitecture.cmake
cmake/gmxManageCycleCounters.cmake [new file with mode: 0644]
src/config.h.cmakein
src/gromacs/timing/cyclecounter.h