Don't link against libm and libpthread which don't exist in BeOS/Haiku. Also,
authorNick Lewycky <nicholas@mxc.ca>
Wed, 23 Jun 2010 06:48:34 +0000 (06:48 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Wed, 23 Jun 2010 06:48:34 +0000 (06:48 +0000)
Haiku like Linux provides <regex.h>, so use it. Patch by Paul Davey!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106620 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/config-ix.cmake
utils/TableGen/CMakeLists.txt
utils/unittest/googletest/README.LLVM
utils/unittest/googletest/include/gtest/internal/gtest-port.h

index e72560bcef1928f2464ef7509f99e21b80d2a6f6..d9450d925859331dbba52d2eb2d1fe06a3241dc9 100755 (executable)
@@ -4,7 +4,7 @@ include(CheckSymbolExists)
 include(CheckFunctionExists)
 include(CheckCXXSourceCompiles)
 
-if( UNIX )
+if( UNIX AND NOT BEOS )
   # Used by check_symbol_exists:
   set(CMAKE_REQUIRED_LIBRARIES m)
 endif()
index 85847f164bb28852ed4aa454019da30c694e32b0..972989ba6232ca41b754532275d92e37e0bad8af 100644 (file)
@@ -41,6 +41,6 @@ target_link_libraries(tblgen LLVMSupport LLVMSystem)
 if( MINGW )
   target_link_libraries(tblgen imagehlp psapi)
 endif( MINGW )
-if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
+if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD AND NOT BEOS )
   target_link_libraries(tblgen pthread)
 endif()
index 7322bec19dcc0677ed5b2af65949744e82e4b943..d6e6f9872282d6c2e8963cda36201e48a49caf3d 100644 (file)
@@ -27,3 +27,5 @@ $ mv COPYING LICENSE.TXT
 Modified as follows:
 * To GTestStreamToHelper in include/gtest/internal/gtest-internal.h,
   added the ability to stream with raw_os_ostream.
+* To refresh Haiku support in include/gtest/internal/gtest-port.h,
+  see http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20100621/102898.html
index cc5637d2fea86ed2da2a369980f7848e23f3990d..9683271e48f0f3ed1150eae5c0255f4758364815 100644 (file)
@@ -80,6 +80,7 @@
 // the given platform; otherwise undefined):
 //   GTEST_OS_AIX      - IBM AIX
 //   GTEST_OS_CYGWIN   - Cygwin
+//   GTEST_OS_HAIKU    - Haiku
 //   GTEST_OS_LINUX    - Linux
 //   GTEST_OS_MAC      - Mac OS X
 //   GTEST_OS_SOLARIS  - Sun Solaris
 #elif defined(_AIX)
 #define GTEST_OS_AIX 1
 #elif defined(__HAIKU__)
-#define GTEST_OS_HAIKU
+#define GTEST_OS_HAIKU 1
 #endif  // __CYGWIN__
 
-#if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_SYMBIAN || \
-    GTEST_OS_SOLARIS || GTEST_OS_AIX
+#if GTEST_OS_CYGWIN || GTEST_OS_HAIKU || GTEST_OS_LINUX || GTEST_OS_MAC || \
+    GTEST_OS_SYMBIAN || GTEST_OS_SOLARIS || GTEST_OS_AIX
 
 // On some platforms, <regex.h> needs someone to define size_t, and
 // won't compile otherwise.  We can #include it here as we already