<html style="direction: ltr;">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body bidimailui-charset-is-forced="true" style="direction: ltr;"
    text="#000000" bgcolor="#FFFFFF">
    <br>
    <div class="moz-cite-prefix">On 2/14/19 12:38 PM, Craig Scott wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+dygYku2fCFHqd600SJkSKPoiw9Bxge-FBYRzNc8DPWCknAUw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div>
            <div>I think you might be looking for the <a
href="https://cmake.org/cmake/help/latest/prop_tgt/LINK_DEPENDS_NO_SHARED.html"
                moz-do-not-send="true">LINK_DEPENDS_NO_SHARED</a> target
              property (or more likely its associated <a
href="https://cmake.org/cmake/help/latest/variable/CMAKE_LINK_DEPENDS_NO_SHARED.html"
                moz-do-not-send="true">CMAKE_LINK_DEPENDS_NO_SHARED</a> variable).</div>
          </div>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p>Following with my example, I've added the following line to the
      file Hello/CMakeLists.txt:</p>
    <p><br>
    </p>
    <p>set_target_properties(Hello PROPERTIES LINK_DEPENDS_NO_SHARED
      true)</p>
    <p><br>
    </p>
    <p>However it has no effect. Touching the file Hello/hello.cpp will
      still cause the "Linking CXX executable helloDemo" step to be
      performed.</p>
    <p>I've also tried adding the same line to the CMakeLists.txt file
      in the root directory, it also had no effect.</p>
    <p><br>
    </p>
    <p>Thank you,</p>
    <p><br>
    </p>
    <p>itay<br>
    </p>
  </body>
</html>