Re: [CMake] Return values from CMake functions?

2008-11-20 Thread Ken Martin
… command (arg command2(arg arg) arg arg …) or in your case if(assertdef(foo)) or in another case set(foo get_property(…)) etc. This hits the parser and the argument processing in CMake but I think it could be done. I guess I’m not sure if we *should* do it. Open to opinions here. Ken Ken

Re: [CMake] Return values from CMake functions?

2008-11-20 Thread Ken Martin
to limit it to just zero or one like C. Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 [EMAIL PROTECTED] 518 371 3971 (w/f) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

[CMake] Parentheses in conditionals

2008-06-26 Thread Ken Martin
of precedence. If you bump into any problems with this let me know. Thanks Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 [EMAIL PROTECTED] 518 371 3971 (w/f) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo

Re: [CMake] Getting Makefiles sensitive tonew/deleted files/directories?

2008-03-21 Thread Ken Martin
Can you do the glob, configure the result out to a file, then INCLUDE that file. I believe that will solve the problem. Something like file(GLOB SRC *.cpp) configure_file(somefile.in somefile) include(somefile) where somefile.in looks like # list of files as a comment --

Re: [CMake] Getting Makefiles sensitive tonew/deleted files/directories?

2008-03-20 Thread Ken Martin
As Bill reminded me this idea doesn't work, nothing reruns the glob at check build time. - Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 Can you do the glob, configure the result out to a file, then INCLUDE that file. I believe that will solve

Re: [CMake] Getting Makefiles sensitive tonew/deleted files/directories?

2008-03-19 Thread Ken Martin
because CMake does check (at make time) to see if any included file in CMake has changed but is smart in that configure_file only writes the file if it has changed. I'm pretty sure something like that will work. Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971

Re: [CMake] Lua in a nutshell

2008-03-04 Thread Ken Martin
2.Closing statements need and empty () [at least they don't need to duplicate the expressions any more]. Technically I believe this is possible. It has been asked for in the past. Just a change to the yacc IIRC. I tend to not mind () personally. 7.It has no functions (implemented in the

RE: [CMake] Re: CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE by default

2008-02-29 Thread Ken Martin
Will Kitware consider making CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS default to on starting with 2.6.0 and doing away with this annoying construct? Bill is looking into making this implicit. .e.g. if you do not specify the matching arguments then you are using LOOSE_LOOP_CONSTRUCTS by default. So

RE: [CMake] CMake and Lua

2008-02-25 Thread Ken Martin
In principle CMake implements two thing, - a scripting language, - and a make/build-file generator. As I understand it, these two things are currently mixed up in CMakeLib: all commands parse the arguments (scripting functionality) and then call the generator function with the

RE: [CMake] CMake and Lua

2008-02-25 Thread Ken Martin
I'm even more convinced that having only limited programming functionality available in build files is a good thing. While the cmake language may not be beautiful, it works, and the users (developers) are not supposed to write programs with it. OMG flame war Bring it! :) Seriously

RE: [CMake] ctest - how to set environment

2008-02-20 Thread Ken Martin
for that property and do some setenv calls. Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 -Original Message- From: [EMAIL PROTECTED] [mailto:cmake- [EMAIL PROTECTED] On Behalf Of Bill Hoffman Sent: Wednesday, February 20, 2008 2:21 PM To: David Cole Cc

RE: [CMake] Wee question about CMake developer etiquette

2008-02-19 Thread Ken Martin
Of course, this doesn't identifies the project leaders, but at least gives an idea of who has typed enough lines of code to earn the right to speak for a project. Actually it identifies who committed enough lines ... which is not quite the same as writing them. For CMake the Utilities

RE: [CMake] Re: function and raise_scope commands (+ unset bug)

2008-02-18 Thread Ken Martin
Would RAISE_SCOPE(var1 var2 ... varN) be better ? Why was the syntax changed from that to RAISE_SCOPE(varname value) ? (which was basically a set() and that's why converted to set(... PARENT_SCOPE) ) The old syntax of raise scope often required that you first set the value of the variable

RE: [CMake] Re: function and raise_scope commands (+ unset bug)

2008-02-18 Thread Ken Martin
FUNCTION(SET_VAR1 varname) SET(${varname} There's science to do PARENT_SCOPE) ENDFUNCTION(SET_VAR1) FUNCTION(SET_VAR2 varname) SET_VAR1(${varname}) ENDFUNCTION(SET_VAR2) SET_VAR2(foo) MESSAGE(${foo}) Obviously foo is not set, since it is now set in SET_VAR2 scope. Bummer. So

RE: [CMake] 4th Edition CMake book now in stock

2008-02-08 Thread Ken Martin
Does the new edition of the book talk about functions, return, break, raise_scope, etc? Only on one the one page errata sheet that comes with it. The main additions are CPack, cross compiling, a couple more steps in the tutorials, and any updates to bring the book up to the state of CMake CVS

RE: [CMake] 4th Edition CMake book now in stock

2008-02-08 Thread Ken Martin
This edition of the book is written around 2.6 isn't it? What does this mean (if anything) about the coming release of 2.6? It means 2.6 should go to beta as soon as we possibly can get it there :) We wanted 2.6 to be out when the books arrived. It is close. We just want to make sure the key

RE: [CMake] 4th Edition CMake book now in stock

2008-02-06 Thread Ken Martin
Kitware has no plans to release an electronic version of the CMake book at this time. Kitware sells the ITK book and also makes it available for free as a pdf. So we do have a track record and real multi-year data concerning making a technical book available in two different mediums and we have

RE: [CMake] return and break commands

2008-01-25 Thread Ken Martin
This is the commit that has the changes in it. Lots of little changes mainly. http://www.cmake.org/Testing/Sites/DASH2.kitware/Win32-vs70/20080123-1550-Co ntinuous/Update.html Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 I don't mind porting

RE: [CMake] return and break commands

2008-01-25 Thread Ken Martin
What would be useful, would be to be able to interrupt the current CMakeLists file, from within a macro. We initially implemented it that way but due to some obscure parts of the US export control laws we realized we would never be able to distribute it. OK, I just made that up, but I'm sure

RE: [CMake] return and break commands

2008-01-25 Thread Ken Martin
It would not be that hard to port it, but...I'm pretty sure we are done with the 2.4 branch. 2.4.8 is probably the last of the 2.4 releases. We are (and have been) gearing up for the 2.6 release which I hope we will get into beta in a few weeks. - Ken Ken Martin PhD Kitware Inc. 28 Corporate

RE: [CMake] Re: function and raise_scope commands

2008-01-18 Thread Ken Martin
Yes, and I'll also remove raise_scope() then. Ok ? Yuppers - Ken ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

RE: [CMake] Re: function and raise_scope commands

2008-01-18 Thread Ken Martin
. Aka raise_scope changed over time and set is now a better fit ffor what is being done. Can you check that in Alex and mod the function test to use it? Thanks Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 -Original Message- From: Alexander

RE: [CMake] function and raise_scope commands

2007-12-28 Thread Ken Martin
1. CMake crashes if I use the same variable name as the argument and raise the scope later. That is, for the following function: function(track_find_variable cache_variable is_changed) raise_scope(${is_changed}) endfunction(track_find_variable) I can't call it like:

RE: [CMake] function and raise_scope commands

2007-12-10 Thread Ken Martin
Thanks for the information. Both these issues I suspect are fairly simple bugs and will be fixed. Thanks Ken 1. CMake crashes if I use the same variable name as the argument and raise the scope later. That is, for the following function: function(track_find_variable cache_variable

[CMake] function and raise_scope commands

2007-12-03 Thread Ken Martin
and do not impact the parent scope, nor do their values in recursive calls to factorial impact the values in the parent calls. Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 ___ CMake mailing list CMake

RE: [CMake] Using Macro function like

2007-12-03 Thread Ken Martin
C2ADA(${LIST_OF_FILES} ADS) You want C2ASA(${LIST_OF_FILES} ADS) then your macro will receive two arguments, the first of which is a list. Teh in yoru macro you can use foreach to traverse the first argument. VTK uses this approach for the wrap tcl macro. Ken

RE: [CMake] CMake with Lua Experiment

2007-11-27 Thread Ken Martin
- The source code seems to have been crappified by windows. There's missing +x permissions on executable files and cr-lf linefeeds everywhere. Yup, just a quick zip of what is on my disc which is windows hence the CR/LF etc. - The source does: #include lua.h but the

RE: [CMake] CMake with Lua Experiment

2007-11-27 Thread Ken Martin
it (or transitioning to it) I *suspect* is not worth it. (although part of me thinks in the long ten-year-out view it is worth it) Sometimes these issues take a while to gel. Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971

[CMake] CMake with Lua Experiment

2007-11-26 Thread Ken Martin
in lua are not variables in CMake and vice versa. The cm_configure_file command only configures cmake variables, this could be a good thing in one sense :) Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971

RE: [CMake] lexical scoping

2007-11-02 Thread Ken Martin
that do an include of other cmake code) 2) a special set command or signature that creates a local variable scoped to the current function 3) a mode to switch the behavior of set (yuck) 4) something else Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971

RE: [CMake] Cmake variable indicating ctest dashboard build (likeDART_ROOT)

2007-07-31 Thread Ken Martin
like you want to change the build (well configuration step really) based on if it is a dashboard build or not. The general way to do that is by setting the initial cache in the CTest script as you noted in your example. Hopefully that makes sense. Thanks Ken Ken Martin PhD Kitware Inc. 28

[CMake] Next Edition of the CMake Book

2007-07-23 Thread Ken Martin
Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

RE: [CMake] Progress above 100% when making chicken-2.6

2007-06-28 Thread Ken Martin
? Is there a /CMakeFIles/Progress directory still lying around? Are you running just one make? Does chicken do a recusrise make/build as part of a custom command (e.g. invoke make directly as part of a custom command?) Thanks Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065

RE: [CMake] Possible bug in cmake version 2.4-patch 6 with macroargument testing

2007-05-29 Thread Ken Martin
A macro in cmake is a bit like a cpp macro. It is a string replacement operation that replaces ${varname} with the actual argument to the macro. Then it executes the commands. At one point we considered (and tried) making the macro arguments be variables but there are existing projects out there

RE: [CMake] Bug in ADD_LIBRARY (again?)

2007-05-17 Thread Ken Martin
The fix to ADD_LIBRARY is in CVS and has not been put into a patch yet. It should make it into 2.4.7. Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Guilherme

RE: [CMake] Using ADD_CUSTOM_COMMAND to generate sources...

2007-05-17 Thread Ken Martin
files is by adding them (the generated files) to the target, for example: add_library(libname src1.cxx generated1.h generated1.cxx generated2.h generated3.h) Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 -Original Message- From: [EMAIL

RE: [CMake] getting values from subdirs

2007-03-15 Thread Ken Martin
I believe the following will work. In the top CMakeLists file... set(myvar initial-value CACHE INTERNAL stored subdir values) add_subdirectory(subdir) message(${myvar}) Then in subdir set(myvar ${myvar} ${other-values-from-this-subdir} CACHE INTERNAL stored subdir values) Ken Ken Martin

RE: [CMake] getting values from subdirs

2007-03-15 Thread Ken Martin
Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 -Original Message- From: Luigi Calori [mailto:[EMAIL PROTECTED] Sent: Thursday, March 15, 2007 12:36 PM To: Ken Martin; cmake@cmake.org Subject: Re: [CMake] getting values from subdirs Ken Martin wrote: I

RE: [CMake] Progress report

2007-02-23 Thread Ken Martin
believe if you invoke a make in the same tree as part of a custom command within a current make. They are pretty odd cases. Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED

RE: [CMake] Test sources

2007-02-19 Thread Ken Martin
We have a test for CREATE_TEST_SOURCELIST in CMake/Tests/TestDriver and it does not use a full path to the tests and it is passing on the dashboard. Perhaps you specified the path to the test source files as a full absolute path? Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY

RE: [CMake] Writing a Code Warrior Generator

2007-02-12 Thread Ken Martin
this but it sounded a tad nasty. Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Hoffman Sent: Monday, February 12, 2007 1:20 PM To: Nicolas Debeljak Cc: cmake

RE: [CMake] Strange problem with parsing variables

2007-02-06 Thread Ken Martin
Here is the original thread - Ken http://public.kitware.com/pipermail/cmake/2006-December/012257.html Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 -Original Message- From: wedekind [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 10:45

RE: [CMake] ctest, timeout per test/cmd

2007-01-26 Thread Ken Martin
is specified in seconds. This feature should work in both dashboard and non-dashboard ctest invocations. Thanks Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 ___ CMake mailing list CMake@cmake.org http

RE: [CMake] ctest, timeout per test/cmd

2007-01-23 Thread Ken Martin
basis, but... with SET_TESTS_PROPERTIES it would be easy to add as a new feature to CMake. Thanks Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pierre Sent: Monday

RE: [CMake] ctest, timeout per test/cmd

2007-01-23 Thread Ken Martin
The problem with DART_TESTING_TIMEOUT and CTEST_TEST_TIMEOUT is that they apply to the complete test suites. What I'm trying to solve is some infinite loops test cases, I like the tests to fail/timeout but the next tests should be executed as well. Just to make sure we are on the same page :)

RE: [CMake]: Bug in ADD_LIBRARY

2007-01-04 Thread Ken Martin
Yup, I'l check in a fix for it. add_executable does it correctly. Thanks Ken Ken Martin PhD Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of wedekind Sent: Thursday, January 04, 2007 12

RE: [CMake] Re: Weird if nesting problem

2006-12-12 Thread Ken Martin
This has been fixed in cmake CVS now - Ken IF(1) ELSE(1) FIND_PROGRAM(P_1 p_1) FIND_PROGRAM(P_2 p_2) IF(EXISTS ${P_1} AND EXISTS ${P_2} ) ELSE(EXISTS ${P_1} AND EXISTS ${P_2} ) ENDIF(EXISTS ${P_1} AND EXISTS ${P_2} ) ENDIF(1) So :) This is effectively an

RE: [CMake] Re: Weird if nesting problem

2006-12-11 Thread Ken Martin
IF(1) ELSE(1) FIND_PROGRAM(P_1 p_1) FIND_PROGRAM(P_2 p_2) IF(EXISTS ${P_1} AND EXISTS ${P_2} ) ELSE(EXISTS ${P_1} AND EXISTS ${P_2} ) ENDIF(EXISTS ${P_1} AND EXISTS ${P_2} ) ENDIF(1) So :) This is effectively an implementation bug. I suspect it can be fixed reasonably

RE: [CMake] elseif request

2006-09-19 Thread Ken Martin
So ... if(cond1) block of statements elseif(cond2) block of statements elseif(cond3) block of statements ... elseif(condn) block of statements else(cond1) block of statements endif(cond1) And with LOOSE set if(cond1) block of statements elseif(cond2)

RE: [CMake] a dependency nag/bug

2006-07-11 Thread Ken Martin
Furthermore could it be made so that the default target in subdirs are fast and that you'd have to write something special (like /slow) to make it like today. Personally I tend not to like having the default option be fast (aka unsafe) although we have debated both sides of it. To me the

RE: [CMake] cmake 2.2 / 2.4 differences?

2006-06-23 Thread Ken Martin
Is there a list of important changes between 2.2 / 2.4? (also when exactly was 2.4 released?) Bill did send out and email with the major changes I believe with the 2.4.2 announcement as well as earlier ones. (e.g. must be in the cmake ml archive) This also in relation to the official book :

RE: [CMake] case in IF statements

2006-06-15 Thread Ken Martin
From bug id #3119 I looked into this. The issue is that NOT is an argument to the if command and currently arguments are not case insensitive. To make this change and be consistent we would need to modify every command in cmake to be case insensitive to its arguments which might be a good idea,

[CMake] Makefile build progress support

2006-05-24 Thread Ken Martin
I have added progress reporting to the makefile based builds. It is checked into CMake CVS and should work with any make and parallel builds. The percentage done is based on source file counts without knowing if the source files are up to date or not. Specifically the progress is not a good

RE: [CMake] a backwards compatible language simplification

2006-05-22 Thread Ken Martin
Do you plan to also remove the parenthesis in a future release ? Gaetan My patch also made any unparenthesized cmake macro/function call FOO equivalent to the same call without any arguments FOO() This required some changes to the parser/scanner. I'd be happy to regenerate it off

RE: [CMake] a backwards compatible language simplification

2006-05-18 Thread Ken Martin
I incorporated some changes from Lloyd's patch and committed it to CVS. Basically if a project sets CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS on then you can leave off the arguments for the endif endwhile, else and endforeach commands. For example: if (FOO AND BAR) else () endif () The parenthesis are

RE: [CMake] cmake ruby bindings (or perl, or python, or ...)

2006-05-16 Thread Ken Martin
The more and more I work with cmake, the more it feels like there are two (or more) distinct tools rolled into one... the front end is a piece of software that interprets CMakeLists.txt files, and drives a back end. The back end is the stuff that actually generates compiler specific

RE: [CMake] a backwards compatible language simplification

2006-05-11 Thread Ken Martin
Having spent all day hacking a massive project using cmake, I wonder... could this FOREACH (foo ${foolist}) IF (${foo} STREQUAL bar) ... ELSE (${foo} STREQUAL bar) ... ENDIF (${foo} STREQUAL bar) ENDFOREACH (foo ${foolist}) change to this: FOREACH (foo ${foolist})

RE: [CMake] CMakeifying Boost

2006-02-20 Thread Ken Martin
CMake has a great book published that tells a lot of stuff. CMake has a great Mailing list were users exchange information constantly, and As an update, the third edition of the book was sent to the printers a few weeks ago and should be in stock either Friday this week or early next week. It