On 11/03/13 08:57, Chandan Choudhury wrote:
>
>
>
> --
> Chandan kumar Choudhury
> NCL, Pune
> INDIA
>
>
> On Mon, Mar 11, 2013 at 1:19 PM, Michael Wild <[email protected]
> <mailto:[email protected]>> wrote:
>
>     On Mon, Mar 11, 2013 at 8:42 AM, Chandan Choudhury
>     <[email protected] <mailto:[email protected]>> wrote:
>
>         Thanks Michael for your quick reply.
>
>         I indeed tried the following command:
>         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 && make -j 12 && make install
>
>         But the suffix was not added to the executables. Might be I am
>         missing something or doing silly.
>
>         Kindly have a look.
>
>         Chandan
>
>
>         --
>         Chandan kumar Choudhury
>         NCL, Pune
>         INDIA
>
>
>         On Mon, Mar 11, 2013 at 12:34 PM, Michael Wild
>         <[email protected] <mailto:[email protected]>> wrote:
>
>             On Mon, Mar 11, 2013 at 7:56 AM, Chandan Choudhury
>             <[email protected] <mailto:[email protected]>> wrote:
>
>
>                 Dear cmake users,
>
>                 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.
>
>
>                 Chandan 
>
>
>             Just set the CMAKE_EXECUTABLE_SUFFIX variable in the CMake
>             cache. Be careful that on Windows this should include the
>             .exe suffix.
>
>             HTH
>
>             Michael
>
>
>
>     That's a bit difficult to debug remotely. Here a few hints:
>
>     * Look into the CMakeCache.txt file and verify that the
>     CMAKE_EXECUTABLE_SUFFIX is correct.
>
>  
> CMakeCache.txt contains the CMAKE_EXECUTABLE_SUFFIX entry as:
>
> //No help, variable specified on the command line.
> CMAKE_EXECUTABLE_SUFFIX:UNINITIALIZED=_461
>
>
>     * Grep the sources for this variable, it might be that one of the
>     CMakeLists.txt or *.cmake files overrides the cache entry.
>
>
> There is no entry of  CMAKE_EXECUTABLE_SUFFIX in CMakeLists.txt.
>
> Chandan
>
>
>     Michael
>
>
>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake

Hi,

Do you mean how to add it to the CMakeLists.txt files? I sometimes use
the target property OUTPUT_NAME:

add_executable(mybin ${sources})
set_target_properties(mybin PROPERTIES OUTPUT_NAME "mybin${BINARY_POSTFIX}")

Then, you can add your own suffix with:

cmake -DBINARY_POSTFIX=<suffix> ../

If there is any "official" cmake variables to use for this I am not
aware of it (but I am no cmake developer neither).

Cheers,
Yngve
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to