[CMake] adding program suffix

Chandan Choudhury iitdckc at gmail.com
Mon Mar 11 05:49:22 EDT 2013


Dear Micheal, Yngve Decker and Eric

Thank for remarks.

Micheal you are right that I want to append a suffix to every executable
being installed.
I already have an earlier version of gromacs installed, the suffix would
help me to distinguish the between the two.

While looking out for the string "SUFFIX" in the CMakeCache.txt, I
encountered a phrase as

//Suffix for GROMACS binaries (default: _d for double, _mpi for
// MPI, _mpi_d for MPI and double).
GMX_BINARY_SUFFIX:STRING=

What I can understand is if I use the following command it might serve the
purpose.

CMAKE_PREFIX_PATH=/soft/sudip/abc/apps/fftw-3.3.3
*GMX_BINARY_SUFFIX=_472*CC=icc cmake ..
-DCMAKE_INSTALL_PREFIX=/soft/sudip/abc/apps/gromacs/461
-DCMAKE_EXECUTABLE_SUFFIX=_461 && make -j 12 && make install

Chandan



--
Chandan kumar Choudhury
NCL, Pune
INDIA


On Mon, Mar 11, 2013 at 2:26 PM, Yngve Inntjore Levinsen <
yngve.levinsen at gmail.com> wrote:

>
> On 11/03/13 09:24, Eric Noulard wrote:
> > I think Chandan meant "globally" for all executables.
> >
> > That's the purpose of CMAKE_EXECUTABLE_SUFFIX
> > as already pointed  out by Michael.
> >
> > see : cmake --help-variable "CMAKE_EXECUTABLE_SUFFIX"
> >
> > Now it doesn't seems to work for Chandan.
> >
> > I guess the variable is forcibly written by "CMakeGenericSystem.cmake"
> > during early CMake startup.
> > So that you cannot overwrite its value on the command line.
> > try to add "variable_watch(CMAKE_EXECUTABLE_SUFFIX)" at the very top
> > of main CMakeLists.txt
> >
> > You may try to do that from within the CMakeLists.txt after the
> > "project(...)" statement (or enable_language)
>
> Hi,
>
> Yes I tried to set the same variable on my machine but does not work
> here neither (Linux). Perhaps this only works for platforms where this
> variable is traditionally non-empty?
>
> As also Michael pointed out, this would not really be a solution for
> non-developers of a software for sure (and I now see Chandan said it was
> a question regarding usage).
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130311/04d410c9/attachment.htm>


More information about the CMake mailing list