Re: [CMake] Re: Changing MD -> MT (+patch for free toolkit)

2008-02-18 Thread Gonzalo Garramuño

Mathieu Malaterre wrote:

Ok this was yet-another-weird-dll thingy, one cannot do:

class GDCM_EXPORT String : std::string { ... }



Please, learn a little bit more about C++.  You should never inherit 
from std::string (or any std::* container) as their functions or 
destructor are not virtual.  That can (and will) spell disaster for 
anyone else trying to use your library/functions or even for yourself if 
you go through pointers or references.


--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Changing MD -> MT

2008-02-18 Thread Gonzalo Garramuño

Mathieu Malaterre wrote:

  So I decided to give it a try with the VCExpress/Nmake one, I choose
Release and change MD into MT, and again my lib does not compile in
shared lib mode ON. Is there something I am missing here ? 


Yes.  MT is for executables only.  MD is for shared libs and 
executables.  It is a crappy Microsoft issue, not a cmake one.  It is 
properly described in the page you linked to.


--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] GLOB segmentation fault

2008-02-18 Thread pepone . onrez
[EMAIL PROTECTED] ~/kk/cmake-glob-bug $ cat CMakeLists.txt
FILE (GLOB TESTS ./test/ *.cpp)

ls -liha test/
total 0
3635635 drwxr-xr-x 3 pepone pepone  72 2008-02-19 04:56 .
 998787 drwxr-xr-x 4 pepone pepone 160 2008-02-19 04:52 ..
3635679 drwxr-xr-x 2 pepone pepone  48 2008-02-19 04:56 .svn


Problem seems to appear when test contains directories files that`s begin
with '.'

[EMAIL PROTECTED] ~/kk/cmake-glob-bug/build $ gdb cmake
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-pc-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run ..
Starting program: /usr/bin/cmake ..
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works

Program received signal SIGSEGV, Segmentation fault.
0x0818cdb5 in cmsys::RegularExpression::find ()
(gdb) bt
#0  0x0818cdb5 in cmsys::RegularExpression::find ()
#1  0x0818be1e in cmsys::Glob::ProcessDirectory ()
#2  0x0818c13d in cmsys::Glob::FindFiles ()
#3  0x08111e38 in cmFileCommand::HandleGlobCommand ()
#4  0x08113ef4 in cmFileCommand::InitialPass ()
#5  0x08124f9c in cmCommand::InvokeInitialPass ()
#6  0x080d86bd in cmMakefile::ExecuteCommand ()
#7  0x080db0b4 in cmMakefile::ReadListFile ()
#8  0x08162502 in cmLocalGenerator::Configure ()
#9  0x0816ab8a in cmLocalUnixMakefileGenerator3::Configure ()
#10 0x0814c28b in cmGlobalGenerator::Configure ()
#11 0x080ff7bf in cmake::Configure ()
#12 0x08102fd9 in cmake::Run ()
#13 0x080c98e8 in do_cmake ()
#14 0x080c9b94 in main ()
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Add multiple directories

2008-02-18 Thread BRM
I'm just thinking here, so please tell me if this wouldn't work...but wouldn't 
it be easier to have a CMake macro that could (a) find the SVN (or TSVN) 
install, (b) checkout/export from a repository provided at minimal the URL and 
revision are provided, and optionally prompts for a user/password, to a 
separate directory, and (c) adds the directory the code is checked-out/exported 
to to the build? (Perhaps the macro could be in a more generic form to work 
with multiple RCS's - e.g. CVS, SVN, VSS, ClearQuest, etc.).

A couple examples:

// Put the files in the build directory
SET(CheckoutPath ${_BINARY_DIR}/rcs_deps)

// Generic RCS tool
RCS_CHECKOUT(RCS, /path/to/repository, 1384, ${CheckoutPath})
// SVN minimal
RCS_CHECKOUT(SVN, https://url.to.repository, r1384, ${CheckoutPath})
// CVS minimal
RCS_CHECKOUT(CVS, https://url.to.repository, 1384, ${CheckoutPath})
// SVN with user name and password prompt
RCS_CHECKOUT(SVN, https://url.to.repository, r1384, ${CheckoutPath}, 
RCS_USERNAME_AND_PASSWORD_PROMPT)
// CVS with user name and password prompt
RCS_CHECKOUT(CVS, https://url.to.repository, 1384, ${CheckoutPath}, 
RCS_USERNAME_AND_PASSWORD_PROMPT)
// SVN with anonymous user
RCS_CHECKOUT(SVN, https://url.to.repository, r1384, ${CheckoutPath}, 
RCS_USE_ANONYMOUS_USER)

Perhaps even allow for some macros of the RCS tool:

// Retrieve the revision from the svn:external property list at the given path.
RCS_CHECKOUT(SVN, https://url.to.repository, SVN_EXTERNAL_PROP_GET(PATH, 
DEPENDANCY_REVISION), ${CheckoutPath})

Just a thought...would be very useful to help with cross-repository 
dependencies.

Ben

- Original Message 
From: Alexander Neundorf <[EMAIL PROTECTED]>
To: cmake@cmake.org
Sent: Monday, February 18, 2008 3:40:18 PM
Subject: Re: [CMake] Add multiple directories

On Monday 18 February 2008, Robert Bielik wrote:
> I'm setting up a project repository with subversion where I'll have
> external libs linked in via svn:externals svn property. Each external lib
> will have a CMakeLists.txt file.
> Ideally, I'd like to have the possibility to include N subdirectories
> without having to alter the CMakeLists.txt file to do it (by just changing
> the svn:externals property).
> Like:
> ADD_SUBDIRECTORY( * )
> Can it be done?

Yes.
You could do file(GLOB */ ) or something like this and then iterate over the 
result and add each directory.

Or you could
if(EXISTS some_dir)
  add_subdirectory(some_dir)
endif(EXISTS some_dir)
if(EXISTS some_other_dir
  add_subdirectory(some_other_dir)
endif(EXISTS some_other_dir)

But actually I wouldn't recommend that.
If you do that, you rely on the dirs at the time cmake runs. There could be 
additional directories which you don't want to have included in your build 
(e.g. a build dir).
And cmake is not automatically rerun if a directory is created.
If you use plain add_subdirectory(), you know that you have to edit the file 
and this will always cause cmake to run again.

Alex
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Ordering of libraries

2008-02-18 Thread Mark Wyszomierski
Hi,

Is there a way to get one of your libraries to be included in your
project before default libraries? Tough to explain - I'm compiling
specifically for visual studio 2005. When CMake is done creating the
solution files, I can see the additional dependencies string looks
like this:

$(NOINHERIT) kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib

after advapi32.lib, any libs I chose to link to are also listed, using
this command:

target_link_libraries (myapp  foo boo too)


Is it possible to get some specific library I want BEFORE the first
default lib included (in the above example, before kernel32.lib)?

I normally wouldn't have to do this but ms has some bizarre bug where
I needed to ignore two default libraries (done) but include them
before all other system libraries...ok...

Thanks,
Mark
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Ignore library flags now works in 2.4.8!

2008-02-18 Thread Mark Wyszomierski
Ah you're right, I had it paired with a call to:

SET_TARGET_PROPERTIES(myapp PROPERTIES
 LINK_FLAGS_DEBUG

${VS_MULTITHREADED_DEBUG_IGNORE_LIBRARY_FLAGS})

which I overlooked - I added the same for the release version and it
work. I haven't looked at this for a few months, sorry about the
confusion,

Thanks,
Mark


On Feb 18, 2008 4:08 PM, Bill Hoffman <[EMAIL PROTECTED]> wrote:
>
> Mark Wyszomierski wrote:
> > Hi,
> >
> > I just downloaded the new CMake version 2.4 patch 8. This command now works:
> >
> > SET(VS_MULTITHREADED_DEBUG_IGNORE_LIBRARY_FLAGS
> >"/NODEFAULTLIB:nafxcwd.lib
> > /NODEFAULTLIB:libcmtd.lib"
> > )
> >
> > I want to do the same thing for my release builds, kind of like:
> >
> > SET(VS_MULTITHREADED_RELEASE_IGNORE_LIBRARY_FLAGS
> >"/NODEFAULTLIB:nafxcw.lib
> > /NODEFAULTLIB:libcmt.lib"
> > )
> >
> > but that above command doesn't seem to do anything, the two libraries
> > listed don't appear in my ignore library string for release builds.
> > What's the proper command?
> >
>
> I don't see how that SET does anything other than set a variable.  It
> must be how your project uses that variable.
> VS_MULTITHREADED_DEBUG_IGNORE_LIBRARY_FLAGS is not a variable that CMake
> looks at...  2.4.8 did fix the problem with multiple /NODEFAULTLIB lines
> not working.
>
> -Bill
>
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Ignore library flags now works in 2.4.8!

2008-02-18 Thread Bill Hoffman

Mark Wyszomierski wrote:

Hi,

I just downloaded the new CMake version 2.4 patch 8. This command now works:

SET(VS_MULTITHREADED_DEBUG_IGNORE_LIBRARY_FLAGS
   "/NODEFAULTLIB:nafxcwd.lib
/NODEFAULTLIB:libcmtd.lib"
)

I want to do the same thing for my release builds, kind of like:

SET(VS_MULTITHREADED_RELEASE_IGNORE_LIBRARY_FLAGS
   "/NODEFAULTLIB:nafxcw.lib
/NODEFAULTLIB:libcmt.lib"
)

but that above command doesn't seem to do anything, the two libraries
listed don't appear in my ignore library string for release builds.
What's the proper command?



I don't see how that SET does anything other than set a variable.  It 
must be how your project uses that variable. 
VS_MULTITHREADED_DEBUG_IGNORE_LIBRARY_FLAGS is not a variable that CMake 
looks at...  2.4.8 did fix the problem with multiple /NODEFAULTLIB lines 
not working.


-Bill
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Ignore library flags now works in 2.4.8!

2008-02-18 Thread Mark Wyszomierski
Hi,

I just downloaded the new CMake version 2.4 patch 8. This command now works:

SET(VS_MULTITHREADED_DEBUG_IGNORE_LIBRARY_FLAGS
   "/NODEFAULTLIB:nafxcwd.lib
/NODEFAULTLIB:libcmtd.lib"
)

I want to do the same thing for my release builds, kind of like:

SET(VS_MULTITHREADED_RELEASE_IGNORE_LIBRARY_FLAGS
   "/NODEFAULTLIB:nafxcw.lib
/NODEFAULTLIB:libcmt.lib"
)

but that above command doesn't seem to do anything, the two libraries
listed don't appear in my ignore library string for release builds.
What's the proper command?

Thanks,
Mark
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Add multiple directories

2008-02-18 Thread Alexander Neundorf
On Monday 18 February 2008, Robert Bielik wrote:
> I'm setting up a project repository with subversion where I'll have
> external libs linked in via svn:externals svn property. Each external lib
> will have a CMakeLists.txt file.
>
> Ideally, I'd like to have the possibility to include N subdirectories
> without having to alter the CMakeLists.txt file to do it (by just changing
> the svn:externals property).
>
> Like:
>
> ADD_SUBDIRECTORY( * )
>
> Can it be done?

Yes.
You could do file(GLOB */ ) or something like this and then iterate over the 
result and add each directory.

Or you could
if(EXISTS some_dir)
  add_subdirectory(some_dir)
endif(EXISTS some_dir)
if(EXISTS some_other_dir
  add_subdirectory(some_other_dir)
endif(EXISTS some_other_dir)

But actually I wouldn't recommend that.
If you do that, you rely on the dirs at the time cmake runs. There could be 
additional directories which you don't want to have included in your build 
(e.g. a build dir).
And cmake is not automatically rerun if a directory is created.
If you use plain add_subdirectory(), you know that you have to edit the file 
and this will always cause cmake to run again.

Alex
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] FindXXX, XXXConfig and UseXXX

2008-02-18 Thread Brad King

Fernando Cacciola wrote:
XXXConfig.cmake should be generated by the cmake script that configures 
the library and it should contain the settings specific to that 
configuration (such as source and binary folders, detected third party 
dependencies, needed flags, etc)


Correct.

FindXXX.cmake should search a user's system for an instance of 
XXXConfig.cmake (using XXX_DIR and defaults paths). If it finds it, it 
should load that XXXConfig.cmake.


No, see below.

UseXXX.cmake should set include directories, libraries, compiler and 
linker flags, etc, based on the settings defined in a XXXConfig.cmake 
that must has been processed already.


XXXConfig.cmake should define a XXX_USE_FILE with the full path to the 
UseXXX.cmake file.


XXX users would load XXX in their own programs via:


find_package(XXX)

if ( XXX_FOUND )

 include( ${XXX_USE_FILE} )

endif()


Correct.

If FindXXX.cmake is found in the paths specified by CMAKE_MODULE_PATH, 
it is loaded by find_package(XXX).


There should not be a FindXXX.cmake at all.

If not, but the user sets XXX_DIR to some binary folder for some 
installation of XXX, the above code works still by loading 
XXXConfig.cmake directly (witout going through FindXXX..cmake)


Is all that correct?


Yes.


Is so, how should FindXXX and UseXXX distributed?


UseXXX.cmake should come with the project next to XXXConfig.cmake.

The whole idea of creating a package with XXXConfig.cmake is to not have 
to have a FindXXX.cmake module at all.  The find_package command is 
supposed to find XXXConfig.cmake automatically, but it is not very good 
at finding the files as of CMake 2.4 so the user has to set XXX_DIR 
alot.  CMake 2.6 will have a much better find_package:


  http://www.cmake.org/Wiki/CMake_2.6_Notes#Packages

You should install XXXConfig.cmake and UseXXX.cmake in the XXX install 
tree under one of the locations mentioned in the find_package command 
documentation (as of CMake 2.6).  For example, a project on UNIX might 
install


  /lib/xxx-1.2/XXXConfig.cmake

Someone using CMake 2.4 will have to set XXX_DIR to that directory by 
hand, but anyone using CMake 2.6 will have the file found automatically. 
 Versioning is also supported in the CMake 2.6 find_package.  See the 
nots above.


-Brad
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] FindXXX, XXXConfig and UseXXX

2008-02-18 Thread Brandon Van Every
On Feb 18, 2008 3:34 PM, Fernando Cacciola <[EMAIL PROTECTED]> wrote:
>
> XXXConfig.cmake should ...
>
> FindXXX.cmake shoud ...
>
> UseXXX.cmake should set include directories, libraries, compiler and linker
> flags, etc, based on the settings defined in a XXXConfig.cmake that must has
> been processed already.

I've yet to use any of the current UseXXX modules.  I looked at the
source for one of them.  All they're doing aside from the usual
FindXXX stuff is defining some macros, which you can choose to call or
not call.  I don't see a point in breaking all this functionality up
into 3 different include files.  1 is fine; you choose to call
whatever macros you want to call.

> XXX users would load XXX in their own programs via:
>
>
> find_package(XXX)
>
> if ( XXX_FOUND )
>
>   include( ${XXX_USE_FILE} )
>
> endif()

What's wrong with:

include(findXXX)
if(XXX_FOUND)
  someXXX_macro(whatever)
endif(XXX_FOUND)


Cheers,
Brandon Van Every
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Add multiple directories

2008-02-18 Thread Robert Bielik

I'm setting up a project repository with subversion where I'll have external 
libs linked in via
svn:externals svn property. Each external lib will have a CMakeLists.txt file.

Ideally, I'd like to have the possibility to include N subdirectories without 
having to alter
the CMakeLists.txt file to do it (by just changing the svn:externals property).

Like:

ADD_SUBDIRECTORY( * )

Can it be done?
TIA
/R
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] FindXXX, XXXConfig and UseXXX

2008-02-18 Thread Fernando Cacciola

Hi,

Consider a library XXX that uses cmake as it's build system. Here's what I 
think those three files should do:


XXXConfig.cmake should be generated by the cmake script that configures the 
library and it should contain the settings specific to that configuration 
(such as source and binary folders, detected third party dependencies, 
needed flags, etc)


FindXXX.cmake should search a user's system for an instance of 
XXXConfig.cmake (using XXX_DIR and defaults paths). If it finds it, it 
should load that XXXConfig.cmake.


UseXXX.cmake should set include directories, libraries, compiler and linker 
flags, etc, based on the settings defined in a XXXConfig.cmake that must has 
been processed already.


XXXConfig.cmake should define a XXX_USE_FILE with the full path to the 
UseXXX.cmake file.


XXX users would load XXX in their own programs via:


find_package(XXX)

if ( XXX_FOUND )

 include( ${XXX_USE_FILE} )

endif()


If FindXXX.cmake is found in the paths specified by CMAKE_MODULE_PATH, it is 
loaded by find_package(XXX).
If not, but the user sets XXX_DIR to some binary folder for some 
installation of XXX, the above code works still by loading XXXConfig.cmake 
directly (witout going through FindXXX..cmake)


Is all that correct?

Is so, how should FindXXX and UseXXX distributed?
Ideally they should go to the standard modules folder of cmake since this 
way users don't have to point CMAKE_MODULE_PATH correctly, but do I do that? 
Having the configuration script copy them doesn't work in Vista because of 
the access restrictions to ProgramFiles.
Putting them in the binary folder works, but doesn't seem right (only 
XXXConfig.cmake should go there).

Any other ideas?

Best


--
Fernando Cacciola
SciSoft
http://fcacciola.50webs.com
http://groups.google.com/group/cppba




___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Clearing the ADD_DEFINITIONS

2008-02-18 Thread Alexander Neundorf
On Monday 18 February 2008, Martin Lütken wrote:
> Is there a way to clear this list ?
> Intrying to convert pango til Cmake I need to change a define inside the
> same source library. So I guess I need to clear this internal list or at
> least remove the define in question before adding it again to avoid
> compiler warnings.
>
> The problem with removing the explicit added define is that it's not a
> general solution and I really would like/need a general solution.
>
> If I could just access the internal list I suppose I could run thru and
> remove all items .

remove_definitions() alone doesn't do what you want right ?

Try get_directory_property(... DEFINITIONS ...)
and see if that works.

Maybe you can post a simple example which shows exactly what you want to do ?

Alex
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] What does debug-output do?

2008-02-18 Thread Alexander Neundorf
On Monday 18 February 2008, Daniel wrote:
> Daniel wrote:
> > I have tried using the --debug-output command line option but it doesn't
> > seem to change anything.  Can someone elaborate on this?  I'm not trying
> > to debug anything in particular just curious.

Please try cmake cvs, it prints a lot more there.

> I found this in the man page now that I'm no longer in Windows:
> "Print extra stuff during the cmake run like stack traces with
> message(send_error ) calls."
>
> So let me rephrase my question, Is this the only command that outputs extra
> info?  What would be great is a message command that outputs only when this
> flag is set but doesn't cause the build to fail, that way you don't need to
> remove any trace messages once things are working.

Hmm, one could argue that you shouldn't keep debug code once it works, but 
anyway. I'd suggest file a feature request in the bug tracker.

Alex
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


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

2008-02-18 Thread Sebastien BARRE

At 2/18/2008 10:10 AM, Ken Martin wrote:

>
> FUNCTION(SET_VAR2 varname)
>SET_VAR1(${varname})
> ENDFUNCTION(SET_VAR2)

And you should live with that. And like it dang it! :)


I'm linking it but I'm kinda surprised you wouldn't go for something 
beautiful *and* eternally classic like a new marker:


FUNCTION(SET_VAR2 §#%{varname}%#§)
SET_VAR1(${varname})
ENDFUNCTION(SET_VAR2)


Awww. 



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


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 locally then raise it. This was prone to cause variable
collision. For example...

function (foo var)
  set ("${var}" "wasabi"}
  raise_scope("${var}")
endfunction(foo)

foo(var)
message ("var should be set to wasabi but is set to: ${var}")

results in var being undefined when it should be set to wasabi. Using the
new syntax...

function (foo var)
  set ("${var}" "wasabi" PARENT_SCOPE}
endfunction(foo)

foo(var)
message ("var should be set to wasabi but is set to: ${var}")

produces the correct result.

Ken


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


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 now I have to do things like this:
> 
> FUNCTION(SET_VAR2 varname)
>SET_VAR1(varname_proxy)
>SET(${varname} ${varname_proxy} PARENT_SCOPE)
> ENDFUNCTION(SET_VAR2)
> 
> Which I guess I could live with

And you should live with that. And like it dang it! :) A function should be
clear on what variables it is modifying in the parent scope without having
to look at every function it in turn calls. This does make for more code,
but the resulting code is more self documenting. Otherwise if SET_VAR1 were
in a different file, just by looking at SET_VAR2 you would not know it is
returning anything. 

> But wait, it gets weird. In my macros it's not unusual that  I
> *unset* variables (yes, I do), using SET(var). I was wondering if
> that would work. It kinda does, but not quite:
> 
> FUNCTION(SET_VAR1 varname)
>SET(${varname} "" PARENT_SCOPE)
> ENDFUNCTION(SET_VAR1)
> 
> FUNCTION(SET_VAR2 varname)
>SET_VAR1(varname_proxy)
>SET(${varname} "${varname_proxy}" PARENT_SCOPE)
> ENDFUNCTION(SET_VAR2)
> 
> SET_VAR2(foo)
> IF(DEFINED foo)
>MESSAGE("foo is defined")
> ELSE(DEFINED foo)
>MESSAGE("foo is NOT defined")
> ENDIF(DEFINED foo)
> 
> This will display that foo is NOT defined, even though it should be
> defined, if you unroll all the functions into a simple script. Note
> that replacing  SET(${varname} "" PARENT_SCOPE) by  SET(${varname}
> PARENT_SCOPE) will also display that foo is not defined (which was
> the expected behavior). Also note that removing the quote around
> ${varname_proxy} doesn't make any difference here.

Sounds like a bug, set should work the same regardless of scope. Maybe the
fix is that the remove command needs a parent_scope argument as well? So
remove removes and set will set even if it is to an empty string. Sound
right to you Alex?

Ken



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] [CTest] ctest --help-command CTEST_TEST

2008-02-18 Thread Mathieu Malaterre
Hi there,

  Could someone please add to the general output of ctest --help that
a user can get access to the full documentation using:

  ctest --help-command CTEST_TEST

  it is also unclear from the output of ctest --help, that ctest
--help COMMAND will output the terse documentation.

Thanks

-- 
Mathieu
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Clearing the ADD_DEFINITIONS

2008-02-18 Thread Martin Lütken
Is there a way to clear this list ?
Intrying to convert pango til Cmake I need to change a define inside the same 
source library. So I guess I need to clear this internal list or at least 
remove the define in question before adding it again to avoid compiler warnings.

The problem with removing the explicit added define is that it's not a general 
solution and I really would like/need a general solution.

If I could just access the internal list I suppose I could run thru and remove 
all items .

-Martin L
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] What does debug-output do?

2008-02-18 Thread Daniel

Daniel wrote:
I have tried using the --debug-output command line option but it doesn't 
seem to change anything.  Can someone elaborate on this?  I'm not trying 
to debug anything in particular just curious.

--
Daniel


I found this in the man page now that I'm no longer in Windows:
"Print extra stuff during the cmake run like stack traces with 
message(send_error ) calls."


So let me rephrase my question, Is this the only command that outputs extra 
info?  What would be great is a message command that outputs only when this flag 
is set but doesn't cause the build to fail, that way you don't need to remove 
any trace messages once things are working.

--
Daniel
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake