[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    [CMake] How to link against PIC version of a library's dependency in CMake?
From:       Steve Lorimer <steve.lorimer () gmail ! com>
Date:       2016-08-28 21:17:58
Message-ID: CAE-NPOhapgrGBkT_U_wKO6-kNkFxOxBhhXit2S7gHZFNUFFPLg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


*CMake:*

We have a dependency on cpp-netlib <http://cpp-netlib.org/>.

We build it from source as part of our build system.

cpp-netlib/CMakeLists.txt:

add_library(cpp-netlib
    STATIC
    ${SRCS})

For one particular use case, we have to use it in a shared library, so I've
created a second library with -fPIC enabled:

add_library(cpp-netlib_pic
    STATIC
    ${SRCS})
set_property(TARGET cpp-netlib_pic PROPERTY POSITION_INDEPENDENT_CODE)

In my shared library target, I then link against libcpp-netlib_pic.a

foo/CMakeLists.txt:

add_library(foo
    SHARED
    ${SRCS})
target_link_libraries(foo cpp-netlib_pic)

I'm getting a linker error back because cpp-netlib is trying to link
against the non-pic version of boost_network

/usr/bin/ld: ../third_party/cpp-netlib/libcpp-netlib_pic.a(client.cpp.o): \
    relocation R_X86_64_32 against
`_ZTVN5boost7network4http4impl15normal_delegateE' \
    can not be used when making a shared object; recompile with -fPIC

Demangled name:

$ c++filt _ZTVN5boost7network4http4impl15normal_delegateE
vtable for boost::network::http::impl::normal_delegate

------------------------------

*Boost Build:*

This is all part of migrating our existing build system from boost-build to
CMake.

The boost-build Jamfiles work fine.

Jamroot:

variant pic : release : <cxxflags>-fPIC ;

cpp-netlib/Jamfile:

lib cpp-netlib : [ glob src/*.cpp ]
;

foo/Jamfile:

shared-lib foo: [ glob *.cpp ]
  /ext/cpp-netlib//cpp-netlib/<variant>pic: <link>shared
  <cxxflags>-fPIC;

This works.

Note there is no mention of boost::network anywhere, although there is a
subfolder in cpp-netlib/boost/library, but it contains headers only.
------------------------------

*Question:*

How do I tell CMake that cpp-netlib_pic needs to use the pic version of
boost_network?

[Attachment #5 (text/html)]

<div dir="ltr"><p style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px"><strong \
style="margin:0px;padding:0px;border:0px">CMake:</strong></p><p style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px">We have a dependency on  <a \
href="http://cpp-netlib.org/" rel="nofollow" \
style="margin:0px;padding:0px;border:0px;color:rgb(0,89,153);text-decoration:none">cpp-netlib</a>.</p><p \
style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px">We build it from source as part \
of our build system.</p><p style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px"><code \
style="margin:0px;padding:1px \
5px;border:0px;font-size:13px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">cpp-netlib/CMakeLists.txt</code>:</p><pre \
class="" style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px \
;width:auto;max-height:600px;overflow:auto;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(239,240,241)"><code \
style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:inherit"><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">add_library</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">(</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">cpp</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">netlib  STATIC
    $</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">{</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">SRCS</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">})</span></code></pre><p \
style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px">For one particular use case, we \
have to use it in a shared library, so I&#39;ve created a second library with  <code \
style="margin:0px;padding:1px \
5px;border:0px;font-size:13px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">-fPIC</code> \
enabled:</p><pre class="" \
style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(239,240,241)"><code \
style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:inherit"><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">add_library</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">(</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">cpp</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">netlib_pic  \
STATIC  $</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">{</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">SRCS</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">})</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> \
set_property</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">(</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">TARGET cpp</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">netlib_pic \
PROPERTY POSITION_INDEPENDENT_CODE</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">)</span></code></pre><p \
style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px">In my shared library target, I \
then link against  <code style="margin:0px;padding:1px \
5px;border:0px;font-size:13px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">libcpp-netlib_pic.a</code></p><p \
style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px"><code \
style="margin:0px;padding:1px \
5px;border:0px;font-size:13px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">foo/CMakeLists.txt</code>:</p><pre \
class="" style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px \
;width:auto;max-height:600px;overflow:auto;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(239,240,241)"><code \
style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:inherit"><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">add_library</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">(</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">foo  SHARED
    $</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">{</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">SRCS</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">})</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> \
target_link_libraries</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">(</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">foo cpp</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">netlib_pic</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">)</span></code></pre><p \
style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px">I&#39;m getting a linker error \
back because  <code style="margin:0px;padding:1px \
5px;border:0px;font-size:13px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">cpp-netlib</code> \
is trying to link against the non-pic version of  <code style="margin:0px;padding:1px \
5px;border:0px;font-size:13px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">boost_network</code></p><pre \
class="" style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px \
;width:auto;max-height:600px;overflow:auto;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(239,240,241)"><code \
style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:inherit"><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">/</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">usr</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">/</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">bin</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">/</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">ld</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">:</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> </span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">../</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">third_party</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">/</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">cpp</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">netlib</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">/</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">libcpp</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">netlib_pic</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">.</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">a</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">(</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">client</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">.</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">cpp</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">.</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">o</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">):</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> \  relocation \
R_X86_64_32 against </span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">`</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">_ZTVN5boost7network4http4impl15normal_delegateE</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(125,39,39)">&#39;</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> \  can not be \
used when making a shared object</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">;</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> recompile with \
</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">fPIC</span></code></pre><p \
style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px">Demangled name:</p><pre class="" \
style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(239,240,241)"><code \
style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:inherit"><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">$ c</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">++</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">filt \
_ZTVN5boost7network4http4impl15normal_delegateE vtable </span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(16,16,148)">for</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> \
boost</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">::</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">network</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">::</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">http</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">::</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">impl</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">::</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">normal_delegate</span></code></pre><hr \
style="border:0px;color:rgb(214,217,220);height:1px;margin-bottom:20px;font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;font-size:15px;line-height:19.5px;background-color:rgb(214,217,220)"><p \
style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px"><strong \
style="margin:0px;padding:0px;border:0px">Boost Build:</strong></p><p \
style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px">This is all part of migrating our \
existing build system from boost-build to CMake.</p><p style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px">The boost-build Jamfiles work \
fine.</p><p style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px"><code \
style="margin:0px;padding:1px \
5px;border:0px;font-size:13px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">Jamroot</code>:</p><pre \
class="" style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px \
;width:auto;max-height:600px;overflow:auto;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(239,240,241)"><code \
style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:inherit"><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">variant pic \
</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">:</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> release </span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">:</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> </span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(125,39,39)">&lt;cxxflags&gt;</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">fPIC \
</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">;</span></code></pre><p \
style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px"><code \
style="margin:0px;padding:1px \
5px;border:0px;font-size:13px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">cpp-netlib/Jamfile</code>:</p><pre \
class="" style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px \
;width:auto;max-height:600px;overflow:auto;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(239,240,241)"><code \
style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:inherit"><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">lib cpp</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">netlib  \
</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">:</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> </span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">[</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> glob src</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(133,140,147)">/*.cpp ] \
;</span></code></pre><p style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px"><code \
style="margin:0px;padding:1px \
5px;border:0px;font-size:13px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">foo/Jamfile</code>:</p><pre \
class="" style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px \
;width:auto;max-height:600px;overflow:auto;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(239,240,241)"><code \
style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:inherit"><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">shared</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">lib foo \
</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">:</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> </span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">[</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> glob </span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">*.</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">cpp \
</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">]</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">  </span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">/</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">ext</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">/</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">cpp</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">netlib</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(133,140,147)">//cpp-netlib/&lt;variant&gt;pic</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> </span><span \
  </span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(125,39,39)">&lt;cxxflags&gt;</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">-</span><span \
class="" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">fPIC \
</span><span class="" \
style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">;</span></code></pre><p \
style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px">This works.</p><p \
style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px">Note there is no mention of  \
<code style="margin:0px;padding:1px \
5px;border:0px;font-size:13px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">boost::network</code> \
anywhere, although there is a subfolder in  <code style="margin:0px;padding:1px \
5px;border:0px;font-size:13px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">cpp-netlib/boost/library</code>, \
but it contains headers only.</p><hr \
style="border:0px;color:rgb(214,217,220);height:1px;margin-bottom:20px;font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;font-size:15px;line-height:19.5px;background-color:rgb(214,217,220)"><p \
style="margin:0px 0px \
1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px"><strong \
style="margin:0px;padding:0px;border:0px">Question:</strong></p><p style="margin:0px \
0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,&quot;Helvetica \
Neue&quot;,Helvetica,sans-serif;line-height:19.5px">How do I tell CMake that  <code \
style="margin:0px;padding:1px \
5px;border:0px;font-size:13px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">cpp-netlib_pic</code> \
needs to use the pic version of  <code style="margin:0px;padding:1px \
5px;border:0px;font-size:13px;font-family:Consolas,Menlo,Monaco,&quot;Lucida \
Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier \
New&quot;,monospace,sans-serif;white-space:pre-wrap;background-color:rgb(239,240,241)">boost_network</code>?</p></div>




-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic