Re: [CMake] Outputs from add_custom_command not global?

2009-03-29 Thread Philip Lowman
On Sat, Mar 28, 2009 at 7:26 PM, James Bigler jamesbig...@gmail.com wrote: Below. On Mar 28, 2009, at 12:21 PM, Tyler Roscoe ty...@cryptio.net wrote: On Sat, Mar 28, 2009 at 12:16:21AM -0600, James Bigler wrote: I have an add_custom_command in a subdirectory, and I'm trying to use that

Re: [CMake] Need help with GLOB expression

2009-03-29 Thread Carlson Daniel
Ok, I thought that Cmake supported the standard regular expression used by most GNU projects. The |-sign is an or-operator so the standard regular expression for this would be: ^.*\.(h|hpp|ipp)$ but now I realize that global expression and regular expression is not the same thing... Sorry for

Re: [CMake] Need help with GLOB expression

2009-03-29 Thread Martin Costabel
The following seems to work: file(GLOB_RECURSE sources *.h *.hpp *.ipp) -- Martin Carlson Daniel wrote: Ok, I thought that Cmake supported the standard regular expression used by most GNU projects. The |-sign is an or-operator so the standard regular expression for this would be:

Re: [CMake] Setting an environment variable when executing make script

2009-03-29 Thread Carlson Daniel
Hello and sorry for my late response! I can not get this to work. When i execute the command COMMAND ${CMAKE_COMMAND} -E ${template.cmake} I get an error saying something like: CMake Error: cmake version 2.6-patch 2 Usage: /home/daniel/Public/cmake-2.6.2/bin/cmake -E [command] [arguments ...]

Re: [CMake] Setting an environment variable when executing make script

2009-03-29 Thread Philip Lowman
On Sun, Mar 29, 2009 at 9:04 AM, Carlson Daniel daniel.c.carl...@gmail.comwrote: Hello and sorry for my late response! I can not get this to work. When i execute the command COMMAND ${CMAKE_COMMAND} -E ${template.cmake} I get an error saying something like: I believe there was a minor

Re: [CMake] Where are object files located, and how do I change the default extension?

2009-03-29 Thread Carlson Daniel
Yes, perhaps I already had some cmake generated build tree on my disk when i tried this. I will try once again with a clean build tomorrow. About the path-file: Does this really change any behavior or does it just print a nicer output? I have never seen a patch file before.. Did you add the

Re: [CMake] Setting an environment variable when executing make script

2009-03-29 Thread Carlson Daniel
Thanks, but I do not think this is what I want. set($ENV{VAR} some_data) in a cmake-script will set an enviroment variable AND delete it when the script terminates. Is this not true when using -P? Do I actually need an execute_process-command (or anything else) in my script that will set the

Re: [CMake] Need help with GLOB expression

2009-03-29 Thread Robert Dailey
Thanks. I'll give this a try. This isn't very intuitive, though. I was hoping for something a little less redundant. Because now I have to do this: file( GLOB_RECURSE sources C:\foo\bar\source\*.h C:\foo\bar\source\*.ipp C:\foo\bar\source\*.hpp ) It just amazes me that this area of CMake is such

Re: [CMake] Setting an environment variable when executing make script

2009-03-29 Thread Carlson Daniel
I just tested to run a cmake script with the -P option and the environment variable is still cleared when the script terminates... A nice solution to my problem would be to simply extend the set-command with an option like: set(ENV_KEEP{VAR} some_info) which means that the environment variable

[CMake] How to avoid a console come out on WinXp(Cmake+Qt) ?

2009-03-29 Thread Kermit Mei
Hello, I wrote a program with Qt4, and manage it with CMake. I run it on Linux, everything goes well. But on Windows xp, there is always a console come out with the program. How to avoid it in CMAKE? By the Way, when I want to debug it, I used some std::cerr in my program. But when I setup it on

Re: [CMake] How to avoid a console come out on WinXp(Cmake+Qt) ?

2009-03-29 Thread Michael Jackson
Look for at the documentation for add_executable(...). You probably need something like add_executable(foo WIN32 ${sources}) _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Software

[CMake] cmake 2.6.1: CPACK_NSIS_MODIFY_PATH has no effect

2009-03-29 Thread Stephen Collyer
I've created an NSIS based installer by using the Cpack module in a CMakeLists.txt file, and have tried the CPACK_NSIS_MODIFY_PATH setting to add the installation path to PATH automagically. When I run the installer, I see the appropriate page (with the add to this user/all users questions) but

Re: [CMake] cmake 2.6.1: CPACK_NSIS_MODIFY_PATH has no effect

2009-03-29 Thread Stephen Collyer
Correction: this is with cmake 2.6.3 - sorry 2009/3/29 Stephen Collyer scoll...@netspinner.co.uk I've created an NSIS based installer by using the Cpack module in a CMakeLists.txt file, and have tried the CPACK_NSIS_MODIFY_PATH setting to add the installation path to PATH automagically.

Re: [CMake] Need help with GLOB expression

2009-03-29 Thread James Bigler
Ah, yes. I also was getting globbing expressions and regular expressions mixed up. From the docs (and experimentation), it looks like CMake only supports *, ?, and [], but not {} which would be required to do what we want: file(GLOB_RECURSE sources *.{h,cpp}) James On Sun, Mar 29, 2009 at

Re: [CMake] Need help with GLOB expression

2009-03-29 Thread Robert Dailey
Looks like another feature request on Mantis to me :) On Sun, Mar 29, 2009 at 3:39 PM, James Bigler jamesbig...@gmail.com wrote: Ah, yes. I also was getting globbing expressions and regular expressions mixed up. From the docs (and experimentation), it looks like CMake only supports *, ?,

Re: [CMake] Need help with GLOB expression

2009-03-29 Thread Bill Hoffman
James Bigler wrote: Ah, yes. I also was getting globbing expressions and regular expressions mixed up. From the docs (and experimentation), it looks like CMake only supports *, ?, and [], but not {} which would be required to do what we want: file(GLOB_RECURSE sources *.{h,cpp}) CMake

[CMake] From one top level project, is there's a way to produce log files on Linux ( Unix Makefiles) in the same fashion a Windows Visual Studio build does?

2009-03-29 Thread david_bjornbak
From one top level project, is there's a way to produce log files on Linux ( Unix Makefiles) in the same fashion a Windows Visual Studio build does? For example, on Windows when you run ALL_BUILD, you will generated the following files

Re: [CMake] Need help with GLOB expression

2009-03-29 Thread Robert Dailey
On Sun, Mar 29, 2009 at 4:14 PM, Bill Hoffman bill.hoff...@kitware.comwrote: James Bigler wrote: Ah, yes. I also was getting globbing expressions and regular expressions mixed up. From the docs (and experimentation), it looks like CMake only supports *, ?, and [], but not {} which would

Re: [CMake] Setting an environment variable when executing make script

2009-03-29 Thread Philip Lowman
Here are some options: 1. Manually set your environment variables in Control Panel-System or your ~./.bashrc or shell configuration file of choice. 2. If you need multiple different configurations define them in multiple files which you source into your existing shell. In Linux you would do

Re: [CMake] Need help with GLOB expression

2009-03-29 Thread Bill Hoffman
Robert Dailey wrote: But it does work! I've tested it several times with much success! I'm not sure what you're saying about *.c, *.cxx, and *.h. Could you explain? Also, I won't have access to a bash shell on Windows. I'd rather CMake just work instead of trying to find silly workarounds

Re: [CMake] Need help with GLOB expression

2009-03-29 Thread Philip Lowman
On Sun, Mar 29, 2009 at 10:31 PM, Bill Hoffman bill.hoff...@kitware.comwrote: Robert Dailey wrote: But it does work! I've tested it several times with much success! I'm not sure what you're saying about *.c, *.cxx, and *.h. Could you explain? Also, I won't have access to a bash shell on

Re: [CMake] Need help with GLOB expression

2009-03-29 Thread Bill Hoffman
Philip Lowman wrote: I'll put in the feature request for {} and at some point in the future it can be addressed. Can someone point me to a definition of what glob is supposed to have in it? It seems to vary from php glob, perl glob, various different shell globs,

Re: [CMake] Need help with GLOB expression

2009-03-29 Thread Philip Lowman
On Sun, Mar 29, 2009 at 11:02 PM, Bill Hoffman bill.hoff...@kitware.comwrote: Philip Lowman wrote: I'll put in the feature request for {} and at some point in the future it can be addressed. Can someone point me to a definition of what glob is supposed to have in it?

Re: [CMake] Need help with GLOB expression

2009-03-29 Thread James Bigler
Why doesn't *.[hi]pp work? It works for me with ls and with file(GLOB): $ touch blah.hpp blah2.ipp $ ls *.[hi]pp blah.hppblah2.ipp Also, if the glob expressions get translated into regular expressions, is there any way we could get access to creating regular expressions? find . -E

[CMake] FindBoost problem when cross-compiling

2009-03-29 Thread ross hennessy
I'm having a problem with FindBoost.cmake with cmake 2.6.3 under win32 when cross-compiling only ( I have boost version 1.38.0). I have the environment variable BOOST_ROOT set to the directory containing the install of boost. If I build my project using default native compilers for VS 2008 the

Re: [CMake] problem with add_custom_command / add_custom_target in different directories

2009-03-29 Thread James Bigler
On Wed, Feb 25, 2009 at 7:54 AM, Brad King brad.k...@kitware.com wrote: Michael Wild wrote: On 25. Feb, 2009, at 7:25, Philip Lowman wrote: When I invoke add_custom_target() in the parent directory it causes an error in the makefiles. To me this appears to be a bug in the Makefile