[test-suite][AIX] Fix C++ benchmark compatibility issues on AIX

Summary:
This reimplements what has been reverted in 630313d.

The old implementation applied the X/OPEN compatibility flag to the entire miniFE benchmark. This caused a build failure with `mytimer.cpp` due to its usages of `struct timezone` which is not available on AIX when the said compatibility flag is set. This new fix now also defines "UseTimes" which enables another path in the application to avoid the usages of `timezone`.

Reviewers: hubert.reinterpretcast, daltenty, ShuhongL

Reviewed By: hubert.reinterpretcast

Subscribers: mgorny

Differential Revision: https://reviews.llvm.org/D83342
diff --git a/MultiSource/Benchmarks/DOE-ProxyApps-C++/miniFE/CMakeLists.txt b/MultiSource/Benchmarks/DOE-ProxyApps-C++/miniFE/CMakeLists.txt
index e6afd61..f465718 100644
--- a/MultiSource/Benchmarks/DOE-ProxyApps-C++/miniFE/CMakeLists.txt
+++ b/MultiSource/Benchmarks/DOE-ProxyApps-C++/miniFE/CMakeLists.txt
@@ -1,4 +1,11 @@
 list(APPEND CXXFLAGS -I. -DMINIFE_SCALAR=double  -DMINIFE_LOCAL_ORDINAL=int -DMINIFE_GLOBAL_ORDINAL=int -DMINIFE_CSR_MATRIX -DREDSTORM) # -DREDSTORM for mkdir
+# Use X/OPEN compatibility flag on AIX to avoid problems with some
+# versions of the system headers. Define "UseTimes" to avoid usages of
+# "struct timezone" in some source files because it's not available on
+# AIX when the compatibility flag is set.
+if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
+  list(APPEND CXXFLAGS -D_XOPEN_SOURCE=700 -DUseTimes)
+endif()
 list(APPEND LDFLAGS -lm)
 set(RUN_OPTIONS -nx 64 -ny 64 -nz 64)
 llvm_multisource(miniFE)