Re: [CMake] COMPILE_FLAGS property that appends instead of replaces

2012-02-06 Thread Robert Dailey
AppendIfMissing(_outvar ${_varName} ${_value})* > > * * > > * foreach(_arg IN LISTS ARGN)* > > *set(_desc "${_desc} ${_arg}")* > > * endforeach()* > > * * > > * set(${_varName} "${_outvar}" CACHE ${_type} "${_desc}")* > >

Re: [CMake] COMPILE_FLAGS property that appends instead of replaces

2012-02-06 Thread aaron . meadows
_varName} ${_value}) foreach(_arg IN LISTS ARGN) set(_desc "${_desc} ${_arg}") endforeach() set(${_varName} "${_outvar}" CACHE ${_type} "${_desc}") endfunction(CheckAndAppendCache) Aaron Meadows From: cmake-boun...@cmake.org [mailto:cmake-boun..

[CMake] COMPILE_FLAGS property that appends instead of replaces

2012-02-06 Thread Robert Dailey
I would like to set the COMPILE_FLAGS property multiple times on the same target through set_target_properties(), however only the last call seems to persist. Previous flags set get overridden. Is this the correct behavior? If so, is there a way to make this property append instead of replace on th

Re: [CMake] COMPILE_FLAGS on per target and per configuration basis

2008-03-24 Thread Timenkov Yuri
On Monday 24 March 2008 21:20:45 Ilya Shvetsov wrote: > On Mon, 24 Mar 2008 20:02:27 +0200, Timenkov Yuri > > <[EMAIL PROTECTED]> wrote: > >> May be exist some way do the same with COMPILE_FLAGS ? > > > > I do it following way: > > set_source_files_properties( > > ${MyTarget_SRCS} > > PROPE

Re: [CMake] COMPILE_FLAGS on per target and per configuration basis

2008-03-24 Thread Ilya Shvetsov
On Mon, 24 Mar 2008 20:02:27 +0200, Timenkov Yuri <[EMAIL PROTECTED]> wrote: May be exist some way do the same with COMPILE_FLAGS ? I do it following way: set_source_files_properties( ${MyTarget_SRCS} PROPERTIES COMPILE_FLAGS "/J /Zc:wchar_t" ) Problem still exist.

Re: [CMake] COMPILE_FLAGS on per target and per configuration basis

2008-03-24 Thread Timenkov Yuri
On Monday 24 March 2008 20:42:46 Ilya Shvetsov wrote: > Hi, all. > > I need define some compile flags for my targets. This flags deepend on > config tipe. > With LINK_FLAGS I can do this very simple. I can write just > > set_target_properties(target1 PROPERTIES > LINKER_FLAGS_FINAL "som

[CMake] COMPILE_FLAGS on per target and per configuration basis

2008-03-24 Thread Ilya Shvetsov
Hi, all. I need define some compile flags for my targets. This flags deepend on config tipe. With LINK_FLAGS I can do this very simple. I can write just set_target_properties(target1 PROPERTIES LINKER_FLAGS_FINAL "some flags for target1") set_target_properties(target2 PROPERTI

RE: [CMake] COMPILE_FLAGS

2007-03-27 Thread Kishore, Jonnalagadda (IE10)
> Kishore, Jonnalagadda (IE10) wrote: > >> KJI> This would have worked just fine except that INCLUDE_DIRECTORIES > >> returns > >> KJI> semicolon separated list of directory names not a space separated > >> list > >> > >> Seems to be true for any list oft values as I experienced also. Is it > >> tr

Re: [CMake] COMPILE_FLAGS

2007-03-27 Thread Filipe Sousa
Kishore, Jonnalagadda (IE10) wrote: >> KJI> This would have worked just fine except that INCLUDE_DIRECTORIES >> returns >> KJI> semicolon separated list of directory names not a space separated >> list >> >> Seems to be true for any list oft values as I experienced also. Is it >> true content or on

RE: [CMake] COMPILE_FLAGS

2007-03-27 Thread Kishore, Jonnalagadda (IE10)
> KJI> This would have worked just fine except that INCLUDE_DIRECTORIES > returns > KJI> semicolon separated list of directory names not a space separated > list > > Seems to be true for any list oft values as I experienced also. Is it > true content or only the formatting of the MESSAGE() command

Re: [CMake] COMPILE_FLAGS

2007-03-27 Thread Michael Bieber
KJI> This would have worked just fine except that INCLUDE_DIRECTORIES returns KJI> semicolon separated list of directory names not a space separated list Seems to be true for any list oft values as I experienced also. Is it true content or only the formatting of the MESSAGE() command? Micha --

RE: [CMake] COMPILE_FLAGS

2007-03-26 Thread Kishore, Jonnalagadda (IE10)
> > Kishore, Jonnalagadda (IE10) wrote: > > > Is there a variable with all the compile options concatenated? A > > > variable with common CMAKE_C_FLAGS + > CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE} + > > > ADD_DEFINITIONS() + INCLUDE_DIRECTORIES? > > > > > > > > > > > > I am looking for this for passing th

RE: [CMake] COMPILE_FLAGS

2007-03-26 Thread Kishore, Jonnalagadda (IE10)
> Kishore, Jonnalagadda (IE10) wrote: > > Is there a variable with all the compile options concatenated? A > > variable with common CMAKE_C_FLAGS + CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE} + > > ADD_DEFINITIONS() + INCLUDE_DIRECTORIES? > > > > > > > > I am looking for this for passing them to the assemble

Re: [CMake] COMPILE_FLAGS

2007-03-26 Thread kitts
On Monday 26 Mar 2007 at 11:08:07 pm, Filipe Sousa wrote: > > What are variables where the information for each of the above is > > stored? Especially for ADD_DEFINITIONS and INCLUDE_DIRECTORIES. > > GET_DIRECTORY_PROPERTY(defs DEFINITIONS) > GET_DIRECTORY_PROPERTY(includes INCLUDE_DIRECTORIES) I

Re: [CMake] COMPILE_FLAGS

2007-03-26 Thread Filipe Sousa
Kishore, Jonnalagadda (IE10) wrote: > Is there a variable with all the compile options concatenated? A > variable with common CMAKE_C_FLAGS + CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE} + > ADD_DEFINITIONS() + INCLUDE_DIRECTORIES? > > > > I am looking for this for passing them to the assembler macro wher

[CMake] COMPILE_FLAGS

2007-03-26 Thread Kishore, Jonnalagadda (IE10)
Is there a variable with all the compile options concatenated? A variable with common CMAKE_C_FLAGS + CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE} + ADD_DEFINITIONS() + INCLUDE_DIRECTORIES? I am looking for this for passing them to the assembler macro where I use ADD_CUSTOM_COMMAND. What are variables

Re: [CMake] COMPILE_FLAGS suggestion

2006-02-16 Thread Brandon J. Van Every
Brad King wrote: As things become more target oriented the SET_TARGET_PROPERTIES command will be used more frequently. Eventually a nicer interface should be available to set these properties but that interface will be determined on a per-property basis. I just don't want to jump the gun a

Re: [CMake] COMPILE_FLAGS suggestion

2006-02-16 Thread Brad King
Brandon J. Van Every wrote: Since you only implemented per-target flags recently, your perception is probably that it's uncommon. Instead you're probably thinking that everyone makes *.h files and subdirectories. In CMake's earliest days it was part of a project that had one library per dir

Re: [CMake] COMPILE_FLAGS suggestion

2006-02-16 Thread Brandon J. Van Every
Brad King wrote: Brandon J. Van Every wrote: items in a PROPERTIES list have to come in pairs. I humbly submit that the following syntax would be of great use to people: SET_COMPILE_FLAGS(file -DBLAH -DBLLAH -DBLLAAHH) We cannot add a command for every property. The question is what are p

Re: [CMake] COMPILE_FLAGS suggestion

2006-02-16 Thread Brad King
Brandon J. Van Every wrote: SET_TARGET_PROPERTIES(file PROPERTIES COMPILE_FLAGS "-DBLAH -DBLLAH -DBLLAAHH") is a very common form that will be used heavily by people in CMake 2.3 onwards. Anybody who has to do lotsa trivial combos of libraries will be doing it; for instance, shared vs. stati

[CMake] COMPILE_FLAGS suggestion

2006-02-15 Thread Brandon J. Van Every
SET_TARGET_PROPERTIES(file PROPERTIES COMPILE_FLAGS "-DBLAH -DBLLAH -DBLLAAHH") is a very common form that will be used heavily by people in CMake 2.3 onwards. Anybody who has to do lotsa trivial combos of libraries will be doing it; for instance, shared vs. static libraries, and debug vs. r