<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 03/29/2016 10:31 AM, Vincent Huber wrote:<br>
    <blockquote
cite="mid:CAK+p5Jav63YQtgcqAyhXDZSv7o0csPA7bYNzJrMFbUWFSn0kSg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="markdown-here-wrapper" style="font-family:'Courier
          New'">
          <p style="margin:1.2em 0px!important">Hello everyone,</p>
          <p style="margin:1.2em 0px!important">In a <code style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;margin:0px 0.15em;padding:0px 0.15em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248)">CTest</code>
            process, I have to determine the <code style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;margin:0px 0.15em;padding:0px 0.15em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248)">Boost_VERSION</code>.<br>
            To do so, I just add <code style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;margin:0px 0.15em;padding:0px 0.15em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248)">FIND_PACKAGE(Boost)</code>
            to my configuration file.<br>
            I didn’t had any problems since a <code style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;margin:0px 0.15em;padding:0px 0.15em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248)">cmake</code>
            update on Debian/SID to cmake 3.5.0.</p>
          <p style="margin:1.2em 0px!important">From now, I have:<br>
            <code style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;margin:0px 0.15em;padding:0px 0.15em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248)">-- Looking for boost
CMake Error at /usr/share/cmake-3.5/Modules/FindBoost.cmake:896 (add_library):
  Unknown CMake command "add_library".
Call Stack (most recent call first):
  /home/vhuber/feelpp/cmake/dashboard/testsuite.cmake:328 (FIND_PACKAGE)</code>​</p>
          <p style="margin:1.2em 0px!important">​If I run a standard <code style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;margin:0px 0.15em;padding:0px 0.15em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248)">cmake</code>
            process with a <code style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;margin:0px 0.15em;padding:0px 0.15em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248)">FIND_PACKAGE(Boost)</code>
            everything goes well.</p>
          <p style="margin:1.2em 0px!important">I do not clearly
            understand what is going on.</p>
        </div>
      </div>
    </blockquote>
    <br>
    add_library() is used by an increasing number of find modules to
    define IMPORTED targets.<br>
    IMPORTED targets are the preferred and most convenient way to use
    libraries located by find modules.<br>
    <br>
    Since add_library() is only meaningful in build system definitions
    it is not available to ctest.<br>
    <br>
    <blockquote
cite="mid:CAK+p5Jav63YQtgcqAyhXDZSv7o0csPA7bYNzJrMFbUWFSn0kSg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="markdown-here-wrapper" style="font-family:'Courier
          New'">
          <p style="margin:1.2em 0px!important">​I do not have theses
            problems with cmake 3.4.3</p>
          <p style="margin:1.2em 0px!important">What can I do to solve
            that problem ?</p>
        </div>
      </div>
    </blockquote>
    <br>
    You haven't mentioned why you need to determine the Boost version in
    your ctest script but if you do still require it I would implement
    custom logic (you could base it on the existing logic in
    FindBoost.cmake).<br>
    <br>
    Using library find modules from any context other than cmake project
    files is ill defined even before the changes that introduced
    imported targets.<br>
    The boost find module specifically uses compiler and platform
    information that is not available in ctest scripts (e.g. boost
    library file names can be mangled differently depending on which
    compilers/versions are used and can be located differently depending
    on bitness).<br>
    <br>
    Nils<br>
    <br>
  </body>
</html>