<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 9, 2019 at 9:38 AM hex <<a href="mailto:hex7c3@gmail.com">hex7c3@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <p>thank you J Decker for your reply.</p>
    <p><br>
    </p>
    <p>Your suggestion does work but I want to preserve standalone use
      of the project, meaning that I want a reference to CMake source
      root directory.<br>
    </p>
    <p>Assuming there is only 1 hierarchy I could add an option:</p>
    <p><br>
    </p>
    <p>if ( SUPERBUILD )</p>
    <p>    <i>message("${CMAKE_SOURCE_DIR}/.. =
        /home/user/super/ext1/..")</i></p>
    <p><i>else ()</i></p>
    <p><i>    </i><i><i>message("${CMAKE_SOURCE_DIR} =
          /home/user/super/ext1")</i></i></p>
    <p>endif ()</p>
    <p><br>
    </p>
    <p>I think the better solution now is to make it relative to build
      directory and force out of source builds. <br>
    </p>
    <p><br></p></div></blockquote><div>+1 I think; You said it was generated?  It should be in the build directory anyway :) <br></div><div>And out of source always.  (makes it easier to source version control)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF"><p>
    </p>
    <div class="gmail-m_3912050815095497693moz-cite-prefix">On 09/07/2019 14:26, J Decker wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr"><br>
        </div>
        <div class="gmail_quote">
          <div> </div>
          <div><i>message("${CMAKE_SOURCE_DIR}/.. =
              /home/user/super/ext1/..")</i>  which == /home/user/super</div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div bgcolor="#FFFFFF">
              <div class="gmail-m_3912050815095497693gmail-m_7999541161878854554moz-forward-container"><br>
                <br>
              </div>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
  </div>

-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div></div>