Skip to content

Commit 184042d

Browse files
ldemaillyFacebook Github Bot 1
authored andcommitted
wdt now explictly need linking with double-conversion (folly change)
Summary: wdt now explictly need linking with double-conversion (folly change) Reviewed By: ddrcoder Differential Revision: D3164303 fb-gh-sync-id: dde86dfe8ac2ad398ce7ddfe37846e0f64b0c219 fbshipit-source-id: dde86dfe8ac2ad398ce7ddfe37846e0f64b0c219
1 parent c4ac3f3 commit 184042d

File tree

6 files changed

+24
-15
lines changed

6 files changed

+24
-15
lines changed

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ include_directories(${Boost_INCLUDE_DIRS})
118118
# We use std:: threads
119119
find_package(Threads) # this will set ${CMAKE_THREAD_LIBS_INIT} (ie pthreads)
120120

121+
122+
# double-conversion
123+
find_path(DOUBLECONV_INCLUDE_DIR double-conversion/double-conversion.h)
124+
find_library(DOUBLECONV_LIBRARY double-conversion)
121125
# Glog
122126
find_path(GLOG_INCLUDE_DIR glog/logging.h)
123127
find_library(GLOG_LIBRARY glog)
@@ -134,6 +138,7 @@ target_link_libraries(wdt_min
134138
${GLOG_LIBRARY}
135139
${GFLAGS_LIBRARY}
136140
${Boost_LIBRARIES}
141+
${DOUBLECONV_LIBRARY}
137142
${OPENSSL_CRYPTO_LIBRARY}
138143
${CMAKE_THREAD_LIBS_INIT} # Must be last to avoid link errors
139144
)
@@ -195,12 +200,13 @@ if (NOT FOLLY_HAVE_BITS_FUNCTEXCEPT_H)
195200
endif()
196201

197202
add_library(folly4wdt ${FOLLY_CPP_SRC})
198-
target_link_libraries(folly4wdt ${GLOG_LIBRARY})
203+
target_link_libraries(folly4wdt ${GLOG_LIBRARY} ${DOUBLECONV_LIBRARY})
199204

200205
# Order is important - inside fb we want the above
201206
# folly-config.h to be picked up instead of the fbcode one
202207
include_directories(${CMAKE_CURRENT_BINARY_DIR})
203208
include_directories(${FOLLY_SOURCE_DIR})
209+
include_directories(${DOUBLECONV_INCLUDE_DIR})
204210
include_directories(${GLOG_INCLUDE_DIR})
205211
include_directories(${GFLAGS_INCLUDE_DIR})
206212
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)

build/BUILD.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ and avoid linking errors later or getting a wdt without flags working*
5656
git clone https://github.com/schuhschuh/gflags.git
5757
mkdir gflags/build
5858
cd gflags/build
59-
cmake -D GFLAGS_NAMESPACE=google -D BUILD_SHARED_LIBS=on ..
59+
cmake -DGFLAGS_NAMESPACE=google -DBUILD_SHARED_LIBS=on ..
6060
make -j && sudo make install
6161
```
6262

@@ -71,7 +71,8 @@ make -j && sudo make install
7171
*If double-conversion isn't available via apt-get:*
7272
```
7373
git clone https://github.com/floitsch/double-conversion.git
74-
cd double-conversion; cmake . ; make -j && sudo make install
74+
cd double-conversion; cmake . -DBUILD_SHARED_LIBS=on
75+
make -j && sudo make install
7576
```
7677

7778

build/travis_linux.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#! /bin/bash
2-
2+
# Script to setup the travis build env - changes here are likely needed
3+
# in wdt_cont_build_setup*.sh too
34
set -x
45
set -e
56

@@ -32,9 +33,9 @@ $HOME/bin/openssl version
3233
ldd $HOME/bin/openssl
3334
export OPENSSL_ROOT_DIR=$HOME
3435
git clone https://github.com/floitsch/double-conversion.git
35-
(cd double-conversion; cmake -DCMAKE_INSTALL_PREFIX=$HOME .; make -j 4 && make install)
36+
(cd double-conversion; cmake -DBUILD_SHARED_LIBS=on -DCMAKE_INSTALL_PREFIX=$HOME .; make -j 4 && make install)
3637
git clone https://github.com/schuhschuh/gflags.git
37-
(mkdir gflags/build; cd gflags/build; cmake -DCMAKE_INSTALL_PREFIX=$HOME -D GFLAGS_NAMESPACE=google -D BUILD_SHARED_LIBS=on .. && make -j 4 && make install)
38+
(mkdir gflags/build; cd gflags/build; cmake -DCMAKE_INSTALL_PREFIX=$HOME -DGFLAGS_NAMESPACE=google -DBUILD_SHARED_LIBS=on .. && make -j 4 && make install)
3839
svn checkout http://google-glog.googlecode.com/svn/trunk/ glog
3940
( cd glog && ./configure --with-gflags=$HOME --prefix=$HOME && make -j 4 && make install )
4041
git clone https://github.com/facebook/folly.git

build/travis_osx.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#! /bin/bash
2-
2+
# Sets up MacOS build environment (for travis but can be used on other mac too)
33
set -x
44
#set -e
55

6-
date
6+
date
77
uname -a
88
echo $HOSTNAME
99
mkdir $HOME/bin || true
@@ -22,13 +22,13 @@ which cmake
2222
cmake --version
2323
git clone https://github.com/floitsch/double-conversion.git
2424
mkdir double-conversion-build
25-
(cd double-conversion-build; cmake -DCMAKE_INSTALL_PREFIX=$HOME ../double-conversion; make -j 4 && make install)
25+
(cd double-conversion-build; cmake -DBUILD_SHARED_LIBS=on -DCMAKE_INSTALL_PREFIX=$HOME ../double-conversion; make -j 4 && make install)
2626
git clone https://github.com/schuhschuh/gflags.git
27-
(mkdir gflags-build; cd gflags-build; cmake -DCMAKE_INSTALL_PREFIX=$HOME -D GFLAGS_NAMESPACE=google -D BUILD_SHARED_LIBS=on ../gflags && make -j 4 && make install)
27+
(mkdir gflags-build; cd gflags-build; cmake -DCMAKE_INSTALL_PREFIX=$HOME -DGFLAGS_NAMESPACE=google -DBUILD_SHARED_LIBS=on ../gflags && make -j 4 && make install)
2828
svn checkout http://google-glog.googlecode.com/svn/trunk/ glog
2929
( cd glog && ./configure --with-gflags=$HOME --prefix=$HOME && make -j 4 && make install )
30-
git clone https://github.com/facebook/folly.git
31-
pwd ; ls -l
30+
git clone https://github.com/facebook/folly.git
31+
pwd ; ls -l
3232
cd wdt
3333
# to avoid svn clone errors of gmock later:
3434
( echo p | svn list https://googlemock.googlecode.com ) || true

build/wdt_cont_build_setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/bash
22
# A lot of this is facebook specific but can give an idea of how
3-
# to setup custom tests for WDT
3+
# to setup custom tests for WDT - Very similar to travis_linux.sh
44
# run this once and then _run will run a loop and email results
55
set -x
66
while sh -c "g++ --version | fgrep 4.4." ; do
@@ -40,9 +40,9 @@ ls -l $BINDIR/cmake
4040

4141
# similar as travis_linux.sh
4242
git clone https://github.com/floitsch/double-conversion.git
43-
(cd double-conversion; cmake -DCMAKE_INSTALL_PREFIX=$CDIR .; make -j 16 && make install)
43+
(cd double-conversion; cmake -DBUILD_SHARED_LIBS=on -DCMAKE_INSTALL_PREFIX=$CDIR .; make -j 16 && make install)
4444
git clone https://github.com/schuhschuh/gflags.git
45-
(mkdir gflags/build; cd gflags/build; cmake -DCMAKE_INSTALL_PREFIX=$CDIR -D GFLAGS_NAMESPACE=google -D BUILD_SHARED_LIBS=on .. && make -j 16 && make install)
45+
(mkdir gflags/build; cd gflags/build; cmake -DCMAKE_INSTALL_PREFIX=$CDIR -DGFLAGS_NAMESPACE=google -DBUILD_SHARED_LIBS=on .. && make -j 16 && make install)
4646
svn checkout http://google-glog.googlecode.com/svn/trunk/ glog
4747
( cd glog && ./configure --with-gflags=$CDIR --prefix=$CDIR && make -j 16 && make install )
4848
OPENSSL_VERSION=openssl-1.0.1q

build/wdt_cont_build_setup_opensource.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#! /bin/sh
2+
# Mac version of wdt_cont_build_setup.sh
23
set -x
34
set -e
45
CDIR=/data/users/${USER}_wdt_contbuild

0 commit comments

Comments
 (0)