Re: [CMake] adding program suffix

2013-03-14 Thread Chandan Choudhury
Dear All,

I finally succeeded in installing gromacs 4.6.1 with prefix.
Michael you were right, I need to set GMS_DEFAULT_SUFFIX to FALSE.
Following is the command line option used :
CMAKE_PREFIX_PATH=/soft/sudip/abc/apps/fftw-3.3.3 CC=icc cmake ..
-DCMAKE_INSTALL_PREFIX=/soft/sudip/abc/apps/gromacs/461
-DGMX_BINARY_SUFFIX=_4.6.1 -DGMX_LIBS_SUFFIX=_4.6.1
-DGMX_DEFAULT_SUFFIX=OFF && make -j 12 && make install

Thank you for your responses.

Chandan



--
Chandan kumar Choudhury
NCL, Pune
INDIA


On Mon, Mar 11, 2013 at 3:30 PM, Yngve Inntjore Levinsen <
yngve.levin...@gmail.com> wrote:

>  Hi,
>
> I don't think the CMAKE_EXECUTABLE_SUFFIX will have any more effect for
> you this time, and if it did you would probably get
>
> binary_472_461 in this particular case.
>
> Otherwise yes, I believe using GMX_BINARY_SUFFIX should do the trick (had
> a quick look at the source).
>
> Generally for cmake projects you can check which options are available
> using either the graphical interface, or using ccmake after you have
> configured:
>
> cmake ../
> ccmake .
>
> Cheers,
> Yngve
>
>
> On 11/03/13 10:49, Chandan Choudhury wrote:
>
>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.levin...@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
>>
>
>
>
> --
>
> 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
>
>
>
> --
>
> 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
>
--

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

Re: [CMake] adding program suffix

2013-03-11 Thread Yngve Inntjore Levinsen
Hi,

I don't think the CMAKE_EXECUTABLE_SUFFIX will have any more effect for
you this time, and if it did you would probably get

binary_472_461 in this particular case.

Otherwise yes, I believe using GMX_BINARY_SUFFIX should do the trick
(had a quick look at the source).

Generally for cmake projects you can check which options are available
using either the graphical interface, or using ccmake after you have
configured:

cmake ../
ccmake .

Cheers,
Yngve

On 11/03/13 10:49, Chandan Choudhury wrote:
> 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
> mailto:yngve.levin...@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
>
>
>
>
> --
>
> 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

--

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

Re: [CMake] adding program suffix

2013-03-11 Thread Michael Wild
Looking at the sources, it seems that you also need to set
GMX_DEFAULT_SUFFIX to FALSE in order for this to work.

Michael


On Mon, Mar 11, 2013 at 10:49 AM, Chandan Choudhury wrote:

> 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.levin...@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
>>
>
>
> --
>
> 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
>
--

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

Re: [CMake] adding program suffix

2013-03-11 Thread Chandan Choudhury
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.levin...@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
>
--

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

Re: [CMake] adding program suffix

2013-03-11 Thread Yngve Inntjore Levinsen

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


Re: [CMake] adding program suffix

2013-03-11 Thread Michael Wild
That's not what Chandan wants to achieve. He wants to have a suffix
appended to every executable being installed, so he can have different
versions installed and select among them through the suffix. Think gcc-4.4,
gcc-4.6 and gcc-4.7 being present on your system.


On Mon, Mar 11, 2013 at 9:27 AM, J Decker  wrote:

>
>
> On Mon, Mar 11, 2013 at 1:24 AM, Michael Wild  wrote:
>
>>
>>
>>
>> On Mon, Mar 11, 2013 at 9:20 AM, J Decker  wrote:
>>
>>>
>>>
>>> On Sun, Mar 10, 2013 at 11:56 PM, Chandan Choudhury 
>>> 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.


>>>SET_TARGET_PROPERTIES(  PROPERTIES
>>>   SUFFIX ".different.suffix" )
>>>
>>>
>>>

 Chandan

>>>
>> IMHO this is not they way to go about this problem if you're not the
>> developer of the software... It might be the last resort if the developers
>> were not careful enough to allow users to override the program suffix, but
>> IMHO this should be configurable through the cache.
>>
>> Sure; but should be implemented on a per target basis, and certainly not
> globally.  I've had great success just chaining other CMake based projects
> into my builds, if they don't do rude things like set global library
> suffixes that end up propagating through previuosly working projects.
>
>
>> 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

Re: [CMake] adding program suffix

2013-03-11 Thread J Decker
On Mon, Mar 11, 2013 at 1:24 AM, Michael Wild  wrote:

>
>
>
> On Mon, Mar 11, 2013 at 9:20 AM, J Decker  wrote:
>
>>
>>
>> On Sun, Mar 10, 2013 at 11:56 PM, Chandan Choudhury 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.
>>>
>>>
>>SET_TARGET_PROPERTIES(  PROPERTIES
>>   SUFFIX ".different.suffix" )
>>
>>
>>
>>>
>>> Chandan
>>>
>>
> IMHO this is not they way to go about this problem if you're not the
> developer of the software... It might be the last resort if the developers
> were not careful enough to allow users to override the program suffix, but
> IMHO this should be configurable through the cache.
>
> Sure; but should be implemented on a per target basis, and certainly not
globally.  I've had great success just chaining other CMake based projects
into my builds, if they don't do rude things like set global library
suffixes that end up propagating through previuosly working projects.


> 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

Re: [CMake] adding program suffix

2013-03-11 Thread Michael Wild
On Mon, Mar 11, 2013 at 9:20 AM, J Decker  wrote:

>
>
> On Sun, Mar 10, 2013 at 11:56 PM, Chandan Choudhury 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.
>>
>>
>SET_TARGET_PROPERTIES(  PROPERTIES
>   SUFFIX ".different.suffix" )
>
>
>
>>
>> Chandan
>>
>
IMHO this is not they way to go about this problem if you're not the
developer of the software... It might be the last resort if the developers
were not careful enough to allow users to override the program suffix, but
IMHO this should be configurable through the cache.

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

Re: [CMake] adding program suffix

2013-03-11 Thread Eric Noulard
2013/3/11 Yngve Inntjore Levinsen :
> On 11/03/13 08:57, Chandan Choudhury wrote:

>
>
> 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= ../
>
> If there is any "official" cmake variables to use for this I am not aware of
> it (but I am no cmake developer neither).

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)

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

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


Re: [CMake] adding program suffix

2013-03-11 Thread J Decker
On Sun, Mar 10, 2013 at 11:56 PM, Chandan Choudhury 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.
>
>
   SET_TARGET_PROPERTIES(  PROPERTIES
  SUFFIX ".different.suffix" )



>
> Chandan
> --
> Chandan kumar Choudhury
> NCL, Pune
> INDIA
>
> --
>
> 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
>
--

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

Re: [CMake] adding program suffix

2013-03-11 Thread Yngve Inntjore Levinsen


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  > wrote:
>
> On Mon, Mar 11, 2013 at 8:42 AM, Chandan Choudhury
> mailto:iitd...@gmail.com>> 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
> mailto:them...@gmail.com>> wrote:
>
> On Mon, Mar 11, 2013 at 7:56 AM, Chandan Choudhury
> mailto:iitd...@gmail.com>> 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= ../

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

Re: [CMake] adding program suffix

2013-03-11 Thread Chandan Choudhury
--
Chandan kumar Choudhury
NCL, Pune
INDIA


On Mon, Mar 11, 2013 at 1:19 PM, Michael Wild  wrote:

> On Mon, Mar 11, 2013 at 8:42 AM, Chandan Choudhury 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  wrote:
>>
>>> On Mon, Mar 11, 2013 at 7:56 AM, Chandan Choudhury 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

Re: [CMake] adding program suffix

2013-03-11 Thread Michael Wild
On Mon, Mar 11, 2013 at 8:42 AM, Chandan Choudhury 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  wrote:
>
>> On Mon, Mar 11, 2013 at 7:56 AM, Chandan Choudhury 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.
* Grep the sources for this variable, it might be that one of the
CMakeLists.txt or *.cmake files overrides the cache entry.

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

Re: [CMake] adding program suffix

2013-03-11 Thread Chandan Choudhury
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  wrote:

> On Mon, Mar 11, 2013 at 7:56 AM, Chandan Choudhury 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
>
--

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

Re: [CMake] adding program suffix

2013-03-11 Thread Michael Wild
On Mon, Mar 11, 2013 at 7:56 AM, Chandan Choudhury 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
--

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

[CMake] adding program suffix

2013-03-10 Thread Chandan Choudhury
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
--
Chandan kumar Choudhury
NCL, Pune
INDIA
--

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