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 Im not sure if we *should* do it. Open to
opinions here.
Ken
Ken
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
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
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 --
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
. 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
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:
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
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
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
- 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
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
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
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
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
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
? 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
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
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
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
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
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
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
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
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
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
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
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
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 :)
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
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
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
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)
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
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 :
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,
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
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
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
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
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})
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
58 matches
Mail list logo