diff options
Diffstat (limited to 'unittests/Makefile.unittest')
-rw-r--r-- | unittests/Makefile.unittest | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/unittests/Makefile.unittest b/unittests/Makefile.unittest index 9a75b2c2eb8f..580ad7d71918 100644 --- a/unittests/Makefile.unittest +++ b/unittests/Makefile.unittest @@ -14,7 +14,9 @@ # Set up variables for building a unit test. ifdef TESTNAME +ifndef MAKEFILE_UNITTEST_NO_INCLUDE_COMMON include $(LEVEL)/Makefile.common +endif LLVMUnitTestExe = $(BuildMode)/$(TESTNAME)Tests$(EXEEXT) @@ -35,9 +37,11 @@ endif TESTLIBS = -lGoogleTest -lUnitTestMain ifeq ($(ENABLE_SHARED), 1) - # Add the absolute path to the dynamic library. This is ok because - # we'll never install unittests. - LD.Flags += $(RPATH) -Wl,$(SharedLibDir) + ifneq (,$(RPATH)) + # Add the absolute path to the dynamic library. This is ok because + # we'll never install unittests. + LD.Flags += $(RPATH) -Wl,$(SharedLibDir) + endif # Also set {DYLD,LD}_LIBRARY_PATH because OSX ignores the rpath most # of the time. Run.Shared := $(SHLIBPATH_VAR)="$(SharedLibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)" |