Re: [CMake] install(FILES mylib-config.cmake DESTINATION lib/myproj)

2009-10-20 Thread Mathieu Malaterre
On Mon, Oct 19, 2009 at 9:51 PM, Brad King brad.k...@kitware.com wrote:
 Mathieu Malaterre wrote:

 Hi there,

  I am trying some new functionalities in CMake, in particular:

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

  However using cmake 2.8, I get an error:

 CMake Error at cmake_install.cmake:64 (FILE):
  file INSTALL cannot find

  /home/mathieu/Perso/gdcm/Sandbox/CMakeBug/5/project1/myproj-config.cmake.


 It looks like the file is now named myproj-noconfig.cmake

 The file myproj-noconfig.cmake is internal to the

  install(EXPORT myproj DESTINATION lib/myproj)

 command and is managed by CMake.  It would be called

  myproj-debug.cmake

 if you set CMAKE_BUILD_TYPE to Debug.

 The wiki example you reference has the line

  install(FILES mylib-config.cmake DESTINATION lib/myproj)

 followed by this text:

  where mylib-config.cmake contains something like

 and then some sample code.  It is up to you to create the file.

Thanks Brad ! I was confused with the -noconfig appended when
CMAKE_BUILD_TYPE is set to nothing and the secret -config required for
find_package(BLA) to lookup a file named BLA-config.cmake. In summary,
the 'config' refers to find_package API, while 'noconfig' refers to
CMAKE_BUILD_TYPE API.

Cheers
-- 
Mathieu
___
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] Cross-compiling on OS X/x86 for Linux/ARM, linking a library

2009-10-20 Thread Vladimir Lebedev-Schmidthof

Hello Alexander,

On Oct 19, 2009, at 23:18 PM, Alexander Neundorf wrote:

 I set CMAKE_SYSTEM to Linux, even added SET(APPLE 0) but
 install_name option is still generating.

You should set CMAKE_SYSTEM_NAME, not CMAKE_SYSTEM to Linux.  
If you
really set CMAKE_SYSTEM instead of CMAKE_SYSTEM_NAME, this will fix  
your
problem (after a quick look it seems install_name is really only set  
in the

Modules/Platform/Darwin*.cmake files, which should not get loaded if
CMAKE_SYSTEM_NAME is set to Linux).

I tried. Setting CMAKE_SYSTEM_NAME to Linux does not seem to affect  
CMAKE_SYSTEM

(i.e. adding

-
SET(CMAKE_SYSTEM_NAME Linux)

...

MESSAGE(CMAKE_SYSTEM_NAME is ${CMAKE_SYSTEM_NAME})
MESSAGE(CMAKE_SYSTEM is ${CMAKE_SYSTEM})
-


results to

-
CMAKE_SYSTEM_NAME is Linux
CMAKE_SYSTEM is Darwin-9.8.0
-

Though

-
SET(CMAKE_SYSTEM Linux)
-

results to

CMAKE_SYSTEM_NAME is Darwin
CMAKE_SYSTEM is Linux


So it seems that I have to set to Linux both variables. Anyway, cmake  
keeps adding install_name (and other Darwin-specific things) to linker  
options.
___
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] Cross-compiling on OS X/x86 for Linux/ARM, linking a library

2009-10-20 Thread Hendrik Sattler

Zitat von Vladimir Lebedev-Schmidthof vlebe...@envionsoftware.com:

On Oct 19, 2009, at 23:18 PM, Alexander Neundorf wrote:

I set CMAKE_SYSTEM to Linux, even added SET(APPLE 0) but
install_name option is still generating.


You should set CMAKE_SYSTEM_NAME, not CMAKE_SYSTEM to Linux.  If you
really set CMAKE_SYSTEM instead of CMAKE_SYSTEM_NAME, this will fix  your
problem (after a quick look it seems install_name is really only set  in the
Modules/Platform/Darwin*.cmake files, which should not get loaded if
CMAKE_SYSTEM_NAME is set to Linux).


I tried. Setting CMAKE_SYSTEM_NAME to Linux does not seem to affect
CMAKE_SYSTEM


WHERE are you try to set this? Setting this in a CMakeLists.txt file  
will not work. Did you read the wiki page[1] about cross-compiling?

Check that CMAKE_CROSSCOMPILING is set to true.

HS

[1]: http://www.cmake.org/Wiki/CMake_Cross_Compiling


___
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] Cross-compiling on OS X/x86 for Linux/ARM, linking a library

2009-10-20 Thread Vladimir Lebedev-Schmidthof

Hello Hendrik,

On Oct 20, 2009, at 15:56 PM, Hendrik Sattler wrote:
 I tried. Setting CMAKE_SYSTEM_NAME to Linux does not seem to  
affect

 CMAKE_SYSTEM

WHERE are you try to set this? Setting this in a CMakeLists.txt file
will not work. Did you read the wiki page[1] about cross-compiling?
Check that CMAKE_CROSSCOMPILING is set to true.

HS

[1]: http://www.cmake.org/Wiki/CMake_Cross_Compiling




Thanks, I've read that before posting my first post :-)

I tried having toochain.cmake file in the same dir as CMakeLists.txt

using
cmake -DCMAKE_TOOLCHAIN_FILE=./toolchain.cmake .

does not seem to even read that file. I tried to state full path, move  
the file away, no luck.


So I just include()d my toolchain.cmake in CMakeLists.txt.

And, yes, CMAKE_CROSSCOMPILING is set to false.

I tried to set it to true but it has no effect.

By the way, on Linux host CMAKE_TOOLCHAIN_FILE variable doesn't have  
effect as well.


--
Sincerely Yours,
Vladimir Lebedev-Schmidthof___
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] Cross-compiling on OS X/x86 for Linux/ARM, linking a library

2009-10-20 Thread Hendrik Sattler

Zitat von Vladimir Lebedev-Schmidthof vlebe...@envionsoftware.com:

I tried having toochain.cmake file in the same dir as CMakeLists.txt

using
cmake -DCMAKE_TOOLCHAIN_FILE=./toolchain.cmake .

does not seem to even read that file. I tried to state full path, move
the file away, no luck.


Since you are doing an in-source build: did you make sure prior to  
issuing the above command that you cleaned the source directory from  
all cmake-generated files from previous runs (especially removing any  
CMakeCache.txt files)?


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] Cross-compiling on OS X/x86 for Linux/ARM, linking alibrary

2009-10-20 Thread Vladimir Lebedev-Schmidthof

Hello Hendrik,

On Oct 20, 2009, at 17:50 PM, Hendrik Sattler wrote:

Zitat von Vladimir Lebedev-Schmidthof vlebe...@envionsoftware.com:
 I tried having toochain.cmake file in the same dir as CMakeLists.txt

 using
 cmake -DCMAKE_TOOLCHAIN_FILE=./toolchain.cmake .

 does not seem to even read that file. I tried to state full path,  
move

 the file away, no luck.

Since you are doing an in-source build: did you make sure prior to
issuing the above command that you cleaned the source directory from
all cmake-generated files from previous runs (especially removing any
CMakeCache.txt files)?



No I didn't. I just did and all compiled and linked successfully.

Sorry for stupid questions then, I will remember to clean cmake- 
generated files in future.


Thank you very much.

--
Sincerely Yours,
Vladimir Lebedev-Schmidthof

___
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] Cross-compiling on OS X/x86 for Linux/ARM, linking alibrary

2009-10-20 Thread Bill Hoffman

Vladimir Lebedev-Schmidthof wrote:


No I didn't. I just did and all compiled and linked successfully.

Sorry for stupid questions then, I will remember to clean 
cmake-generated files in future.


Thank you very much.

--


You should use out of source builds in the future... :)

-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] COMPILE_FLAGS_CONFIG

2009-10-20 Thread Will Dicharry

Steven Wilson wrote:



-- Forwarded message --
From: *Steven Wilson* steven.wesley.wil...@gmail.com 
mailto:steven.wesley.wil...@gmail.com

Date: Mon, Oct 19, 2009 at 6:11 PM
Subject: Re: [CMake] COMPILE_FLAGS_CONFIG
To: Tyler Roscoe ty...@cryptio.net mailto:ty...@cryptio.net


Yes, but CMAKE_CXX_FLAGS_CONFIG and CMAKE_C_FLAGS_CONFIG are global 
in scope.   I want to be able to make changes to the compilation flags 
at the target level based on the current configuration.


Would set_target_properties() work?  Then you can do something like:

set_target_properties( ${TARGET} PROPERTIES COMPILE_FLAGS -fmyflag )

to set compile flags on a target by target basis.




On Mon, Oct 19, 2009 at 4:48 PM, Tyler Roscoe ty...@cryptio.net 
mailto:ty...@cryptio.net wrote:


On Mon, Oct 19, 2009 at 04:06:29PM -0600, Steven Wilson wrote:
  It appears that CMake does not support a COMPILE_FLAGS_CONFIG
target
  property.This kind of property would be incredibly useful.  
Is there

  some reason it does not exist?

Are you aware of CMAKE_CXX_FLAGS_CONFIG?

tyler






___
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



--
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

Re: [CMake] COMPILE_FLAGS_CONFIG

2009-10-20 Thread Steven Wilson
I am asking why CMake doesn't support the following:

set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS_CONFIG
-fmyflag)


Would set_target_properties() work?  Then you can do something like:

 set_target_properties( ${TARGET} PROPERTIES COMPILE_FLAGS -fmyflag )

 to set compile flags on a target by target basis.

___
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] COMPILE_FLAGS_CONFIG

2009-10-20 Thread Will Dicharry

Steven Wilson wrote:

I am asking why CMake doesn't support the following:

set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS_CONFIG
-fmyflag)



Ah...I see now, sorry for misunderstanding.  That would indeed be a 
useful feature, much like how you can set flags for different variants 
in Boost.Build.


With generators that don't support configuration types, you can hack 
your way around it with if statements:


if( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
  set_target_properties(...)

but that's kind of a crummy solution and won't work with the VS 
generator.  I would also be curious to find a solution to your problem.




Would set_target_properties() work?  Then you can do something like:

set_target_properties( ${TARGET} PROPERTIES COMPILE_FLAGS -fmyflag )

to set compile flags on a target by target basis.





--
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

Re: [CMake] Error in read script when not calling CTEST_TEST in ctest script

2009-10-20 Thread winfried_mb2
Thanks for the reply, it's clear now.

It's also a bit unfortunate though for some cases. The CTEST_TEST(...) call 
will always result in an exit code of 255 if no tests have been defined in the 
CMakeLists.txt. Since the script below is called from a build system it would 
be nice to be able to see if one or more tests failed, or if there were simply 
no tests defined for that software component (which is  not an error).

regards, 
Arthur 
 

On Monday 19 October 2009 20:31:44 David Cole wrote:
 The return value of ctest after it runs a -S script indicates whether the
 script as a whole succeeded or not. The only way it succeeds all the way and
 returns 0 is if *all* of the steps invoked are error free.
 The build errors mean that ctest's return value will be non-zero. (Same for
 update, configure or test errors as well...)
 
 
 HTH,
 David
 
 
 

___
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] Encapsulating macros

2009-10-20 Thread Theodore Papadopoulo
Following-up a previous message Re: [CMake] Updating cache entries on 
variable modification, I would like

to encapsulate the FIND_LIBRARY.

Taking a simple example, let's assume that I'd like to have a list of 
all the calls of FIND_LIBRARY I did.
Is there a way of creating a cmake script that basically does something 
like:


MACRO(SAVED_FIND_LIBRARY)
   FIND_LIBRARY(${ARGN})
ENDMACRO()

MACRO(FIND_LIBRARY VAR)
   SET(MY_LIB_LIST ${MY_LIB_LIST} ${VAR})
   SAVED_FIND_LIBRARY(${VAR} ${ARGN})
ENDMACRO()

Obviously this does not work
Is there a tricky way to achieve this, or should  resign myself to use a 
new name ?


   Thank's...

___
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] COMPILE_FLAGS_CONFIG

2009-10-20 Thread Tyler
Please reply to the list so others can help.

On Mon, Oct 19, 2009 at 06:11:23PM -0600, Steven Wilson wrote:
 Yes, but CMAKE_CXX_FLAGS_CONFIG and CMAKE_C_FLAGS_CONFIG are global in
 scope.   I want to be able to make changes to the compilation flags at the
 target level based on the current configuration.

Ok; just wanted to make sure you knew about them.

Can you use set_source_files_properties() or set_target_properties()
with the COMPILE_FLAGS property?

tyler
___
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] COMPILE_FLAGS_CONFIG

2009-10-20 Thread Steven Wilson
I am asking why CMake doesn't support the following:

set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS_CONFIG
-fmyflag)

On Tue, Oct 20, 2009 at 10:44 AM, Tyler ty...@cryptio.net wrote:

 Please reply to the list so others can help.

 On Mon, Oct 19, 2009 at 06:11:23PM -0600, Steven Wilson wrote:
  Yes, but CMAKE_CXX_FLAGS_CONFIG and CMAKE_C_FLAGS_CONFIG are global
 in
  scope.   I want to be able to make changes to the compilation flags at
 the
  target level based on the current configuration.

 Ok; just wanted to make sure you knew about them.

 Can you use set_source_files_properties() or set_target_properties()
 with the COMPILE_FLAGS property?

 tyler

___
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] COMPILE_FLAGS_CONFIG

2009-10-20 Thread Tyler Roscoe
Disregard my previous reply.

On Tue, Oct 20, 2009 at 09:28:19AM -0600, Steven Wilson wrote:
 I am asking why CMake doesn't support the following:
 
 set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS_CONFIG
 -fmyflag)

Ok, good question. It seems like a pretty compelling feature.

Maybe you can cheat and do something like this?:

set (CMAKE_CXX_FLAGS_DEBUG_BACKUP ${CMAKE_CXX_FLAGS_DEBUG})
set (CMAKE_CXX_FLAGS_DEBUG -fmyflag)
add_library (...)
set (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG_BACKUP})

tyler
___
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] COMPILE_FLAGS_CONFIG

2009-10-20 Thread Philip Lowman
cmake.org/Bug/view.php?id=6493

On Oct 20, 2009 11:29 AM, Steven Wilson steven.wesley.wil...@gmail.com
wrote:

I am asking why CMake doesn't support the following:

set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS_CONFIG
-fmyflag)

 Would set_target_properties() work?  Then you can do something like:  
set_target_properties(...

___
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
___
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] Encapsulating macros

2009-10-20 Thread Alexander Neundorf
On Tuesday 20 October 2009, Theodore Papadopoulo wrote:
 Following-up a previous message Re: [CMake] Updating cache entries on
 variable modification, I would like
 to encapsulate the FIND_LIBRARY.

 Taking a simple example, let's assume that I'd like to have a list of
 all the calls of FIND_LIBRARY I did.
 Is there a way of creating a cmake script that basically does something
 like:

 MACRO(SAVED_FIND_LIBRARY)
 FIND_LIBRARY(${ARGN})
 ENDMACRO()

 MACRO(FIND_LIBRARY VAR)
 SET(MY_LIB_LIST ${MY_LIB_LIST} ${VAR})
 SAVED_FIND_LIBRARY(${VAR} ${ARGN})
 ENDMACRO()

 Obviously this does not work
 Is there a tricky way to achieve this, or should  resign myself to use a
 new name ?

There was something...
If you override an already existing macro/command, the previous version is 
still available, but with an underscore prefixed, i.e. _find_library().
I'm not sure I remember correctly, but it was somethign close to this.

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] COMPILE_FLAGS_CONFIG

2009-10-20 Thread Steven Wilson
Sweet! Thanks much!

On Tue, Oct 20, 2009 at 10:59 AM, Philip Lowman phi...@yhbt.com wrote:

 cmake.org/Bug/view.php?id=6493

 On Oct 20, 2009 11:29 AM, Steven Wilson steven.wesley.wil...@gmail.com
 wrote:

 I am asking why CMake doesn't support the following:

 set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS_CONFIG
 -fmyflag)

  Would set_target_properties() work?  Then you can do something like:  
 set_target_properties(...

 ___
 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


___
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 install scripts for debian

2009-10-20 Thread as
Mathieu, Eric:

Merci! Strangely when I searched online, I didn't find the link that
Mathieu sent. The command that Eric suggested worked fine. I was able
to test it only today.

Thanks again. I have updated the wiki pages as well.

Aravind.

On 10/19/09, Eric Noulard eric.noul...@gmail.com wrote:
 2009/10/19 Mathieu Malaterre mathieu.malate...@gmail.com:

  On Fri, Oct 16, 2009 at 8:15 PM, Eric Noulard eric.noul...@gmail.com 
  wrote:
   2009/10/16 as rmct...@gmail.com:
   Hello:
  
   We are using CMake to create inhouse deb packages for our project. We
   need to run a script after installing the package: postinst script
   which is possible in Debian. I don't know how to enable this from
   CMake - do I set some flags? Do I just put the file in a particular
   location? I'm not able to find much help on the web.
  
   Normally information about CPack generator may be found on the Wiki
http://www.cmake.org/Wiki/CMake:CPackPackageGenerators
  
  
   Actually it is located here:
   http://www.itk.org/Wiki/CMake:CPackConfiguration#Debian_settings


 OK right.
  Thank you Mathieu,

  I did add a link on both pages because
  some informations may be found on both pages and some
  may only be found in one of them.

  May be those pages would benefit a clean merge...
  I may try that later.


  --
  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

___
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] working around rc.exe too many -I# options

2009-10-20 Thread Tyler Roscoe
I am trying to add Windows versioning information to my project. I am
using CMake 2.6.2 and VS2005.

I have crafted a version.rc file which I use with all my libraries and
executables. This is working well except for one library which has 94
include directories, one greater than the 93 directory limit (lol)
imposed by rc.exe, the Windows resource compiler.

Thus, I am running into this issue:

http://social.msdn.microsoft.com/forums/en-US/vcgeneral/thread/97be1e3a-82ec-430d-a260-d75ea173b62e

Yes, the library probably could/should be refactored to get rid of this
excessive number of include dirs, but that's not how it is today and I
would prefer not to change it at this time.

Has anyone hacked around this problem?

One thing that might work would be to alter the include directories used
by the version.rc file (it obviously doesn't need all those headers; it
just needs to be able to find and #include the two version-related
headers). Unfortunately, the INCLUDE_DIRECTORIES property is only
available at the directory level so I don't see a way to say, all these
.cpp files use these include dirs; this .rc file uses these other
include dirs.

TIA,
tyler
___
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] working around rc.exe too many -I# options

2009-10-20 Thread John Drescher
 I am trying to add Windows versioning information to my project. I am
 using CMake 2.6.2 and VS2005.

 I have crafted a version.rc file which I use with all my libraries and
 executables. This is working well except for one library which has 94
 include directories, one greater than the 93 directory limit (lol)
 imposed by rc.exe, the Windows resource compiler.

 Thus, I am running into this issue:

 http://social.msdn.microsoft.com/forums/en-US/vcgeneral/thread/97be1e3a-82ec-430d-a260-d75ea173b62e

 Yes, the library probably could/should be refactored to get rid of this
 excessive number of include dirs, but that's not how it is today and I
 would prefer not to change it at this time.

 Has anyone hacked around this problem?


I have this in my main project. No, I have not found a good solution.
I should have reported this months ago. Since I was busy at the time I
just disabled the .rc and I have no icon..

John M. Drescher
___
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] Setting system environment variables through NSIS

2009-10-20 Thread James Bigler
Does CPack support setting system environment variables through the
NSIS installer?

Thanks,
James
___
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] working around rc.exe too many -I# options

2009-10-20 Thread David Cole
One easy way to hack around this problem would be to use add_custom_command
to invoke the rc.exe directly...

Not sure if you could just include a *.res file (output from rc) as a source
in an add_library or add_executable call, though.

Worth a shot


On Tue, Oct 20, 2009 at 3:20 PM, John Drescher dresche...@gmail.com wrote:

  I am trying to add Windows versioning information to my project. I am
  using CMake 2.6.2 and VS2005.
 
  I have crafted a version.rc file which I use with all my libraries and
  executables. This is working well except for one library which has 94
  include directories, one greater than the 93 directory limit (lol)
  imposed by rc.exe, the Windows resource compiler.
 
  Thus, I am running into this issue:
 
 
 http://social.msdn.microsoft.com/forums/en-US/vcgeneral/thread/97be1e3a-82ec-430d-a260-d75ea173b62e
 
  Yes, the library probably could/should be refactored to get rid of this
  excessive number of include dirs, but that's not how it is today and I
  would prefer not to change it at this time.
 
  Has anyone hacked around this problem?
 

 I have this in my main project. No, I have not found a good solution.
 I should have reported this months ago. Since I was busy at the time I
 just disabled the .rc and I have no icon..

 John M. Drescher
 ___
 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

___
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] environment variables scope

2009-10-20 Thread James C. Sutherland
How do I set an environment variable so that it is visible globally in  
CMake?  Specifically, I want to have it visible when I run something  
like:


#---
# set the environment variable value
set( ENV{myVariable} ... )

# run a test through a CMake script that requires the environment  
variable set above.

add_test( myTest
  ${CMAKE_COMMAND}
  -D exe_name:STRING=myExecutable
  -P ${PROJECT_SOURCE_DIR}/test_problems/run_test.cmake
  )
#---

In the run_test.cmake file I would like to have myVariable  
available as an environment variable, but it is not, despite the fact  
that it was set prior to the execution of run_test.cmake.


What am I missing here?

James

___
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] Are CMake files aware of their path?

2009-10-20 Thread James C. Sutherland
If I add a CMake file via add_subdirectory is there a way to obtain  
its absolute or relative path?


___
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] environment variables scope

2009-10-20 Thread Alexander Neundorf
On Tuesday 20 October 2009, James C. Sutherland wrote:
 How do I set an environment variable so that it is visible globally in
 CMake?  Specifically, I want to have it visible when I run something
 like:

 #---
 # set the environment variable value
 set( ENV{myVariable} ... )

 # run a test through a CMake script that requires the environment
 variable set above.
 add_test( myTest
${CMAKE_COMMAND}
-D exe_name:STRING=myExecutable
-P ${PROJECT_SOURCE_DIR}/test_problems/run_test.cmake
)
 #---

 In the run_test.cmake file I would like to have myVariable
 available as an environment variable, but it is not, despite the fact
 that it was set prior to the execution of run_test.cmake.

 What am I missing here?

The environment variable you set above is only set during that cmake run, i.e. 
it is not set during e.g. the makefile invocation and also not during ctest 
run.

If you need special env.vars set during testing, you either can wrap it into 
an extra shell script which does that or use cmake 2.8.0/current cvs HEAD, 
there you can set an ENVIRONMENT property on the tests.

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] Are CMake files aware of their path?

2009-10-20 Thread Alexander Neundorf
On Tuesday 20 October 2009, James C. Sutherland wrote:
 If I add a CMake file via add_subdirectory is there a way to obtain
 its absolute or relative path?

Check ${CMAKE_CURRENT_LIST_FILE}, you may combine this with 
get_filename_component().

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