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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106620 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Lewycky 2010-06-23 06:48:34 +00:00
parent d24c9d5f91
commit ec4c02d252
4 changed files with 8 additions and 5 deletions

View File

@ -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()

View 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()

View 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

View 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
@ -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