build/unittests: Fix llvm-config names for gtest libraries, and bring Makefile
authorDaniel Dunbar <daniel@zuster.org>
Thu, 15 Dec 2011 23:35:08 +0000 (23:35 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 15 Dec 2011 23:35:08 +0000 (23:35 +0000)
library names in line with those used by CMake.
 - Patch by Johannes Obermayr, with tweaks by me.

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

unittests/Makefile.unittest
utils/llvm-build/llvmbuild/main.py
utils/unittest/UnitTestMain/Makefile
utils/unittest/googletest/Makefile

index 580ad7d71918fe289a07264b7cb2e84b3326f2fc..bd32aed4b0a2e4c39a8f5521ce04ab815b253b29 100644 (file)
@@ -34,7 +34,7 @@ ifneq ($(HAVE_PTHREAD), 1)
   CPP.Flags += -DGTEST_HAS_PTHREAD=0
 endif
 
-TESTLIBS = -lGoogleTest -lUnitTestMain
+TESTLIBS = -lgtest -lgtest_main
 
 ifeq ($(ENABLE_SHARED), 1)
   ifneq (,$(RPATH))
index 2d7db04621238fb14c6b38eb366824f6795fe8f4..36bca872e5f1f51db65300adfa909aa3f228614d 100644 (file)
@@ -329,7 +329,7 @@ subdirectories = %s
             
             # Get the library name, or None for LibraryGroups.
             if c.type_name == 'Library':
-                library_name = c.get_library_name()
+                library_name = c.get_prefixed_library_name()
             else:
                 library_name = None
 
@@ -391,9 +391,7 @@ subdirectories = %s
             if library_name is None:
                 library_name_as_cstr = '0'
             else:
-                # If we had a project level component, we could derive the
-                # library prefix.
-                library_name_as_cstr = '"libLLVM%s.a"' % library_name
+                library_name_as_cstr = '"lib%s.a"' % library_name
             print >>f, '  { "%s", %s, { %s } },' % (
                 name, library_name_as_cstr,
                 ', '.join('"%s"' % dep
index 30827795aff9795c3a5d355186067fed6687721a..7bcb7249504925e943e06891c841f9dab59eaa5f 100644 (file)
@@ -11,7 +11,7 @@ LEVEL = ../../..
 
 include $(LEVEL)/Makefile.config
 
-LIBRARYNAME = UnitTestMain
+LIBRARYNAME = gtest_main
 BUILD_ARCHIVE = 1
 REQUIRES_RTTI = 1
 
index 21b29ffc2c3a8659d7cd10840321c17b5faed639..22c8f36fccb69d62ba484434a276914b7b1cd8de 100644 (file)
@@ -11,7 +11,7 @@ LEVEL := ../../..
 
 include $(LEVEL)/Makefile.config
 
-LIBRARYNAME = GoogleTest
+LIBRARYNAME = gtest
 BUILD_ARCHIVE = 1
 REQUIRES_RTTI = 1