Re: [CMake] How to find the DLL's a a required package searched with FIND_PACKAGE()?

2010-02-11 Thread Arjen Markus



On 2010-02-11 01:20, David Cole wrote:
On Wed, Feb 10, 2010 at 7:16 PM, Alan W. Irwin 




Would setting that environment variable from cmake affect subsequent
Windows
builds?  I don't have any Windows development experience, but this
question
just came up on the PLplot list. There, we all speculated from our
various
Linux and Windows platform perspectives that SET(ENV{PATH} ...) just
sets
the PATH when you are running cmake and would have no effect on the
environment for the subsequent build.  Thus, we thought you would
have to
externally set the PATH before running the build.  But we all could
be wrong
which is why I have asked this question.  :-)


Alan,

You are correct. Doing this...

SET(ENV{xxx} value)

...in a CMakeLists.txt file only sets an environment variable for the 
duration of the cmake run. It has no influence on downstream build steps.




The story with environment variables on Windows is slightly more
complicated than that:
- On Linux/UNIX you can set environment variables for the duration of
  a shell process via the set (setenv) command and by putting such
  commands in a shell script and using . (or source) to run the
  script in the same shell. This does not happen if you run the
  shell script normally (as it is run in a separate process then).

- On Windows (or DOS if you want to include some history) there is
  no separate source command. Instead if you set an environment
  variable in a batch file and run that batch file in a DOS-box,
  it will keep that value even after the batch file has finished -
  the batch file is run in the same process (an exit statement in
  such a batch file exits the DOS-box!). If you run a separate
  program, changes to the environment will be lost, just as under
  Linux.

For building PLplot under Windows I extend the path first (so that
includes the directory where the DLLs will be found) and then
run the various commands (CMake and make and the examples). But
that has become an automatism.

What you could do is wrap the CMake command in a batch file,
including the command set path=... and run that instead.

The drawback is that the path will be expanded each time
you run it.

Regards,

Arjen
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to find the DLL's a a required package searched with FIND_PACKAGE()?

2010-02-11 Thread Michael Wild

On 11. Feb, 2010, at 9:07 , Arjen Markus wrote:

 
 
 On 2010-02-11 01:20, David Cole wrote:
 On Wed, Feb 10, 2010 at 7:16 PM, Alan W. Irwin 
 
Would setting that environment variable from cmake affect subsequent
Windows
builds?  I don't have any Windows development experience, but this
question
just came up on the PLplot list. There, we all speculated from our
various
Linux and Windows platform perspectives that SET(ENV{PATH} ...) just
sets
the PATH when you are running cmake and would have no effect on the
environment for the subsequent build.  Thus, we thought you would
have to
externally set the PATH before running the build.  But we all could
be wrong
which is why I have asked this question.  :-)
 Alan,
 You are correct. Doing this...
 SET(ENV{xxx} value)
 ...in a CMakeLists.txt file only sets an environment variable for the 
 duration of the cmake run. It has no influence on downstream build steps.
 
 The story with environment variables on Windows is slightly more
 complicated than that:
 - On Linux/UNIX you can set environment variables for the duration of
  a shell process via the set (setenv) command and by putting such
  commands in a shell script and using . (or source) to run the
  script in the same shell. This does not happen if you run the
  shell script normally (as it is run in a separate process then).
 
 - On Windows (or DOS if you want to include some history) there is
  no separate source command. Instead if you set an environment
  variable in a batch file and run that batch file in a DOS-box,
  it will keep that value even after the batch file has finished -
  the batch file is run in the same process (an exit statement in
  such a batch file exits the DOS-box!). If you run a separate
  program, changes to the environment will be lost, just as under
  Linux.
 
 For building PLplot under Windows I extend the path first (so that
 includes the directory where the DLLs will be found) and then
 run the various commands (CMake and make and the examples). But
 that has become an automatism.
 
 What you could do is wrap the CMake command in a batch file,
 including the command set path=... and run that instead.
 
 The drawback is that the path will be expanded each time
 you run it.
 
 Regards,
 
 Arjen


You might want to take a look at setlocal/endlocal:

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/batch.mspx?mfr=true


Michael
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to find the DLL's a a required package searched with FIND_PACKAGE()?

2010-02-11 Thread Arjen Markus

On 2010-02-11 09:13, Michael Wild wrote:



You might want to take a look at setlocal/endlocal:

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/batch.mspx?mfr=true



Oh, I had completely forgotten that those commands exist too. That might
be the solution, actually! Thanks.

Regards,

Arjen
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] FindBoost: Boost_ADDITIONAL_VERSIONS : what to do for trunk

2010-02-11 Thread Hicham Mouline
 -Original Message-
 Subject: [CMake] FindBoost: Boost_ADDITIONAL_VERSIONS : what to do for trunk 

 Hi,
 I use the trunk checkout of boost as well as released versions.
 I have it installed under \Program Files
-  boost-trunk
-  boost_1_41_0
 Is there any support at all for a non-number version?
 I want to find the include directory and some of the libraries as well,
 rds,

Hello,
Is FindBoost Boost_ADDITIONAL_VERSIONS able to handle boost trunk?

Regards,

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] CDash LDAP problem

2010-02-11 Thread Marcel Loose
Hi all,

I'm experiencing an LDAP problem with CDash. When I try to log into
CDash for the first time as a valid LDAP user, I get the message:

No givenname (cn) set in LDAP, cannot register user into MIDAS

Now I've been digging in the PHP-code a bit, but I know little PHP.
The problem seems to be in the function ldapAuthenticate() in login.php.
For reasons I don't understand, the return value of 
 ldap_search($ldap,$CDASH_LDAP_BASEDN, 'mail='.$email, array('dn','cn'))
contains an empty 'cn' field, though it does contain a valid 'dn' field.

For debugging purposes, I've removed the attributes specification in the
ldap_search() call, thus returning all attributes. This gives me:

var_dump($entries);
array(2) { [count]=  int(1) [0]=  array(24) { [objectclass]=
array(4) { [count]=  int(3) [0]=  string(13) shadowAccount [1]=
string(12) posixAccount [2]=  string(13) inetOrgPerson } [0]=
string(11) objectclass [gecos]=  array(2) { [count]=  int(1)
[0]=  string(12) Marcel Loose } [1]=  string(5) gecos [uid]=
array(2) { [count]=  int(1) [0]=  string(5) loose } [2]=
string(3) uid [sn]=  array(2) { [count]=  int(1) [0]=
string(5) Loose } [3]=  string(2) sn [givenname]=  array(2)
{ [count]=  int(1) [0]=  string(6) Marcel } [4]=  string(9)
givenname [uidnumber]=  array(2) { [count]=  int(1) [0]=
string(3) 511 } [5]=  string(9) uidnumber [mail]=  array(2)
{ [count]=  int(1) [0]=  string(15) lo...@astron.nl } [6]=
string(4) mail [gidnumber]=  array(2) { [count]=  int(1) [0]=
string(4) 1000 } [7]=  string(9) gidnumber [shadowlastchange]=
array(2) { [count]=  int(1) [0]=  string(5) 14127 } [8]=
string(16) shadowlastchange [homedirectory]=  array(2)
{ [count]=  int(1) [0]=  string(11) /home/loose } [9]=
string(13) homedirectory [loginshell]=  array(2) { [count]=
int(1) [0]=  string(9) /bin/bash } [10]=  string(10)
loginshell [count]=  int(11) [dn]=  string(35)
uid=loose,ou=people,dc=astron,dc=nl } }

Indeed, 'cn' is missing here. It is, however, present in the LDAP
database. Here's a snippet of the output of 'slapcat', for the given
user:

dn: uid=loose,ou=people,dc=astron,dc=nl
objectClass: shadowAccount
objectClass: posixAccount
objectClass: inetOrgPerson
gecos: Marcel Loose
uid: loose
sn: Loose
givenName: Marcel
structuralObjectClass: inetOrgPerson
entryUUID: 2375bf08-e435-102b-8b97-3952138d3cf7
creatorsName: cn=Manager,dc=astron,dc=nl
createTimestamp: 20070821132115Z
uidNumber: 511
mail: lo...@astron.nl
gidNumber: 1000
shadowLastChange: 14127
cn: Marcel Loose
userPassword:: 
homeDirectory: /home/loose
loginShell: /bin/bash
entryCSN: 20100104140045Z#00#00#00
modifiersName: cn=Manager,dc=astron,dc=nl
modifyTimestamp: 20100104140045Z

I don't know if this is a CDash problem -- e.g. it should use a
different ldap-function; or if it's a problem with the PHP-LDAP module;
or if it's an LDAP database/configuration problem. Could someone please
shed a light on this?

Best regards,
Marcel Loose.


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Post Build event question.

2010-02-11 Thread Surya Kiran Gullapalli
Hello all,
In my project, I've added a custom command, which is supposed to run as POST
BUILD event. Its some thing like this.
For each of the source file in the directory, run a perl script on that
source file and create some output file.

Lets say I've 100 source files, so I end with 100 post build commands.
The problem is, I'm getting an error code 255 (Command line too long). I'm
trying to reduce the command line length and test the build again.

When I build the target, VS says, the target is up to date. (The library is
okay. but the post build command fails). Is there any way I can run post
build command only if it fails the previous time?

Thanks in advance,
Surya
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Post Build event question.

2010-02-11 Thread Surya Kiran Gullapalli
Also,
I want this custom command depend on some other file, lets say the input
perl script. If my perl script changes, It has to run the commands again.
How to specify the dependencies ?
I cannot use Add_Custom_Command () with build event argument and dependency
information.

Thanks in advance,
Surya
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Bison extra headers

2010-02-11 Thread Hilton Medeiros
Hello,

I'm using bison_target() from FindBISON with the C++ bison interface,
on CMake 2.8.0. When using this interface the following extra files
are generated by bison:

location.hh
position.hh
stack.hh

They do not get listed in BISON_target_OUTPUTS and do not get erased in
'make clean'. 

See here:
http://www.gnu.org/software/bison/manual/html_node/C_002b_002b-Bison-Interface.html

Note that this manual seems outdated, there is no 'lalr1.c' for me,
only 'lalr1.cc' on bison 2.4.1. Anyway, this is a very small issue,
this is the workaround I'm using:

set (BISON_EXTRA_HEADERS
${PROJECT_BINARY_DIR}/position.hh
${PROJECT_BINARY_DIR}/location.hh
${PROJECT_BINARY_DIR}/stack.hh
)

set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
${BISON_EXTRA_HEADERS})

By the way, I saw that the main header file generated on
bison_target() is always terminated by '.hpp'. I tried to bypass this
with:

bison_target (PARSER ${PARSER_FILE} ${PROJECT_BINARY_DIR}/Parser.cpp
  COMPILE_FLAGS --defines=${PROJECT_BINARY_DIR}/Parser.h)

But then both Parser.hpp and Parser.h are generated. But this is also a
very small issue.

Finally, thanks a lot for supporting bison and flex in CMake.

Kind regards,
visibility guy
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to findXXX libraries with debug suffix

2010-02-11 Thread Philip Lowman
On Wed, Feb 10, 2010 at 10:49 AM, Will Dicharry
wdicha...@stellarscience.com wrote:
 My only other comment is that some modules already use the following
 form (usually due to someone adding DEBUG support later)
 FOO_LIBRARY (cache variable)
 FOO_LIBRARY_DEBUG (cache variable)
 FOO_LIBRARIES (normal variable with debug/optimized keywords when
 FOO_LIBRARY_DEBUG is available, else normal variable set to
 FOO_LIBRARY)

 It would be nice to see a second macro that supports this format.

 I guess I'll have to think about that for a bit. But really, if other
 modules are going to need to modify code to use the macro, shouldn't they
 move to the more modern and descriptive form while they're at it? I know
 they probably have to maintain backwards compatibility, but they can do that
 by using the macro and setting FOO_LIBRARY to FOO_LIBRARY_RELEASE after the
 macro is called.

So if I understand correctly the code would do this?
find_library(FOO_LIBRARY ...)
find_library(FOO_LIBRARY_DEBUG ...)
set(FOO_LIBRARY_RELEASE ${FOO_LIBRARY})
call_the_macro()
   # macro creates FOO_LIBRARIES debug/optimized keywords
   # macro also sets FOO_LIBRARY with debug/optimized keywords *

I guess that probably would be safe and maintain backwards
compatibility with the module with the exception possibly of setting
FOO_LIBRARY to have the debug/optimized keywords (see below).

 I'm not sure I understand the situation you're describing here. Are you
 referring to the older backwards compatibility case, or something about the
 usual FOO_LIBRARY_DEBUG and FOO_LIBRARY_RELEASE case?

Sorry I wasn't very clear.  This covers the older backwards
compatibility case.  What I mean to say is that if the user was
relying on FOO_LIBRARY within existing target_link_libraries() calls
like below, they will get the warning below if FOO_LIBRARY is
redefined to contain debug/optimized keywords.

target_link_libraries(bar optimized ${FOO_LIBRARY})

# now FOO_LIBRARY contains
# optimized foo.so debug food.so

CMake Warning (dev) at CMakeLists.txt:8 (target_link_libraries):
  Link library type specifier optimized is followed by specifier
  optimized instead of a library name.  The first specifier will be
  ignored.

Removing the setting of FOO_LIBRARY to contain debug/optimized
keywords from your macro could break people.  Leaving it in if
FOO_LIBRARY is used in the manor I illustrated causes warnings.  You
might want to check with if(DEFINED FOO_LIBRARY) and if so not set it
maybe?

-- 
Philip Lowman
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Function for visibility definitions

2010-02-11 Thread Bill Hoffman

Hilton Medeiros wrote:

Wow, now you got me.
That is why I love discussions.
Thanks for your insight, now I (my hard-as-rock head) can understand
why this is not feasible.

As a side note I think this should be in a list, maybe in the wiki, to
advise others no to do this. A list of 'do not even think about this'.

I'm sorry for the incovenient.

Kind regards,
Hilton

On Thu, 11 Feb 2010 02:26:27 -0500
Mike Jackson mike.jack...@bluequartz.net wrote:


And what happens when a project wants to use my library? That
project must now use Cmake and your macro. What if a project
downstream can not use Cmake to define those macros? What then?



That said, you could have CMake configure a .h file that had this stuff 
in it.  It might be nice if the function did that automatically, as it 
is almost the same code for every project.  Then once your project was 
built with CMake, you would install the configured .h files and other 
build systems could still use the software.


-Bill
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CDash LDAP problem

2010-02-11 Thread Bill Hoffman

Wrong mailing list, use the cdash mailing list.


Marcel Loose wrote:

Hi all,

I'm experiencing an LDAP problem with CDash. When I try to log into
CDash for the first time as a valid LDAP user, I get the message:

No givenname (cn) set in LDAP, cannot register user into MIDAS

Now I've been digging in the PHP-code a bit, but I know little PHP.
The problem seems to be in the function ldapAuthenticate() in login.php.
For reasons I don't understand, the return value of 
 ldap_search($ldap,$CDASH_LDAP_BASEDN, 'mail='.$email, array('dn','cn'))

contains an empty 'cn' field, though it does contain a valid 'dn' field.

For debugging purposes, I've removed the attributes specification in the
ldap_search() call, thus returning all attributes. This gives me:

var_dump($entries);
array(2) { [count]=  int(1) [0]=  array(24) { [objectclass]=
array(4) { [count]=  int(3) [0]=  string(13) shadowAccount [1]=
string(12) posixAccount [2]=  string(13) inetOrgPerson } [0]=
string(11) objectclass [gecos]=  array(2) { [count]=  int(1)
[0]=  string(12) Marcel Loose } [1]=  string(5) gecos [uid]=
array(2) { [count]=  int(1) [0]=  string(5) loose } [2]=
string(3) uid [sn]=  array(2) { [count]=  int(1) [0]=
string(5) Loose } [3]=  string(2) sn [givenname]=  array(2)
{ [count]=  int(1) [0]=  string(6) Marcel } [4]=  string(9)
givenname [uidnumber]=  array(2) { [count]=  int(1) [0]=
string(3) 511 } [5]=  string(9) uidnumber [mail]=  array(2)
{ [count]=  int(1) [0]=  string(15) lo...@astron.nl } [6]=
string(4) mail [gidnumber]=  array(2) { [count]=  int(1) [0]=
string(4) 1000 } [7]=  string(9) gidnumber [shadowlastchange]=
array(2) { [count]=  int(1) [0]=  string(5) 14127 } [8]=
string(16) shadowlastchange [homedirectory]=  array(2)
{ [count]=  int(1) [0]=  string(11) /home/loose } [9]=
string(13) homedirectory [loginshell]=  array(2) { [count]=
int(1) [0]=  string(9) /bin/bash } [10]=  string(10)
loginshell [count]=  int(11) [dn]=  string(35)
uid=loose,ou=people,dc=astron,dc=nl } }

Indeed, 'cn' is missing here. It is, however, present in the LDAP
database. Here's a snippet of the output of 'slapcat', for the given
user:

dn: uid=loose,ou=people,dc=astron,dc=nl
objectClass: shadowAccount
objectClass: posixAccount
objectClass: inetOrgPerson
gecos: Marcel Loose
uid: loose
sn: Loose
givenName: Marcel
structuralObjectClass: inetOrgPerson
entryUUID: 2375bf08-e435-102b-8b97-3952138d3cf7
creatorsName: cn=Manager,dc=astron,dc=nl
createTimestamp: 20070821132115Z
uidNumber: 511
mail: lo...@astron.nl
gidNumber: 1000
shadowLastChange: 14127
cn: Marcel Loose
userPassword:: 
homeDirectory: /home/loose
loginShell: /bin/bash
entryCSN: 20100104140045Z#00#00#00
modifiersName: cn=Manager,dc=astron,dc=nl
modifyTimestamp: 20100104140045Z

I don't know if this is a CDash problem -- e.g. it should use a
different ldap-function; or if it's a problem with the PHP-LDAP module;
or if it's an LDAP database/configuration problem. Could someone please
shed a light on this?

Best regards,
Marcel Loose.


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake




--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoff...@kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Function for visibility definitions

2010-02-11 Thread Hendrik Sattler

Zitat von Bill Hoffman bill.hoff...@kitware.com:

That said, you could have CMake configure a .h file that had this stuff
in it.  It might be nice if the function did that automatically, as it
is almost the same code for every project.  Then once your project was
built with CMake, you would install the configured .h files and other
build systems could still use the software.


OTOH, cmake is a build system, not a code generator.
This export stuff is so simple[1], why all the hassle to generate it?

HS

[1]: you only have too cases: Windows and gcc=4. All compilers on  
Windows use the same syntax.



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Function for visibility definitions

2010-02-11 Thread Michael Wild

On 11. Feb, 2010, at 15:40 , Hendrik Sattler wrote:

 Zitat von Bill Hoffman bill.hoff...@kitware.com:
 That said, you could have CMake configure a .h file that had this stuff
 in it.  It might be nice if the function did that automatically, as it
 is almost the same code for every project.  Then once your project was
 built with CMake, you would install the configured .h files and other
 build systems could still use the software.
 
 OTOH, cmake is a build system, not a code generator.
 This export stuff is so simple[1], why all the hassle to generate it?
 
 HS
 
 [1]: you only have too cases: Windows and gcc=4. All compilers on Windows 
 use the same syntax.
 

Also refer to http://gcc.gnu.org/wiki/Visibility

Michael
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Function for visibility definitions

2010-02-11 Thread Hendrik Sattler

Zitat von Michael Wild them...@gmail.com:



On 11. Feb, 2010, at 15:40 , Hendrik Sattler wrote:


Zitat von Bill Hoffman bill.hoff...@kitware.com:

That said, you could have CMake configure a .h file that had this stuff
in it.  It might be nice if the function did that automatically, as it
is almost the same code for every project.  Then once your project was
built with CMake, you would install the configured .h files and other
build systems could still use the software.


OTOH, cmake is a build system, not a code generator.
This export stuff is so simple[1], why all the hassle to generate it?

HS

[1]: you only have too cases: Windows and gcc=4. All compilers on   
Windows use the same syntax.




Also refer to http://gcc.gnu.org/wiki/Visibility


...which can be even simplified to:
#if defined _WIN32 || defined __CYGWIN__
  #ifdef PROJECT_EXPORT
#define DLL_PUBLIC __declspec(dllexport)
  #endif
#else
  #if __GNUC__ = 4
#define DLL_PUBLIC __attribute__ ((visibility(default)))
#define DLL_LOCAL  __attribute__ ((visibility(hidden)))
  #endif
#endif
#ifndef DLL_PUBLIC
  #define DLL_PUBLIC
#endif
#ifndef DLL_LOCAL
  #define DLL_LOCAL
#endif

Note: __declspec(dllimport) is not used here as it is only to be used  
when including a header file for a DLL. This needs a different  
solution (some custom define) in the header, only.


You usually do not need DLL_LOCAL.

Additionally, if you want cross-language bindings, you may want an  
additional symbols file, so the symbol names are simpler. You also  
have to care about calling convention, then. So the defines above a  
only a small part of the deal.


HS


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Function for visibility definitions

2010-02-11 Thread Clinton Stimpson

On 02/11/2010 07:40 AM, Hendrik Sattler wrote:

Zitat von Bill Hoffman bill.hoff...@kitware.com:

That said, you could have CMake configure a .h file that had this stuff
in it.  It might be nice if the function did that automatically, as it
is almost the same code for every project.  Then once your project was
built with CMake, you would install the configured .h files and other
build systems could still use the software.


OTOH, cmake is a build system, not a code generator.
This export stuff is so simple[1], why all the hassle to generate it?

HS

[1]: you only have too cases: Windows and gcc=4. All compilers on 
Windows use the same syntax.


If your library is only ever built as shared, sure, you don't cmake to 
generate code.

Otherwise, the code needs that bit of information from the build system.
I'd rather have a configured header file with that info in it.

Clint

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Function for visibility definitions

2010-02-11 Thread Andreas Pakulat
On 11.02.10 16:09:34, Hendrik Sattler wrote:
 Zitat von Michael Wild them...@gmail.com:


 On 11. Feb, 2010, at 15:40 , Hendrik Sattler wrote:

 Zitat von Bill Hoffman bill.hoff...@kitware.com:
 That said, you could have CMake configure a .h file that had this stuff
 in it.  It might be nice if the function did that automatically, as it
 is almost the same code for every project.  Then once your project was
 built with CMake, you would install the configured .h files and other
 build systems could still use the software.

 OTOH, cmake is a build system, not a code generator.
 This export stuff is so simple[1], why all the hassle to generate it?

 HS

 [1]: you only have too cases: Windows and gcc=4. All compilers on   
 Windows use the same syntax.


 Also refer to http://gcc.gnu.org/wiki/Visibility

 ...which can be even simplified to:
 #if defined _WIN32 || defined __CYGWIN__
   #ifdef PROJECT_EXPORT
 #define DLL_PUBLIC __declspec(dllexport)
   #endif
 #else
   #if __GNUC__ = 4
 #define DLL_PUBLIC __attribute__ ((visibility(default)))
 #define DLL_LOCAL  __attribute__ ((visibility(hidden)))
   #endif
 #endif
 #ifndef DLL_PUBLIC
   #define DLL_PUBLIC
 #endif
 #ifndef DLL_LOCAL
   #define DLL_LOCAL
 #endif

 Note: __declspec(dllimport) is not used here as it is only to be used  
 when including a header file for a DLL. This needs a different solution 
 (some custom define) in the header, only.

At least Qt and KDE manage just fine with __declspec(dllimport) in their
xxx_export headers defining these macros. That is they define DLL_PUBLIC to
be __declspec(dllimport) when PROJECT_EXPORT is not defined and use the
fact, that cmake sets a define already when building a shared library.
(MAKE_XX_LIBRARY or something similar).

Andreas

-- 
Don't you feel more like you do now than you did when you came in?
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Function for visibility definitions

2010-02-11 Thread Hendrik Sattler

Zitat von Clinton Stimpson clin...@elemtech.com:

If your library is only ever built as shared, sure, you don't cmake to
generate code.
Otherwise, the code needs that bit of information from the build system.
I'd rather have a configured header file with that info in it.


cmake already does that (equally to libtool).

HS


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to avoid continuous download while using ExternalProjects

2010-02-11 Thread Luigi Calori

Hi Philip

Philip Lowman wrote:

On Wed, Feb 10, 2010 at 11:37 AM, David Cole david.c...@kitware.com wrote:
  

If anybody has other ideas to share downloads between Release and Debug
configurations, or other ways to avoid unnecessary downloads better, or
other ideas for any ExternalProject improvement, I'm all ears. :-)



Caching for source tarballs would be a nice feature so that when you
clean the project you don't have to redownload them.  I pulled this
off with stamp files in CMakePorts I think with some suggestions from
you.  The problem of course is if you really want to remove the
downloads you need yet another target.
  

I'm trying to experiment with this...
What I do not really catch is why the file dependencies are set up using 
stamp files instead of real downloaded files.
Probably more insight on how CMake is treating dependendencies at file 
and target level seem really needed.

Also, for any that are interested, beta releases of zlib now have a
CMakeLists.txt in them.  It could use testing on Mac OSX and other
unix systems.
http://zlib.net/current/beta/
  
Did you tried that? I' did but seem to have a strange error on linking 
their examples:

I got
zlib.lib(gzlib.obj) : error LNK2019: unresolved external symbol 
_snprintf referenced in function _gzdopen


that seem to get away by adding
#  define snprintf _snprintf
to gzguts.h
Anyone has ever tested it under MSVC? It would be nice to have helpers 
to build patches, as in CMakePorts...


  


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Relocatable RPM

2010-02-11 Thread Will Dicharry

Is there a way to make an RPM package generated with CPack relocatable?

Thanks in advance,
-- Will

--
Will Dicharry
Software Developer
Stellar Science Ltd Co


smime.p7s
Description: S/MIME Cryptographic Signature
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Building paraview from source

2010-02-11 Thread J Cook
Hi
Im trying to compile paraview from souce onto my computer in order to run
some plugins which require the source version. My computer is currently
running on Windows XP. The C compiler i am using is Microsoft Visual
Studio 2008 (version 9.0). Im very new to using these types of programs
and I keep getting the same error with CMake 2.8.0 when i try to configure
the build.


Check for working C compiler: C:/Program Files/Microsoft Visual Studio
9.0/VC/bin/cl.exe
Check for working C compiler: C:/Program Files/Microsoft Visual Studio
9.0/VC/bin/cl.exe -- broken
CMake Error at C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:50 (MESSAGE):
  The C compiler C:/Program Files/Microsoft Visual Studio 9.0/VC/bin/cl.exe
  is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: C:/Program Files/ParaView3/BIN/CMakeFiles/CMakeTmp



  Run Build Command:C:\PROGRA~1\MICROS~1.0\Common7\IDE\devenv.com
  CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec



  Microsoft (R) Visual Studio Version 9.0.21022.8.

  Copyright (C) Microsoft Corp.  All rights reserved.

  1-- Build started: Project: cmTryCompileExec, Configuration: Debug
  Win32 --

  1Compiling...

  1Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for
  80x86

  1Copyright (C) Microsoft Corporation.  All rights reserved.

  1cl /Od /D WIN32 /D _WINDOWS /D _DEBUG /D CMAKE_INTDIR=\Debug\
  /D _MBCS /FD /RTCs /MDd /FocmTryCompileExec.dir\Debug\\ /FdC:/Program
  Files/ParaView3/BIN/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.pdb /W3 /c
  /Zi /TC /Zm1000

  1 .\testCCompiler.c

  1testCCompiler.c

  1c1 : fatal error C1060: compiler is out of heap space

  1Build log was saved at file://c:\Program
  
Files\ParaView3\BIN\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\BuildLog.htm


  1cmTryCompileExec - 1 error(s), 0 warning(s)

  == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
  ==





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:1 (PROJECT)


Configuring incomplete, errors occurred!


Any suggestions to fix this would be very welcome.
Thanks Jacob Cook
-- 


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Building paraview from source

2010-02-11 Thread Bill Hoffman

J Cook wrote:

Hi
Im trying to compile paraview from souce onto my computer in order to run
some plugins which require the source version. My computer is currently
running on Windows XP. The C compiler i am using is Microsoft Visual
Studio 2008 (version 9.0). Im very new to using these types of programs
and I keep getting the same error with CMake 2.8.0 when i try to configure
the build.



The problem seems to be here:


  1c1 : fatal error C1060: compiler is out of heap space


I found this:
http://msdn.microsoft.com/en-us/library/yz7kx3y2%28VS.71%29.aspx

Are you out of memory or low on the machine?  Can you compile something 
without CMake?


-Bill


--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoff...@kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] ADD_DEFINITIONS and COMPILE_DEFINITIONS

2010-02-11 Thread Ryan Pavlik
No, you need to pass the definition with /D or -D: CMake internally 
removes that prefix before adding it to your target properties (see the 
property COMPILE_DEFINITIONS), and generates the build command 
appropriately for the platform, with either /D or -D as the platform 
requires.  You can use either /D or -D in your CMakeLists.txt calls to 
add_definitions, and it will work cross-platform.


You might also run into issues with space vs. semicolon-delimited lists 
- I know compile flags are space-delimited in some places.


Basically - don't over think it, it will work fine just the way it is.

Ryan

On 02/11/2010 11:42 AM, paul.chav...@fnac.net wrote:

Hi.

As cmake should abstract us from the platforms, the compilo, etc. I wonder why so much 
project returns XXX_DEFINITIONS including -D.

So when we make ADD_DEFINITIONS(XXX_DEFINITIONS) everything work.
But when we do SET_PROPERTY( [...] COMPILE_DEFINITIONS [...] ) it doesn't work 
anymore.

So i think it is a bug to provide the -D, and that we shouldn't use 
ADD_DEFINITION for adding definitions.

So in my project i will do a STRING(REPLACE -D  XXX_DEFINITIONS 
${XXX_DEFINITIONS}) before doing SET_PROPERTY( [...] COMPILE_DEFINITIONS [...] ${XXX_DEFINITIONS})


Am I on the wright way ?

Thank you for your reading/comments.

Paul.

PS : there was a thread about this topic (msg21797), but no answer on the good 
practice.



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
   


--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Relocatable RPM

2010-02-11 Thread Eric Noulard
2010/2/11 Will Dicharry wdicha...@stellarscience.com:
 Is there a way to make an RPM package generated with CPack relocatable?

Should be possible, theoretically.
Currently the spec file generated by CPackRPM is not.

As far as I remember relocatable RPM should avoid absolute file
install and use %prefix directive.
(correct me if I'm wrong).

I dropped the usage of %prefix  in CPackRPM
some time ago but I could not remember why,  I'll dig into this later.

If you want to try yourself whether if it's possible or not
you may use cmake-2.8 RC1:
http://www.cmake.org/files/v2.8/

In this RC, CPackRPM supports user-provided spec file.
http://www.vtk.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29
or
cmake --help-module CPackRPM

the idea of user specified spec file is too allow user to provide its
own spec file
to CPackRPM.

However since CPackRPM use a short-cutted version of spec file
(because CPack generic generator does the install not rpmbuild)
you should begin with a template CPackRPM compatible spec file:

1) generate the template using cpack:
cpack -D CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE=1 -G RPM

2) modify the generated spec file.

3) use your spec file
cpack -D CPACK_RPM_USER_BINARY_SPECFILE=/path/to/your.spec -G RPM

If you find a solution I would be glad to integrate it in the mainline.

In any case I suggest you open a feature request for CPackRPM in the
bug tracker.
If you do so, please send the bug number here that way I would be aware of it.


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Bison extra headers

2010-02-11 Thread Hilton Medeiros
FYI, I won't put these in the issues tracker because I really don't
think these should be solved by the FindBISON module.

On Thu, 11 Feb 2010 10:57:44 -0200
Hilton Medeiros medeiros.hil...@gmail.com wrote:

 Hello,
 
 I'm using bison_target() from FindBISON with the C++ bison interface,
 on CMake 2.8.0. When using this interface the following extra files
 are generated by bison:
 
 location.hh
 position.hh
 stack.hh
 
 They do not get listed in BISON_target_OUTPUTS and do not get erased
 in 'make clean'. 
 
 See here:
 http://www.gnu.org/software/bison/manual/html_node/C_002b_002b-Bison-Interface.html
 
 Note that this manual seems outdated, there is no 'lalr1.c' for me,
 only 'lalr1.cc' on bison 2.4.1. Anyway, this is a very small issue,
 this is the workaround I'm using:
 
 set (BISON_EXTRA_HEADERS
 ${PROJECT_BINARY_DIR}/position.hh
 ${PROJECT_BINARY_DIR}/location.hh
 ${PROJECT_BINARY_DIR}/stack.hh
 )
 
 set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
 ${BISON_EXTRA_HEADERS})
 
 By the way, I saw that the main header file generated on
 bison_target() is always terminated by '.hpp'. I tried to bypass this
 with:
 
 bison_target (PARSER ${PARSER_FILE} ${PROJECT_BINARY_DIR}/Parser.cpp
   COMPILE_FLAGS
 --defines=${PROJECT_BINARY_DIR}/Parser.h)
 
 But then both Parser.hpp and Parser.h are generated. But this is also
 a very small issue.
 
 Finally, thanks a lot for supporting bison and flex in CMake.
 
 Kind regards,
 visibility guy
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Manual version vs CMake version

2010-02-11 Thread Alexander Neundorf
On Friday 05 February 2010, Mateusz Loskot wrote:
 Bill Hoffman wrote:
  Eric Noulard wrote:
  That's true, may be the site could indicate that the doc is for latest
  2.6.x serie.
  However the most trustfull way to check the doc of your current cmake
  version is the command line.
 
  cmake --help-command if
 
  should give you the doc for the cmake version you are using.
 
  if you want html you can use:
 
  cmake --help-html  cmake-doc.html
 
  then browse the cmake-doc.html file.
 
  Or cmake --version.

 Yes, all this is true and I've managed to find a solution myself quite
 easily, but I've posted as from position of an average
 (read, rather lazy) user who preferes pretty website to read doc
 than dark console  :-)

The documentation for previous cmake versions can be found here:
http://www.cmake.org/Wiki/CMake_Released_Versions

Alex
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] adding extra target to CMakeLists.txt

2010-02-11 Thread Olaf Peter
Tyler Roscoe schrieb:
 On Wed, Feb 10, 2010 at 09:08:50PM +0100, Olaf Peter wrote:
 How can I add an extra lint/syntax check target for my executable, like:

 check-syntax:
  c++ -o /dev/null ${CXX_FLAGS} ${CXX_DEFINES} -S ${MY_PROJECT_SOURCES}
 .PHONY: check-syntax
 
 You'll want to look at add_custom_command() and maybe
 add_custom_target(). The FAQ has some examples you can look to as well.

I did try it and it doesn't work:

---8--- CMakeList.txt
add_custom_target (syntax-check
  COMMAND ${CXX} CHECK_SRC)

---8 build/src/Makefile

# Convenience name for target.
src/CMakeFiles/syntax-check.dir/rule:
cd /home/olaf/Projects/programming/cpp/build  $(MAKE) -f
CMakeFiles/Makefile2 src/CMakeFiles/syntax-check.dir/rule
.PHONY : src/CMakeFiles/syntax-check.dir/rule

# Convenience name for target.
syntax-check: src/CMakeFiles/syntax-check.dir/rule
.PHONY : syntax-check

# fast build rule for target.
syntax-check/fast:
cd /home/olaf/Projects/programming/cpp/build  $(MAKE) -f
src/CMakeFiles/syntax-check.dir/build.make
src/CMakeFiles/syntax-check.dir/build
.PHONY : syntax-check/fast


It shall be equivilanet to a 'lint' target.

Thanks,
Olaf
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] adding extra target to CMakeLists.txt

2010-02-11 Thread Olaf Peter
OK, now I have it:

add_custom_target (syntax-check
 COMMAND $(CXX) $(CXXFLAGS) -Wall -Wextra -pedantic -fsyntax-only
$(CHECK_SRC) VERBATIM)


But how can I get there the Defines and Includes from regular target
compile?

Thanks,
Olaf
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] adding extra target to CMakeLists.txt

2010-02-11 Thread Ryan Pavlik

Load them from the target using the target properties:
get_directory_property(_include_dirs INCLUDE_DIRECTORIES)
set(_includeflags)
foreach(_dir ${_include_dirs})
list(APPEND _args ${YOURTOOL_INCLUDEPATH_ARG}${_dir})
endforeach()

get_target_property(_sources ${_targetname} SOURCES)
set(_files)
foreach(_source ${_sources})
get_source_file_property(_lang ${_source} LANGUAGE)
get_source_file_property(_loc ${_source} LOCATION)
if(${_lang} MATCHES CXX)
list(APPEND _files ${_loc})
endif()
endforeach()

Repeat with COMPILE_DEFINITIONS (and the per-config ones, if you want to 
make it fancy) and COMPILE_FLAGS.



Also, you may want to note: trying to troubleshoot your CMake files by 
looking at the generated Makefiles is generally a futile endeavor - 
better to just try a make VERBOSE=1 to see what's actually being run.  
(There's a lot of clutter in the generated makefiles to support all the 
slick stuff CMake gives us for free.)


Ryan

On 02/11/2010 01:41 PM, Olaf Peter wrote:

OK, now I have it:

add_custom_target (syntax-check
  COMMAND $(CXX) $(CXXFLAGS) -Wall -Wextra -pedantic -fsyntax-only
$(CHECK_SRC) VERBATIM)


But how can I get there the Defines and Includes from regular target
compile?

Thanks,
Olaf
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
   


--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Examples of CMAKE_INCLUDE_TRANSFORMS or other transform rules?

2010-02-11 Thread Jeremy Nicholl
Are there any examples of how to create transform rules using e.g. 
CMAKE_INCLUDE_TRANSFORMS?
I'm using MSYS and I ran into an issue where one of my header files has the line
#include foo\bar.h // Note backslash
In this case, the dependency that gets generated simply appends foo\bar.h to 
a well-formed MSYS path with forward slashes, and that seems to mean the file 
cannot be found. I was wondering if I could generate a transform rule to simply 
switch the backslash to a forward slash for dependency generation purposes, but 
setting the variable does not seem to set it when the dependencies are 
generated (in DependInfo.cmake, it does not seem to have the variable defined).

Thanks for your help.



  __
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Examples of CMAKE_INCLUDE_TRANSFORMS or other transform rules?

2010-02-11 Thread Ryan Pavlik
Well, you can really just use forward slashes on all platforms - Not 
really an answer to your direct question but might help you with the 
underlying situation.


Ryan

On 02/11/2010 04:18 PM, Jeremy Nicholl wrote:
Are there any examples of how to create transform rules using e.g. 
CMAKE_INCLUDE_TRANSFORMS?
I'm using MSYS and I ran into an issue where one of my header files 
has the line

#include foo\bar.h // Note backslash
In this case, the dependency that gets generated simply appends 
foo\bar.h to a well-formed MSYS path with forward slashes, and that 
seems to mean the file cannot be found. I was wondering if I could 
generate a transform rule to simply switch the backslash to a forward 
slash for dependency generation purposes, but setting the variable 
does not seem to set it when the dependencies are generated (in 
DependInfo.cmake, it does not seem to have the variable defined).


Thanks for your help.


Looking for the perfect gift?* Give the gift of Flickr!* 
http://www.flickr.com/gift/



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] How to turn off incremental linking for MSVC Debug and RelWithDebInfo targets?

2010-02-11 Thread Erwin Coumans
I can't find where this INCREMENTAL:YES is coming from.

Is there a better way than hacking the 'cmLocalVisualStudio7Generator
::GetBuildTypeLinkerFlags'
to replace INCREMENTAL:YES by INCREMENTAL:NO?

Thanks a lot,
Erwin




//
std::string
cmLocalVisualStudio7Generator
::GetBuildTypeLinkerFlags(std::string rootLinkerFlags, const char*
configName)
{
  std::string configTypeUpper = cmSystemTools::UpperCase(configName);
  std::string extraLinkOptionsBuildTypeDef =
rootLinkerFlags + _ + configTypeUpper;

  std::string extraLinkOptionsBuildType =
this-Makefile-GetRequiredDefinition
(extraLinkOptionsBuildTypeDef.c_str());

  cmSystemTools::ReplaceString(extraLinkOptionsBuildType,
/INCREMENTAL:YES, /INCREMENTAL:NO);

  return extraLinkOptionsBuildType;
}


On 9 February 2010 11:40, John Drescher dresche...@gmail.com wrote:

   STRING(REPLACE INCREMENTAL:YES INCREMENTAL:NO replacementFlags
  ${CMAKE_EXE_LINKER_FLAGS_DEBUG})
   message (${replacementFlags})
   SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG ${replacementFlags})
 
 
   STRING(REPLACE INCREMENTAL:YES INCREMENTAL:NO replacementFlags2
  ${CMAKE_EXE_LINKER_FLAGS})
   message (${replacementFlags2})
   SET(CMAKE_EXE_LINKER_FLAGS ${replacementFlag2})
 
 
  Is there a method using CMake 2.8 or CMake 2.8.1 that works?
 

 I thought that the following worked in the past since I have this in
 my CMakeLists.txt:
  SET(CMAKE_EXE_LINKER_FLAGS /INCREMENTAL:NO /MANIFEST /STACK:1000 )

 but it appears that this no longer works with cmake 2.8.0. I believe
 it worked previously.

 I do not have a solution for this yet.

 John

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] How to turn off incremental linking for MSVC Debug and RelWithDebInfo targets?

2010-02-11 Thread John Drescher
On Thu, Feb 11, 2010 at 6:46 PM, Erwin Coumans erwin.coum...@gmail.com wrote:

 I can't find where this INCREMENTAL:YES is coming from.
 Is there a better way than hacking the 'cmLocalVisualStudio7Generator
 ::GetBuildTypeLinkerFlags'
 to replace INCREMENTAL:YES by INCREMENTAL:NO?
 Thanks a lot,
 Erwin

I think it is set in here:

cmake-2.8\Modules\Platform\Windows-cl.cmake


# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtyp
# on versions that support it
SET( MSVC_INCREMENTAL_YES_FLAG )
IF(NOT MSVC_INCREMENTAL_DEFAULT)
  SET( MSVC_INCREMENTAL_YES_FLAG /INCREMENTAL:YES)
ENDIF()

IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
  SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT /debug /pdbtype:sept
${MSVC_INCREMENTAL_YES_FLAG})
  SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT /debug
/pdbtype:sept ${MSVC_INCREMENTAL_YES_FLAG})
ELSE (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
  SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT /debug ${MSVC_INCREMENTAL_YES_FLAG})
  SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT /debug
${MSVC_INCREMENTAL_YES_FLAG})
ENDIF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
# for release and minsize release default to no incremental linking

John

John
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Questions about CPack Debian generator

2010-02-11 Thread Thawan Kooburat
Hi,

I am trying to create a Debian binary package using CMake/CPack and it
is quite a nice tool. I understand that CMake/CPack try to rely on
external tools as little as possible but there are 2 issues that I
encountered while using the Debian generator

1. Dependency list - It would save a lot of effort if I can hook a
call to dpkg-shlibdeps during the package generation. So that
dependency list can be filled.
2. File owner - Since the generator compress the file by itself, so
the owner of the files is user who compile them. However, a Debian
binary package is normally created by using fakeroot dpkg-deb
--build, so that the owner of the files is root/root

Do you have any suggestion about these issues?


-- 
Thawan Kooburat

Graduate Student
Department of Computer Science
UW-Madison
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake