[llvm-commits] [llvm] r106620 - in /llvm/trunk: cmake/config-ix.cmake utils/TableGen/CMakeLists.txt utils/unittest/googletest/README.LLVM utils/unittest/googletest/include/gtest/internal/gtest-port.h

Nick Lewycky nicholas at mxc.ca
Tue Jun 22 23:48:34 PDT 2010


Author: nicholas
Date: Wed Jun 23 01:48:34 2010
New Revision: 106620

URL: http://llvm.org/viewvc/llvm-project?rev=106620&view=rev
Log:
Don't link against libm and libpthread which don't exist in BeOS/Haiku. Also,
Haiku like Linux provides <regex.h>, so use it. Patch by Paul Davey!

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

Modified: llvm/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=106620&r1=106619&r2=106620&view=diff
==============================================================================
--- llvm/trunk/cmake/config-ix.cmake (original)
+++ llvm/trunk/cmake/config-ix.cmake Wed Jun 23 01:48:34 2010
@@ -4,7 +4,7 @@
 include(CheckFunctionExists)
 include(CheckCXXSourceCompiles)
 
-if( UNIX )
+if( UNIX AND NOT BEOS )
   # Used by check_symbol_exists:
   set(CMAKE_REQUIRED_LIBRARIES m)
 endif()

Modified: llvm/trunk/utils/TableGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CMakeLists.txt?rev=106620&r1=106619&r2=106620&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CMakeLists.txt (original)
+++ llvm/trunk/utils/TableGen/CMakeLists.txt Wed Jun 23 01:48:34 2010
@@ -41,6 +41,6 @@
 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()

Modified: llvm/trunk/utils/unittest/googletest/README.LLVM
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/README.LLVM?rev=106620&r1=106619&r2=106620&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googletest/README.LLVM (original)
+++ llvm/trunk/utils/unittest/googletest/README.LLVM Wed Jun 23 01:48:34 2010
@@ -27,3 +27,5 @@
 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

Modified: llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h?rev=106620&r1=106619&r2=106620&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h (original)
+++ llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h Wed Jun 23 01:48:34 2010
@@ -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
@@ -220,11 +221,11 @@
 #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





More information about the llvm-commits mailing list