[CMake] Reading c-style preprocessor macros

2009-12-13 Thread Daniel Stonier
I've been digging through the documentation, but I cannot seem to find
anything which can read the value of a c style defined macro into a cmake
variable.

There's CheckSymbolExists, but that just flags the resulting cmake variable
as true or false. It doesn't actually read the definition into the
variable.

I also checked FindBoost to see how they grab boost's version number - seems
the do a file read and a regex on the resulting value.

Is there an easy way to do this? I would have thought it would have been
fairly common functionality - for instance, to gather information about
posix options.

Regards,
Daniel.
___
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] Interface not registered error in Visual Studio after running cmake

2009-12-13 Thread Mark Jones
Hi David,

I am up to date on my service packs.  It is possible that something else
other than cmake is at fault here as I can not say with 100% certainty that
I could edit macros immediately before the cmake install (it has been weeks
since I last edited a macro), but I wanted to check with the list in case
others have run into this.

Mark


On Sat, Dec 12, 2009 at 9:24 AM, David Cole david.c...@kitware.com wrote:

 All CMake does is create a directory and copy a file to your user macros
 folder and add some registry keys to tell Visual Studio that macros are
 there.

 The folder is something like:
 {YOUR_MY_DOCUMENTS_FOLDER}\Visual Studio
 2005\Projects\VSMacros80\CMakeMacros

 And the reg keys are at something like:

 Software\\Microsoft\\VisualStudio\\{VERSION_NUMBER}\\vsmacros\\OtherProjects7
 (one of the subkeys of that key is the one that CMake added... probably
 the one with the highest number -- just look at its Path reg value to see
 which one points to the CMake macros file...)

 You can just delete the macros and the reg keys to see if that fixes it.

 I'm doubtful that CMake is the cause of these woes, though. I've never
 heard this sort of report before -- are you up to date with respect to VS
 service packs and updates?


 HTH,
 David


 On Sat, Dec 12, 2009 at 7:29 AM, Mark Jones mark.jones1...@gmail.comwrote:

 When I ran cmake for the first time it registered itself with Visual
 Studio 2005.  Now that it has done so, if I try to right click on any of my
 macros (including those that existed prior to running cmake) and choose Edit
 to edit the macros, a dialog comes up that says Error, Interface not
 registered and the VB editor never opens with my macro source code.  Has
 anyone seen this and is there a way to repair my installation of VS without
 completely reinstalling it?

 Mark


 ___
 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] cmake install overrode my PATH instead of appending to it

2009-12-13 Thread Mark Jones
Hi David,

I was using the latest installer that I downloaded from the cmake page:

http://www.cmake.org/files/v2.8/cmake-2.8.0-win32-x86.exe

I am using Windows XP SP3.

I have a relatively long PATH already.  Is your PATH very long on the system
that you tried to reproduce this on?  I wonder if that has anything to do
with it (maybe Windows tells it that it cannot append to the PATH and so it
replaces the PATH completely?).

Mark


On Sat, Dec 12, 2009 at 9:28 AM, David Cole david.c...@kitware.com wrote:

 There are bug reports about that, but I cannot reproduce that bug here...
 What CMake installer were you running? Where did you get it from?

 See these bugs for more details:
 http://public.kitware.com/Bug/view.php?id=9878
 http://public.kitware.com/Bug/view.php?id=8959

 If you have steps to reproduce this problem, please re-open one of these
 bugs and attach details. (Exactly what steps you took that produced the
 problem...)


 Thanks,
 David


 On Sat, Dec 12, 2009 at 7:31 AM, Mark Jones mark.jones1...@gmail.comwrote:

 I chose to add cmake to my PATH (on Win XP 32) during the installation.
 After it finished I noticed that it completely overrode my PATH instead of
 appending to it.  Is this a known bug?

 Thanks,
 Mark


 ___
 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] cmake install overrode my PATH instead of appending to it

2009-12-13 Thread David Cole
Can you give exact steps to reproduce and tell me exactly how you are
observing the replacement?

i.e.:
- set your user PATH to something that is N characters long with M
semi-colon separated components
- look at My Computer  Properties  Advanced  Environment Variables 
user PATH value to see the new PATH value

I will try this again on Monday with the installer you've pointed out. Any
additional details you can provide would be helpful.


Thanks,
David


On Sun, Dec 13, 2009 at 8:28 AM, Mark Jones mark.jones1...@gmail.comwrote:

 Hi David,

 I was using the latest installer that I downloaded from the cmake page:

 http://www.cmake.org/files/v2.8/cmake-2.8.0-win32-x86.exe

 I am using Windows XP SP3.

 I have a relatively long PATH already.  Is your PATH very long on the
 system that you tried to reproduce this on?  I wonder if that has anything
 to do with it (maybe Windows tells it that it cannot append to the PATH and
 so it replaces the PATH completely?).

 Mark



 On Sat, Dec 12, 2009 at 9:28 AM, David Cole david.c...@kitware.comwrote:

 There are bug reports about that, but I cannot reproduce that bug here...
 What CMake installer were you running? Where did you get it from?

 See these bugs for more details:
 http://public.kitware.com/Bug/view.php?id=9878
 http://public.kitware.com/Bug/view.php?id=8959

 If you have steps to reproduce this problem, please re-open one of these
 bugs and attach details. (Exactly what steps you took that produced the
 problem...)


 Thanks,
 David


 On Sat, Dec 12, 2009 at 7:31 AM, Mark Jones mark.jones1...@gmail.comwrote:

 I chose to add cmake to my PATH (on Win XP 32) during the installation.
 After it finished I noticed that it completely overrode my PATH instead of
 appending to it.  Is this a known bug?

 Thanks,
 Mark


 ___
 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] Can cmake generate Visual Studio projects without generating a makefile?

2009-12-13 Thread David Cole
On Sun, Dec 13, 2009 at 8:20 AM, Mark Jones mark.jones1...@gmail.comwrote:

 Hi David,

 Thank you for all of your help so far.


You're welcome...

Am I attempting to use cmake in a way that is incompatible with cmake, or in
 a way that it wasn't intended for?  It is OK if I am attempting to use it in
 a way it isn't designed for (in which case I can accept that and move on),


Yes, unfortunately, you are. (So accept it, and move on...)   :-)

You can *either* do add_custom_command stuff and have a bare Visual Studio
project without any source files in (but that drives your build through
Visual Studio and your existing makefiles without intellisense and all
that)...

*Or* you can convert the makefiles you do have into CMakeLists.txt files
that list all the sources, do add_library, add_executable and
include_directories calls and generate VS project files that *replace* your
makefiles...

But not both. (At least not without major CMake re-work...)

Why not convert your existing makefiles and just use CMake? It wouldn't be
that much more effort than getting CMake to generate a hybrid/fake thing
like you're trying to do already...


HTH,
David
___
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] Mac OSX GUI

2009-12-13 Thread Steven Wilson
Do you have to do something special to turn it on when you build(2.8.0)
CMake on OS X?   My bin directory that contains cmake/ccmake/etc... does not
contain a cmake-gui program.

Thanks,

Steve

On Sat, Dec 12, 2009 at 11:32 AM, David Cole david.c...@kitware.com wrote:

 cmake-gui is available on mac, Linux and windows since CMake 2.6.0...

 HTH,
 David


 On Saturday, December 12, 2009, Steven Wilson
 steven.wesley.wil...@gmail.com wrote:
  Is there an actual GUI for Mac OSX (Similar to Windows) other than the
 curses GUI?
 
  Thanks,
 
  Steve
 

___
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] Mac OSX GUI

2009-12-13 Thread Michael Wild
You need to have Qt installed.

http://qt.nokia.com/products

If you only want to build Qt software (i.e. don't care about the IDE), make 
sure you only download the library package (163MB) and not the SDK (444MB). 

Michael

On 13. Dec, 2009, at 17:09 , Steven Wilson wrote:

 Do you have to do something special to turn it on when you build(2.8.0)
 CMake on OS X?   My bin directory that contains cmake/ccmake/etc... does not
 contain a cmake-gui program.
 
 Thanks,
 
 Steve
 
 On Sat, Dec 12, 2009 at 11:32 AM, David Cole david.c...@kitware.com wrote:
 
 cmake-gui is available on mac, Linux and windows since CMake 2.6.0...
 
 HTH,
 David
 
 
 On Saturday, December 12, 2009, Steven Wilson
 steven.wesley.wil...@gmail.com wrote:
 Is there an actual GUI for Mac OSX (Similar to Windows) other than the
 curses GUI?
 
 Thanks,
 
 Steve
 

___
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] Mac OSX GUI

2009-12-13 Thread Bill Hoffman

Michael Wild wrote:

You need to have Qt installed.

http://qt.nokia.com/products

If you only want to build Qt software (i.e. don't care about the IDE), make sure you only download the library package (163MB) and not the SDK (444MB). 



You can also download the CMake binary for OSX from Kitware it includes 
the gui.



-Bill
___
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] cmake -E create_symlink for Windows

2009-12-13 Thread Marcel Loose
On Sat, 2009-12-12 at 14:35 -0800, Alan W. Irwin wrote:
 On 2009-12-12 12:02-0500 Bill Hoffman wrote:
 
  Some things just can not be done cross platform.   For example reading/ 
  writing the windows registry, creating an OSX application bundle, and 
  sym-links.  Also, some computers don't even have shared libraries. Should 
  we 
  disable those features from CMake?  That said, the symlink command is the 
  only -E that does not work cross platform.   The -E create_symlink does 
  return failure from main when called on windows. So, if you used it in a 
  custom command which is the idea for -E stuff, it would fail in a 
  noticeable 
  way (the build would fail).  If you call it from execute_process, you 
  should 
  be checking the return value as well.
 
 I guess I am the victim of the assumption that all cmake -E commands are
 supposed to work cross-platform since all of them do so (which I was glad to
 hear) other than create_symlink.  Right now, here is what cmake -E help says
 about that command.
 
create_symlink old new- create a symbolic link new - old
 
 If you simply added (UNIX ONLY) to that documentation string, then users
 like me wouldn't make unwarranted assumptions.
 
 Alan
 __
 Alan W. Irwin
 
 Astronomical research affiliation with Department of Physics and Astronomy,
 University of Victoria (astrowww.phys.uvic.ca).
 
 Programming affiliations with the FreeEOS equation-of-state implementation
 for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
 package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
 Linux Links project (loll.sf.net); and the Linux Brochure Project
 (lbproject.sf.net).
 __
 
 Linux-powered Science
 __

I second that. I was also under the impression that 'cmake -E' provided
a nice abstraction for a number of commands that could be used
cross-platform, but with different syntaxes. Seems that create_symlink
is the odd one out here. Bummer!

The thing is: it's too late when the build fails (on Windows), because
long before then, I, as a developer of the build environment, decided to
use the presumed cross-platform command create_symlink, only to find out
much later that it doesn't work on Windows.

Best regards,
Marcel Loose.


___
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] Mac OSX GUI

2009-12-13 Thread Steven Wilson
I downloaded/installed the Qt libraries (the Cocoa libs), and rebuilt CMake
2.8.0.   I'm using a customized version of CMake 2.8.0 so the stock binaries
from Kitware won't work for my project.   The gui builds correctly and I can
run the gui from the CMake 2.8.0.app bundle in the build directory.   After
running make install, trying to run the CMake 2.8.0.app bundle from
/usr/local just results in the app crashing on startup.   I'm running OS X
10.6.2.

Any suggestions?

Thanks,

Steve

On Sun, Dec 13, 2009 at 12:21 PM, Bill Hoffman bill.hoff...@kitware.comwrote:

 Michael Wild wrote:

 You need to have Qt installed.

 http://qt.nokia.com/products

 If you only want to build Qt software (i.e. don't care about the IDE),
 make sure you only download the library package (163MB) and not the SDK
 (444MB).


 You can also download the CMake binary for OSX from Kitware it includes the
 gui.


 -Bill

___
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] Mac OSX GUI

2009-12-13 Thread Mike Jackson
Yep. When the install command is run there is a missing package of
files from the QtGui.framework/Resources/qt_menu which needs to be
copied into the CMake-Gui.app/Contents/Resources. I think I filed a
bug for this although technically CMake only supports Qt 4.3 which
never had a Cocoa version.

_
Mike Jackson  mike.jack...@bluequartz.net
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio



On Sun, Dec 13, 2009 at 9:13 PM, Steven Wilson
steven.wesley.wil...@gmail.com wrote:
 I downloaded/installed the Qt libraries (the Cocoa libs), and rebuilt CMake
 2.8.0.   I'm using a customized version of CMake 2.8.0 so the stock binaries
 from Kitware won't work for my project.   The gui builds correctly and I can
 run the gui from the CMake 2.8.0.app bundle in the build directory.   After
 running make install, trying to run the CMake 2.8.0.app bundle from
 /usr/local just results in the app crashing on startup.   I'm running OS X
 10.6.2.

 Any suggestions?

 Thanks,

 Steve

 On Sun, Dec 13, 2009 at 12:21 PM, Bill Hoffman bill.hoff...@kitware.com
 wrote:

 Michael Wild wrote:

 You need to have Qt installed.

 http://qt.nokia.com/products

 If you only want to build Qt software (i.e. don't care about the IDE),
 make sure you only download the library package (163MB) and not the SDK
 (444MB).

 You can also download the CMake binary for OSX from Kitware it includes
 the gui.


 -Bill


 ___
 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