fix the ThreadLocal test in open source builds
authorAdam Simpkins <simpkins@fb.com>
Fri, 1 Jul 2016 22:02:40 +0000 (15:02 -0700)
committerFacebook Github Bot 8 <facebook-github-bot-8-bot@fb.com>
Fri, 1 Jul 2016 22:08:34 +0000 (15:08 -0700)
Summary:
The ThreadLocalTest has been broken in open source builds ever since D2678401,
because Makefile.am was never updated to build the helper shared library needed
by the test.

This updates Makefile.am to build the shared library.

Reviewed By: yfeldblum

Differential Revision: D3511125

fbshipit-source-id: 4684dbc32acf6ffbfc07079da91a1da480259502

folly/test/Makefile.am

index 787821bd877f9325e36d0c32dccc4ebc598ab9ed..1857b32bedc6750ded7b3d19072919d54790f6bb 100644 (file)
@@ -16,6 +16,7 @@ TESTS= \
 
 check_LTLIBRARIES = libfollytestmain.la libgtest.la
 check_PROGRAMS =
+noinst_LTLIBRARIES = lib_thread_local_test.la
 
 libgtest_la_CPPFLAGS = -Igtest-1.7.0 -Igtest-1.7.0/src
 libgtest_la_SOURCES = gtest-1.7.0/src/gtest-all.cc
@@ -30,6 +31,11 @@ libfollytestmain_la_SOURCES = $(libgtest_la_SOURCES) gtest-1.7.0/src/gtest_main.
 libfollytestmain_la_LIBADD = $(top_builddir)/libfolly.la
 endif
 
+lib_thread_local_test_la_CPPFLAGS = $(AM_CPPFLAGS)
+lib_thread_local_test_la_SOURCES = ThreadLocalTestLib.cpp
+lib_thread_local_test_la_LDFLAGS = -rpath /force_shared
+lib_thread_local_test_la_LIBADD = $(top_builddir)/libfolly.la
+
 noinst_HEADERS = FBStringTestBenchmarks.cpp.h \
        FBVectorTestBenchmarks.cpp.h