Skip to content

Fix atomics configure test

Mark Abraham requested to merge fix-atomics-configure-test into master

The previous code used an approach to setting the include path for TEST_ATOMICS test that did not work if the path had a space in it. This meant that atomics support in GROMACS seemed broken if the build was from a path in the home folder of a user named like "Firstname Lastname". This is often the case on Windows.

The new approach avoids this brittleness, adds a few comments and has the test source code inline in the cmake code. The TMPI_TEST_ATOMICS macro is replaced by a function so that it has a namespace, since it now needs to set some variables that benefit from that namespace. Also, its results were returned in internal cache variables rather than the namespace that the former macro automatically shared, so there was no advantage to using a macro rather than a function.

The former TEST_ATOMICS test defined TMPI_ATOMICS before the call, which was useless and confusing. That is removed.

Removed a useless call to TMPI_TEST_ATOMICS, which had always passed the name of a variable instead of the value it contained, and was redundant with a proper call that immediately preceded it in the calling code.

Merge request reports