Internally, our build system has an option to build External tests in parallel by calling make per benchmark. Unfortunately, this causes a race condition because the timeit and fpcmp tools are built every time make is run (e.g., one instance of make tries to execute timeit, while another is rebuilding it).
This patch adds a custom_command level underneath the custom_targets for timeit and fpcmp to prevent the executables from being rebuilt every time make is called.
The custom_target rule will still be run every time, but the binaries will be detected as being up to date and skip rebuilding.
I’m a bit shaky on my CMake but I think this is the proper way to resolve the issue.
Please take a look.
Chad
Is this change necessary or just here by accident?