[Trilinos-Users] [EXTERNAL] Re: CMake-GUI <CONFIG>_POSTFIX variable

Perschbacher, Brent M bmpersc at sandia.gov
Mon Apr 8 14:02:39 MDT 2013


Tommy Binford,
  I'm sorry that I'd missed your previous question regarding this.

Those names that you list <CONFIG>_POSTFIX and <CONFIG>_OUTPUT_NAME are
not configure variables that you can pass in during the cmake configure.
Instead, they are target properties which can be set for targets in the
CMakeLists.txt files. However, to take advantage of them something has to
be done by the people who wrote the CMakeLists.txt files, in this case the
Trilinos developers. Right now we don't set very many properties for any
of our libraries and executables (cmake targets) and the <CONFIG>_POSTFIX
property is no exception. Unfortunately this means that right now there
isn't a way for you to pass in a variable during configure to get the name
mangling that you're looking for. However, this is something we could look
at adding though. This kind of change shouldn't be terribly difficult to
do, which means it is just a question of priority on when we can get to it.

The only solution I can think of that could be done right now would be to
manually rename the libraries that are built. However, it looks like you
are using Visual Studio so I'm guessing that it isn't just a simple copy
of the library to the name you want since the project files will care a
great deal about the names of things that it is going to generate.

I'm sorry I don't have a better option for you and again I'm sorry I
missed your previous email on this subject.

Brent

On 4/5/13 1:27 PM, "Tommy Binford" <tbinford at gmail.com> wrote:

>Ok.  Trying again.
>
>I'd like to put a 'd' at the end of the project target names when I
>compile with debug settings (amesosd.lib).  I'm using the CMake-GUI.
>According to CMake documentation:
>
>"There is also a <CONFIG>_OUTPUT_NAME that can set the output name on
>a per-configuration basis. <CONFIG>_POSTFIX sets a postfix for the
>real name of the target when it is built under the configuration named
>by <CONFIG> (in upper-case, such as "DEBUG_POSTFIX"). The value of
>this property is initialized when the target is created to the value
>of the variable CMAKE_<CONFIG>_POSTFIX (except for executable targets
>because earlier CMake versions which did not use this variable for
>executables)."
>
>Based on that, I should be able to set <CONFIG>_POSTFIX (where CONFIG
>is DEBUG or RELEASE, for instance).  When I configure and generate the
>MSVS 2010 project CMake warns that "DEBUG_POSTFIX" and
>"RELEASE_POSTFIX" were not used used by the project.  The warning in
>context is:
>
>***
>Finished configuring Trilinos!
>
>Configuring done
>Generating done
>CMake Warning:
>  Manually-specified variables were not used by the project:
>
>    DEBUG_POSTFIX
>    RELEASE_POSTFIX
>***
>
>How can I do this through CMake-GUI?  Perhaps I'm just using the
>variable incorrectly.
>
>Best,
>Tommy Binford
>
>On Fri, Feb 15, 2013 at 12:17 AM, Tommy Binford <tbinford at gmail.com>
>wrote:
>> Just a poke.  I really would like to know if this is possible.  If it
>> is, then I'm
>> doing something wrong.  I'd like to know what that is.
>>
>> If my question is not clear, then please let me know.  I'll try to do a
>>better
>> job of asking.
>>
>> TLB
>>
>>> I'd like to put a 'd' at the end of the project target names when I
>>> compile with debug settings (amesosd.lib).  I'm using the CMake-GUI.
>>> According to CMake documentation:
>>>
>>> "There is also a <CONFIG>_OUTPUT_NAME that can set the output name on
>>> a per-configuration basis. <CONFIG>_POSTFIX sets a postfix for the
>>> real name of the target when it is built under the configuration named
>>> by <CONFIG> (in upper-case, such as "DEBUG_POSTFIX"). The value of
>>> this property is initialized when the target is created to the value
>>> of the variable CMAKE_<CONFIG>_POSTFIX (except for executable targets
>>> because earlier CMake versions which did not use this variable for
>>> executables)."
>>>
>>> Based on that, I should be able to set <CONFIG>_POSTFIX (where CONFIG
>>> is DEBUG or RELEASE, for instance).  When I configure and generate the
>>> MSVS 2010 project CMake warns that "DEBUG_POSTFIX" and
>>> "RELEASE_POSTFIX" were not used used by the project.  The warning in
>>> context is:
>>>
>>> ***
>>> Finished configuring Trilinos!
>>>
>>> Configuring done
>>> Generating done
>>> CMake Warning:
>>>   Manually-specified variables were not used by the project:
>>>
>>>     DEBUG_POSTFIX
>>>     RELEASE_POSTFIX
>>> ***
>>>
>>> How can I do this through CMake-GUI?  Perhaps I'm just using the
>>> variable incorrectly.  By the way, I don't want to use a shell script
>>> for this.
>>>
>>> Best,
>>> Tommy Binford
>_______________________________________________
>Trilinos-Users mailing list
>Trilinos-Users at software.sandia.gov
>http://software.sandia.gov/mailman/listinfo/trilinos-users




More information about the Trilinos-Users mailing list