Re: [CMake] Generator expressions in custom commands

2010-09-06 Thread Michael Wild
On 6. Sep, 2010, at 20:58 , David Cole wrote: > On Mon, Sep 6, 2010 at 2:34 PM, Michael Wild wrote: > >> Hi all >> >> add_test(NAME COMMAND ) has these cool generator >> expressions, where one can use e.g $ to obtain the file >> name of the target. I wondered whether there was a reason as to

Re: [CMake] Adding MIME-types and .desktop files using CMake

2010-09-06 Thread Michael Wild
On 7. Sep, 2010, at 6:45 , Amir Pakdel wrote: > Hi developers, > > I am trying to add a MIME type for "Basket Note Pads" files so that > Desktop Environments (KDE and GNOME) can recognise them. For that > purpose, I created a basket.xml and included the MIME type in the > basket.desktop file; th

[CMake] Adding MIME-types and .desktop files using CMake

2010-09-06 Thread Amir Pakdel
Hi developers, I am trying to add a MIME type for "Basket Note Pads" files so that Desktop Environments (KDE and GNOME) can recognise them. For that purpose, I created a basket.xml and included the MIME type in the basket.desktop file; then, I have added the MIME type and associated this MIME type

Re: [CMake] Getting a list of all targets?

2010-09-06 Thread Chris Hillery
On Mon, Sep 6, 2010 at 9:21 AM, Alexander Neundorf wrote: > On Monday 06 September 2010, David Cole wrote: > ... > > This is the "right approach" for now. There is currently no way to > iterate > > over targets in the CMakeLists files... > > Might make sense as a read-only directory property ? >

Re: [CMake] Problem while setting variables in CMakeCache

2010-09-06 Thread Alexander Neundorf
On Monday 06 September 2010, Stefan Köhnen wrote: > Ah, okay. > > Thanks for your fast reply. > > Is there a way to change the value in the cache? set(... FORCE) Alex ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://ww

[CMake] D2 support ready for testing

2010-09-06 Thread SK
Hello, With excellent help from Jens Mueller and Dean Calver, CMake for D2 now passes our small suite of unit tests on both Windows and Linux. Our tests include mixed C-D applications and libraries. We tested with CMake 2.8.2 and DMD 2.048. We'd appreciate if a few hardy souls were willing to ta

Re: [CMake] Generator expressions in custom commands

2010-09-06 Thread David Cole
On Mon, Sep 6, 2010 at 2:34 PM, Michael Wild wrote: > Hi all > > add_test(NAME COMMAND ) has these cool generator > expressions, where one can use e.g $ to obtain the file > name of the target. I wondered whether there was a reason as to why this > feature isn't available in custom commands, esp

[CMake] Generator expressions in custom commands

2010-09-06 Thread Michael Wild
Hi all add_test(NAME COMMAND ) has these cool generator expressions, where one can use e.g $ to obtain the file name of the target. I wondered whether there was a reason as to why this feature isn't available in custom commands, especially in the TARGET form, where it would be really useful i

[CMake] No symlinks and soname for shared libraries with the Xcode generator

2010-09-06 Thread Michael Wild
Hi all Is it intentional that on APPLE the Unix Makefiles generator does generate library targets with a soname and appropriate symlinks, while the Xcode generator doesn't? Michael -- There is always a well-known solution to every human problem -- neat, plausible, and wrong. H. L. Mencken P

Re: [CMake] Problem while setting variables in CMakeCache

2010-09-06 Thread Stefan Köhnen
Ah, okay. Thanks for your fast reply. Is there a way to change the value in the cache? Stefan 2010/9/6 Alexander Neundorf : > On Monday 06 September 2010, Stefan Köhnen wrote: >> Hello, >> >> I am trying to set a variable that appears in CMakeCache. I made this >> small example to show what I a

Re: [CMake] Problem while setting variables in CMakeCache

2010-09-06 Thread Michael Hertling
On 09/06/2010 06:33 PM, Stefan Köhnen wrote: > Hello, > > I am trying to set a variable that appears in CMakeCache. I made this > small example to show what I am trying to do. > > CMakeLists.txt: > PROJECT(CMakeTest) > > SET(VAR_FOR_TEST "firstValue" CACHE STRING "Just for testing") > > set(VAR

[CMake] Problem while setting variables in CMakeCache

2010-09-06 Thread Stefan Köhnen
Hello, I am trying to set a variable that appears in CMakeCache. I made this small example to show what I am trying to do. CMakeLists.txt: PROJECT(CMakeTest) SET(VAR_FOR_TEST "firstValue" CACHE STRING "Just for testing") set(VAR_FOR_TEST "secondValue") MESSAGE (${VAR_FOR_TEST}) When I run cm

Re: [CMake] Getting a list of all targets?

2010-09-06 Thread Alexander Neundorf
On Monday 06 September 2010, David Cole wrote: ... > This is the "right approach" for now. There is currently no way to iterate > over targets in the CMakeLists files... Might make sense as a read-only directory property ? Alex ___ Powered by www.kitwar

Re: [CMake] Getting a list of all targets?

2010-09-06 Thread Clifford Yapp
Ah, I'm starting to get the idea now - the use of the _cmd-name effect didn't click right away. That just might do the trick - nifty! Thanks everyone for your help! CY >> Well, if Michael's correct about the original form being available with an >> _ prefix, then at least you wouldn't have to mo

Re: [CMake] RESULT_VARIABLE of excecute_process inside install() not getting value

2010-09-06 Thread David Cole
Escape the dollar sign, like so: install(CODE " execute_process(COMMAND my_script RESULT_VARIABLE ret_val) MESSAGE(\"install return value is \${ret_val}\") ") As you had it, ${ret_val} is being evaluated at cmake configure time, and there is just an empty string in the generated fi

[CMake] RESULT_VARIABLE of excecute_process inside install() not getting value

2010-09-06 Thread Jacob Avraham
Hi, I'm trying to get a return value of a script that I runs from execute_process() command, as part of an install() command, and I don't see that the return variable is getting any value. I'm doing something like: install(CODE " execute_process(COMMAND my_script RESULT_VARIABLE

Re: [CMake] Getting a list of all targets?

2010-09-06 Thread David Cole
On Mon, Sep 6, 2010 at 3:21 AM, Chris Hillery wrote: > On Sun, Sep 5, 2010 at 10:06 PM, Clifford Yapp wrote: > >> I was hoping I wouldn't need to do a custom wrapper for every target, >> particularly since I'm building some sub-projects using foreign >> CMakeLists.txt files and I'd really rather n

Re: [CMake] Auto re-configuring until cache stops changing

2010-09-06 Thread David Cole
The "Generate" button should be enabled after the first configure. It's not enabled because the prevailing theory of the day was that you shouldn't allow generate unless there were *no* *new* cache entries after the most recent configure... -- force users to pay attention to those new red entries

Re: [CMake] Getting a list of all targets?

2010-09-06 Thread Mathieu Malaterre
On Mon, Sep 6, 2010 at 12:51 AM, Clifford Yapp wrote: > Is there any way within a CMakeLists.txt file to get a list of all the > currently defined targets?  I'm interested in this for two primary > reasons, and if anyone can point me to other solutions for these that > would be great, but I'm sort

Re: [CMake] Getting a list of all targets?

2010-09-06 Thread Michael Wild
On 6. Sep, 2010, at 9:21 , Chris Hillery wrote: > On Sun, Sep 5, 2010 at 10:06 PM, Clifford Yapp wrote: > >> I was hoping I wouldn't need to do a custom wrapper for every target, >> particularly since I'm building some sub-projects using foreign >> CMakeLists.txt files and I'd really rather not

Re: [CMake] Getting a list of all targets?

2010-09-06 Thread Chris Hillery
On Sun, Sep 5, 2010 at 10:06 PM, Clifford Yapp wrote: > I was hoping I wouldn't need to do a custom wrapper for every target, > particularly since I'm building some sub-projects using foreign > CMakeLists.txt files and I'd really rather not change them from their > default state - that's an extra