<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <br>
    <div class="moz-cite-prefix">On 11/03/13 08:57, Chandan Choudhury
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAHESojwVDhAc_40buoA_EcAoh_+nKeQbModZpPkc=X3haF5sjg@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra"><br clear="all">
          <div><br>
            --<br>
            Chandan kumar Choudhury<br>
            NCL, Pune<br>
            INDIA</div>
          <br>
          <br>
          <div class="gmail_quote">On Mon, Mar 11, 2013 at 1:19 PM,
            Michael Wild <span dir="ltr">&lt;<a moz-do-not-send="true"
                href="mailto:themiwi@gmail.com" target="_blank">themiwi@gmail.com</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div dir="ltr">
                <div class="gmail_extra">
                  <div>
                    <div class="h5">
                      <div class="gmail_quote">On Mon, Mar 11, 2013 at
                        8:42 AM, Chandan Choudhury <span dir="ltr">&lt;<a
                            moz-do-not-send="true"
                            href="mailto:iitdckc@gmail.com"
                            target="_blank">iitdckc@gmail.com</a>&gt;</span>
                        wrote:<br>
                        <blockquote class="gmail_quote"
                          style="margin:0px 0px 0px
                          0.8ex;border-left:1px solid
                          rgb(204,204,204);padding-left:1ex">
                          <div dir="ltr">
                            <div>
                              <div>
                                <div>Thanks Michael for your quick
                                  reply.<br>
                                  <br>
                                </div>
                                I indeed tried the following command:<br>
                                CMAKE_PREFIX_PATH=/soft/sudip/abc/apps/fftw-3.3.3
                                CC=icc cmake ..
                                -DCMAKE_INSTALL_PREFIX=/soft/sudip/abc/apps/gromacs/461
                                -DCMAKE_EXECUTABLE_SUFFIX=_461
                                &amp;&amp; make -j 12 &amp;&amp; make
                                install<br>
                                <br>
                              </div>
                              But the suffix was not added to the
                              executables. Might be I am missing
                              something or doing silly.<br>
                              <br>
                            </div>
                            <div>Kindly have a look.<span><font
                                  color="#888888"><br>
                                </font></span></div>
                            <span><font color="#888888">
                                <div>
                                  <br>
                                </div>
                                Chandan<br>
                              </font></span></div>
                          <div class="gmail_extra">
                            <div><br clear="all">
                              <div><br>
                                --<br>
                                Chandan kumar Choudhury<br>
                                NCL, Pune<br>
                                INDIA</div>
                              <br>
                              <br>
                            </div>
                            <div>
                              <div>
                                <div class="gmail_quote">On Mon, Mar 11,
                                  2013 at 12:34 PM, Michael Wild <span
                                    dir="ltr">&lt;<a
                                      moz-do-not-send="true"
                                      href="mailto:themiwi@gmail.com"
                                      target="_blank">themiwi@gmail.com</a>&gt;</span>
                                  wrote:<br>
                                  <blockquote class="gmail_quote"
                                    style="margin:0px 0px 0px
                                    0.8ex;border-left:1px solid
                                    rgb(204,204,204);padding-left:1ex">
                                    <div dir="ltr">
                                      <div class="gmail_extra">
                                        <div class="gmail_quote">
                                          <div>On Mon, Mar 11, 2013 at
                                            7:56 AM, Chandan Choudhury <span
                                              dir="ltr">&lt;<a
                                                moz-do-not-send="true"
                                                href="mailto:iitdckc@gmail.com"
                                                target="_blank">iitdckc@gmail.com</a>&gt;</span>
                                            wrote:<br>
                                            <blockquote
                                              class="gmail_quote"
                                              style="margin:0px 0px 0px
                                              0.8ex;border-left:1px
                                              solid
                                              rgb(204,204,204);padding-left:1ex">
                                              <div><br clear="all">
                                                <div>Dear cmake users,<br>
                                                  <br>
                                                </div>
                                                <div>I am very new to
                                                  cmake. I really find
                                                  it interesting. I
                                                  installed gromacs
                                                  (4.6.1) with it. One
                                                  simple query regarding
                                                  its usage is, how do I
                                                  add program suffix to
                                                  the executables
                                                  created.<br>
                                                  <br>
                                                  <br>
                                                </div>
                                                <div>Chandan&nbsp;</div>
                                              </div>
                                            </blockquote>
                                          </div>
                                          <div><br>
                                            Just set the
                                            CMAKE_EXECUTABLE_SUFFIX
                                            variable in the CMake cache.
                                            Be careful that on Windows
                                            this should include the .exe
                                            suffix.<br>
                                            <br>
                                            HTH<span><font
                                                color="#888888"><br>
                                                <br>
                                                Michael<br>
                                              </font></span></div>
                                        </div>
                                      </div>
                                    </div>
                                  </blockquote>
                                </div>
                                <br>
                              </div>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </div>
                  That's a bit difficult to debug remotely. Here a few
                  hints:<br>
                  <br>
                  * Look into the CMakeCache.txt file and verify that
                  the CMAKE_EXECUTABLE_SUFFIX is correct.<br>
                </div>
              </div>
            </blockquote>
            <div>&nbsp;</div>
            <div>CMakeCache.txt contains the CMAKE_EXECUTABLE_SUFFIX
              entry as:<br>
            </div>
            <div><br>
              //No help, variable specified on the command line.<br>
              CMAKE_EXECUTABLE_SUFFIX:UNINITIALIZED=_461<br>
              <br>
              <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 dir="ltr">
                <div class="gmail_extra">* Grep the sources for this
                  variable, it might be that one of the CMakeLists.txt
                  or *.cmake files overrides the cache entry.<span
                    class=""><font color="#888888"><br>
                    </font></span></div>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>There is no entry of&nbsp; CMAKE_EXECUTABLE_SUFFIX in
              CMakeLists.txt.<br>
              <br>
              Chandan<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 dir="ltr">
                <div class="gmail_extra"><span class=""><font
                      color="#888888">
                      <br>
                      Michael<br>
                    </font></span></div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">--

Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the CMake FAQ at: <a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></pre>
    </blockquote>
    <br>
    Hi,<br>
    <br>
    Do you mean how to add it to the CMakeLists.txt files? I sometimes
    use the target property OUTPUT_NAME:<br>
    <br>
    add_executable(mybin ${sources})<br>
    set_target_properties(mybin PROPERTIES OUTPUT_NAME
    "mybin${BINARY_POSTFIX}")<br>
    <br>
    Then, you can add your own suffix with:<br>
    <br>
    cmake -DBINARY_POSTFIX=&lt;suffix&gt; ../<br>
    <br>
    If there is any "official" cmake variables to use for this I am not
    aware of it (but I am no cmake developer neither).<br>
    <br>
    Cheers,<br>
    Yngve
  </body>
</html>