summaryrefslogtreecommitdiffstats
path: root/llvm/utils/unittest
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/unittest')
-rw-r--r--llvm/utils/unittest/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/utils/unittest/CMakeLists.txt b/llvm/utils/unittest/CMakeLists.txt
index 5b5cbf5d745..0850d49e3a3 100644
--- a/llvm/utils/unittest/CMakeLists.txt
+++ b/llvm/utils/unittest/CMakeLists.txt
@@ -28,6 +28,12 @@ if(WIN32)
add_definitions(-DGTEST_OS_WINDOWS=1)
endif()
+# Google Test requires headers which need _ALL_SOURCE to build on AIX
+if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
+ remove_definitions("-D_XOPEN_SOURCE=700")
+ add_definitions("-D_ALL_SOURCE")
+endif()
+
if(SUPPORTS_VARIADIC_MACROS_FLAG)
add_definitions("-Wno-variadic-macros")
endif()
OpenPOWER on IntegriCloud