Re: [CMake] Unexpected behavior testing boolean expressions

2008-02-01 Thread Timothy M. Shead
On Thu, 2008-01-31 at 04:17 -0500, Brandon Van Every wrote: > On Jan 30, 2008 9:53 PM, Alan W. Irwin <[EMAIL PROTECTED]> wrote: > > My guess is YES, etc., are being interpreted > > as (undefined) variable names > > Yep, that's exactly what's happening. The macro expands to things > like if(YES)

[CMake] Re: How to pass arguments to 'cmake -P' scripts?

2008-02-01 Thread Matthew Woehlke
Ick. Please, no http://www.cygwin.com/acronyms#TOFU. James Bigler wrote: Matthew Woehlke wrote: but I couldn't figure out how to tell the script what parameters it should run with. [snip] Make sure you put the arguments before theh -P ${my_cmake_script} or the arguments won't get passed in.

Re: [CMake] How to pass arguments to 'cmake -P' scripts?

2008-02-01 Thread James Bigler
This is an example of something I have done: ADD_CUSTOM_COMMAND(OUTPUT ${c_file_name} COMMAND ${CMAKE_COMMAND} -DC_FILE:STRING="${c_file_name}" -DMEL_FILE:STRING="${source_file}" -DVARIABLE_NAME:STRING=${variable_name} - DNAMESPACE:STRING=MyNameSpacde -P ${my_cmake_script}

Re: [CMake] CFlags being passed to Linker (OS X, ICC)

2008-02-01 Thread Mike Jackson
On Feb 1, 2008, at 5:06 PM, Bill Hoffman wrote: Mike Jackson wrote: On Feb 1, 2008, at 4:46 PM, Bill Hoffman wrote: Mike Jackson wrote: On Feb 1, 2008, at 4:30 PM, Bill Hoffman wrote: Mike Jackson wrote: I am trying to develop an icpc module file for Darwin and one of the problems

[CMake] How to pass arguments to 'cmake -P' scripts?

2008-02-01 Thread Matthew Woehlke
I'm trying to write an X cursor generator using cmake. Because I can create multiple sizes of cursors from a single config, I need to generate config files as part of the build process. Currently, I'm using a script that looks like this: awk \ "{ printf \"%i %i %i \", (\$1*$3)/90, (\$2*$3)

Re: [CMake] CFlags being passed to Linker (OS X, ICC)

2008-02-01 Thread Mike Jackson
On Feb 1, 2008, at 5:06 PM, Bill Hoffman wrote: Mike Jackson wrote: On Feb 1, 2008, at 4:46 PM, Bill Hoffman wrote: Mike Jackson wrote: On Feb 1, 2008, at 4:30 PM, Bill Hoffman wrote: Mike Jackson wrote: I am trying to develop an icpc module file for Darwin and one of the problems

Re: [CMake] CFlags being passed to Linker (OS X, ICC)

2008-02-01 Thread Bill Hoffman
Mike Jackson wrote: On Feb 1, 2008, at 4:46 PM, Bill Hoffman wrote: Mike Jackson wrote: On Feb 1, 2008, at 4:30 PM, Bill Hoffman wrote: Mike Jackson wrote: I am trying to develop an icpc module file for Darwin and one of the problems that seems to be cropping up is that cmake is pass

Re: [CMake] CFlags being passed to Linker (OS X, ICC)

2008-02-01 Thread Mike Jackson
On Feb 1, 2008, at 4:46 PM, Bill Hoffman wrote: Mike Jackson wrote: On Feb 1, 2008, at 4:30 PM, Bill Hoffman wrote: Mike Jackson wrote: I am trying to develop an icpc module file for Darwin and one of the problems that seems to be cropping up is that cmake is passing compiler flags

Re: [CMake] CFlags being passed to Linker (OS X, ICC)

2008-02-01 Thread Mike Jackson
On Feb 1, 2008, at 4:46 PM, Bill Hoffman wrote: Mike Jackson wrote: On Feb 1, 2008, at 4:30 PM, Bill Hoffman wrote: Mike Jackson wrote: I am trying to develop an icpc module file for Darwin and one of the problems that seems to be cropping up is that cmake is passing compiler flags

Re: [CMake] CFlags being passed to Linker (OS X, ICC)

2008-02-01 Thread Bill Hoffman
Mike Jackson wrote: On Feb 1, 2008, at 4:30 PM, Bill Hoffman wrote: Mike Jackson wrote: I am trying to develop an icpc module file for Darwin and one of the problems that seems to be cropping up is that cmake is passing compiler flags to the linker. Specifically I have entered some va

Re: [CMake] CFlags being passed to Linker (OS X, ICC)

2008-02-01 Thread Mike Jackson
On Feb 1, 2008, at 4:30 PM, Bill Hoffman wrote: Mike Jackson wrote: I am trying to develop an icpc module file for Darwin and one of the problems that seems to be cropping up is that cmake is passing compiler flags to the linker. Specifically I have entered some values for

Re: [CMake] CFlags being passed to Linker (OS X, ICC)

2008-02-01 Thread Bill Hoffman
Mike Jackson wrote: I am trying to develop an icpc module file for Darwin and one of the problems that seems to be cropping up is that cmake is passing compiler flags to the linker. Specifically I have entered some values for CMAKE_CXX_FLAGS and the compile is fine but the linker gets all messe

[CMake] CFlags being passed to Linker (OS X, ICC)

2008-02-01 Thread Mike Jackson
I am trying to develop an icpc module file for Darwin and one of the problems that seems to be cropping up is that cmake is passing compiler flags to the linker. Specifically I have entered some values for CMAKE_CXX_FLAGS and the compile is fine but the linker gets all messed up: /usr/bin

Re: [CMake] Suppressing a compilation option for one file?

2008-02-01 Thread Bill Hoffman
Bryan O'Sullivan wrote: I know that I can use set_source_files_properties to add to the compilation flags used to build a single source file, but is there a way to *remove* a compilation flag for one file? My problem is that I build the source tree with -Wall -Werror, but one source file cont

Re: [CMake] Win32 Executable.

2008-02-01 Thread Brandon Van Every
On Feb 1, 2008 8:14 AM, Surya Kiran Gullapalli <[EMAIL PROTECTED]> wrote: > Hi all, > I'm building a win32 application, and for that I wanted to build the > application as console application in debug mode and win32 application > in release mode. > > ADD_EXECUTABLE takes care of /subsystem:windows

Re: [CMake] Re: Re: Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Mike Jackson
On Feb 1, 2008, at 2:19 PM, Fernando Cacciola wrote: But what happens is that "Qt4 not found" keeps appearing, so he spend half the rest of his life figuring out why, as it is installed and correctly and all. Well, actually NO. If you look closely at the error message that FindQt4 sends

[CMake] Suppressing a compilation option for one file?

2008-02-01 Thread Bryan O'Sullivan
I know that I can use set_source_files_properties to add to the compilation flags used to build a single source file, but is there a way to *remove* a compilation flag for one file? My problem is that I build the source tree with -Wall -Werror, but one source file contains a use of a bad macro

[CMake] Re: Re: Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Fernando Cacciola
Hi Bill, At the very least that fact should be stated up front. I guess it is a hard thing to understand, but perhaps you can help explain it. First, let me try and explain it to you... If set(foo_var somvalue CACHE TYPE "") always did a set, then users could never modify the CMakeCache.

[CMake] Re: Re: Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Fernando Cacciola
"Bill Hoffman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Fernando Cacciola wrote: *you* as in *me* in any *new* script? Sure I can, but I found this problem in FindQt4, a standard cmake module. The -NOTFOUND value can never end up in that variable with the current FindQ

[CMake] Re: Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Fernando Cacciola
Hi Hendrik, So you want to give NOTFOUND an even more special status than all the other negative variable values? Don't get me started on the existence of all these negative values, or on the fact that there is just a string type, or the fact that not even that is actually true as there is a

Re: [CMake] Re: Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Bill Hoffman
Fernando Cacciola wrote: *you* as in *me* in any *new* script? Sure I can, but I found this problem in FindQt4, a standard cmake module. Well, not really. As I said before, the issue only happened to you because you ran two different versions of cmake on the same build tree. Unfortunately,

Re: [CMake] Re: Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Bill Hoffman
Fernando Cacciola wrote: Hi Bill, behaviour. Don't break that as you can always use if (NOT DEFINED VAR) set (VAR "foo" CACHE .. FORCE) But: find_library(FOO_VAR foo) This will set FOO_VAR (in the cache) if it is not set or if the value has -NOTFOUND in it. I just tried it and fi

[CMake] Re: Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Fernando Cacciola
Hi Bill, behaviour. Don't break that as you can always use if (NOT DEFINED VAR) set (VAR "foo" CACHE .. FORCE) But: find_library(FOO_VAR foo) This will set FOO_VAR (in the cache) if it is not set or if the value has -NOTFOUND in it. I just tried it and find_path (didn't try find_l

[CMake] Re: Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Fernando Cacciola
Hi Hendrik, Quoting Bill Hoffman <[EMAIL PROTECTED]>: OK, I get it now... So, the FIND_* stuff will set a value if it is NOTFOUND. However, the set command will not. I am thinking it should. I am not sure what that will break, but it would be consistent with FIND_*. This should not be

[CMake] Re: Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Fernando Cacciola
Hi Bill, OK, I get it now... So, the FIND_* stuff will set a value if it is NOTFOUND. Yes. However, the set command will not. Right, and as yoy said down thread, it won't only if using CACHE as only then it gives prior values precedence. I am thinking it should. At the very least

Re: [CMake] Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Bill Hoffman
Hendrik Sattler wrote: But: find_library(FOO_VAR foo) This will set FOO_VAR (in the cache) if it is not set, or if the value has -NOTFOUND in it. However, set(FOO_VAR somevalue CACHE STRING "") Will only set FOO_VAR if it has no value at all. Seems a bit inconsistent. So you want to giv

Re: [CMake] Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Hendrik Sattler
Quoting Bill Hoffman <[EMAIL PROTECTED]>: Hendrik Sattler wrote: Quoting Bill Hoffman <[EMAIL PROTECTED]>: OK, I get it now... So, the FIND_* stuff will set a value if it is NOTFOUND. However, the set command will not. I am thinking it should. I am not sure what that will break, but it

Re: [CMake] Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Hendrik Sattler
Quoting Bill Hoffman <[EMAIL PROTECTED]>: Hendrik Sattler wrote: Quoting Bill Hoffman <[EMAIL PROTECTED]>: OK, I get it now... So, the FIND_* stuff will set a value if it is NOTFOUND. However, the set command will not. I am thinking it should. I am not sure what that will break, but it

Re: [CMake] Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Bill Hoffman
Hendrik Sattler wrote: Quoting Bill Hoffman <[EMAIL PROTECTED]>: OK, I get it now... So, the FIND_* stuff will set a value if it is NOTFOUND. However, the set command will not. I am thinking it should. I am not sure what that will break, but it would be consistent with FIND_*. This shou

Re: [CMake] Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Hendrik Sattler
Quoting Bill Hoffman <[EMAIL PROTECTED]>: OK, I get it now... So, the FIND_* stuff will set a value if it is NOTFOUND. However, the set command will not. I am thinking it should. I am not sure what that will break, but it would be consistent with FIND_*. This should not be a problem if y

Re: [CMake] Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Bill Hoffman
Fernando Cacciola wrote: Hi Bill, Can you add a : Better let me start over, I think I know what's going on now. Maybe is the intended behaviour. If it is, I think is quite odd. Consider the following simple script: set ( var "whatever" CACHE PATH "" ) message ( STATUS "${var}" ) I would

[CMake] Win32 Executable.

2008-02-01 Thread Surya Kiran Gullapalli
Hi all, I'm building a win32 application, and for that I wanted to build the application as console application in debug mode and win32 application in release mode. ADD_EXECUTABLE takes care of /subsystem:windows or /subsystem:console flag, depends on whether or not you provide WIN32 flag to ADD_E

[CMake] Re: Re: FindQt4 in 2.4.8 bug

2008-02-01 Thread Fernando Cacciola
Hi Bill, Can you add a : Better let me start over, I think I know what's going on now. Maybe is the intended behaviour. If it is, I think is quite odd. Consider the following simple script: set ( var "whatever" CACHE PATH "" ) message ( STATUS "${var}" ) I would expect to see "whatever"

[CMake] Initial Cache for CMakeSetup.exe

2008-02-01 Thread Eduard Hein
Hi, is there a way to specify an initial cache when using CMakeSetup.exe (like ccmake -C defaultcache.txt on Unix)? Is there somewhere a documentation of CMakeSetup.exe commandline parameters? Thanks and Cya, Ed -- Eduard Hein Dipl.-Inform. Software Development Secure Computing® signature.