Re: [CMake] library usage

2009-05-11 Thread Werner Smekal
Hi Simon, scan through the documentation of cmake http://www.cmake.org/cmake/help/cmake2.6docs.html especially the commands part: http://www.cmake.org/cmake/help/cmake2.6docs.html#section_Commands In order to add include directories use include_directories http://www.cmake.org/cmake/help/ c

Re: [CMake] library usage

2009-05-11 Thread Mathieu Malaterre
On Tue, May 12, 2009 at 3:33 AM, Simon Friedberger wrote: > Hello listmembers, > > I have just spent the better part of today trying to convert my old > Makefile to a CMakeLists.txt and failed miserably. I may have made some > major mistakes since this is my first such effort. > > I could not figu

Re: [CMake] add_test and locating dependent DLL's on Windows

2009-05-11 Thread Werner Smekal
Hi. As I said, on Linux when I do "make test", my_test gets run fine--I think because rpath is properly recording the location of the shared libraries. On windows (Visual Studio 2005), my_test will not run. When I execute ctest by hand, I am told that it cannot locate 'util.dll' (as we

Re: [CMake] [PATCH] slightly modify cache variable behaviour, Was: Re: option() behavior

2009-05-11 Thread Philip Lowman
On Mon, May 11, 2009 at 4:53 PM, Alexander Neundorf wrote: > On Monday 11 May 2009, Bill Hoffman wrote: > > Alexander Neundorf wrote: > > > On Monday 11 May 2009, Bill Hoffman wrote: > > >> So, CMake has done what it does now from the start. There was a > short > > >> period of time when it did

[CMake] library usage

2009-05-11 Thread Simon Friedberger
Hello listmembers, I have just spent the better part of today trying to convert my old Makefile to a CMakeLists.txt and failed miserably. I may have made some major mistakes since this is my first such effort. I could not figure out how to include libraries correctly so in the end I tried to crea

Re: [CMake] [PATCH] slightly modify cache variable behaviour, Was: Re: option() behavior

2009-05-11 Thread Alexander Neundorf
On Monday 11 May 2009, Bill Hoffman wrote: > Alexander Neundorf wrote: > > On Monday 11 May 2009, Bill Hoffman wrote: > >> So, CMake has done what it does now from the start. There was a short > >> period of time when it did not, and that was when a re-write was done, > >> and it quickly broke so

[CMake] CMake version check 2.7 versus 2.6.4

2009-05-11 Thread John Drescher
After trying to go back to the released version of cmake versus the nightly builds I am getting errors like this: CMake Error at C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/CMakeImportBuildSettings.cmake:14 (MESSAGE): ITK was built using CMake 2.7, but this is CMake2.6. Please upgrade CM

Re: [CMake] [PATCH] slightly modify cache variable behaviour, Was: Re: option() behavior

2009-05-11 Thread Bill Hoffman
Alexander Neundorf wrote: On Monday 11 May 2009, Bill Hoffman wrote: So, CMake has done what it does now from the start. There was a short period of time when it did not, and that was when a re-write was done, and it quickly broke some existing projects. Here is the thread: Yes, I can imagi

Re: [CMake] howto not remove an output in make clean

2009-05-11 Thread Denis Scherbakov
> Is there a way to tell "make clean" to *not* > remove the output from > the custom command "foo.cpp" ? You could try INSTALL to place a copy of this file, where you want. Denis ___ Powered by www.kitware.com Visit other Kitware open-source

[CMake] howto not remove an output in make clean

2009-05-11 Thread Gaspard Bucher
Hi list ! I have a command that generates a "foo.cpp" file from a ragel parser definition "foo.rl". I am doing an out-of-source build but I would like to keep the generated file in the source so that it is committed and end users do not need to install ragel because "foo.cpp" is newer then "foo.rl

Re: [CMake] Implicity CMAKE_CURRENT_BINARY_DIR include_directories

2009-05-11 Thread Brad King
Denis Scherbakov wrote: On Monday 11 May 2009, Denis Scherbakov wrote: CMAKE_LINK_DEPENDS_DEBUG_MODE is also not documented. Is this one an official public variable or may it go away again ? If you ask me - I don't know, I am not a CMake developer. But there is a lot functionality built aroun

Re: [CMake] QT4_WRAP_CPP

2009-05-11 Thread Alexander Neundorf
Hi Zack, On Monday 11 May 2009, Zack Galbreath wrote: > In what version of CMake was QT4_WRAP_CPP added? I'm working on a > project that relies on this command, and I'd like to set > CMAKE_MINIMUM_REQUIRED appropriately. KDE 4.0 (released January last year) and 4.1 require CMake 2.4.5, so you ca

Re: [CMake] QT4_WRAP_CPP

2009-05-11 Thread Clinton Stimpson
It was added in CMake 2.2, which is when FindQt4.cmake was introduced. Clint Zack Galbreath wrote: In what version of CMake was QT4_WRAP_CPP added? I'm working on a project that relies on this command, and I'd like to set CMAKE_MINIMUM_REQUIRED appropriately. -Zack

Re: [CMake] [PATCH] slightly modify cache variable behaviour, Was: Re: option() behavior

2009-05-11 Thread Alexander Neundorf
On Monday 11 May 2009, Bill Hoffman wrote: > So, CMake has done what it does now from the start. There was a short > period of time when it did not, and that was when a re-write was done, > and it quickly broke some existing projects. Here is the thread: Yes, I can imagine that. Still the curre

[CMake] QT4_WRAP_CPP

2009-05-11 Thread Zack Galbreath
In what version of CMake was QT4_WRAP_CPP added? I'm working on a project that relies on this command, and I'd like to set CMAKE_MINIMUM_REQUIRED appropriately. -Zack ___ Powered by www.kitware.com Visit other Kitware open-source projects at http:/

[CMake] add_test and locating dependent DLL's on Windows

2009-05-11 Thread Scott Gray
All, I currently have a test program that is used to test an API in shared library that I am producing as part of the build. The build of the shared library and running of the test program is working on Linux but not on Windows because it appears to me that my test program cannot find the DL

Re: [CMake] Implicity CMAKE_CURRENT_BINARY_DIR include_directories

2009-05-11 Thread Denis Scherbakov
> On Monday 11 May 2009, Denis Scherbakov wrote: > > CMAKE_LINK_DEPENDS_DEBUG_MODE is also not documented. > > Is this one an official public variable or may it go away > again ? If you ask me - I don't know, I am not a CMake developer. But there is a lot functionality built around this variab

Re: [CMake] Implicity CMAKE_CURRENT_BINARY_DIR include_directories

2009-05-11 Thread Alexander Neundorf
On Monday 11 May 2009, Denis Scherbakov wrote: > CMAKE_LINK_DEPENDS_DEBUG_MODE is also not documented. Is this one an official public variable or may it go away again ? > > > set(CMAKE_INCLUDE_CURRENT_DIR ON) > > > > > > Ooops, seems it's not documented. > > > I'll fix that. > > > > Documentation

Re: [CMake] Problems building statically linked executable

2009-05-11 Thread Brad King
Marcel Loose wrote: I'm really struggling to build statically linked executables with CMake (also see my previous post with subject: Static linking and find_library). I've answered in that thread. Furthermore I added the '-static' flag to the linker with SET(CMAKE_EXE_LINKER_FLAGS -static).

Re: [CMake] Static linking and find_library

2009-05-11 Thread Brad King
Bill Hoffman wrote: Marcel Loose wrote: 2) How can I persuade find_library() to only search for static libraries? You can't. Yes, you can: find_library(MATH_LIB NAMES libm.a) If you specify a valid library name then CMake will look for it directly instead of prepending 'lib' and appendin

Re: [CMake] Swig C# wrapper - cmake example?

2009-05-11 Thread Mathieu Malaterre
On Mon, May 11, 2009 at 6:35 PM, Ian Curington wrote: > Dear Mathieu, > > I noticed on http://www.nabble.com/Using-SWIG-%2B-C--td19970947.html#a19975983 > that you seem to be very close to having some Cmake+Swig+C# solution. > I have working Cmake+Swig+Python (Xdmf), and am starting to extend it >

Re: [CMake] [PATCH] slightly modify cache variable behaviour, Was: Re: option() behavior

2009-05-11 Thread Brad King
Bill Hoffman wrote: So, CMake has done what it does now from the start. There was a short period of time when it did not, and that was when a re-write was done, and it quickly broke some existing projects. Here is the thread: http://www.cmake.org/pipermail/cmake/2007-March/013204.html I th

Re: [CMake] using IMPORTED targets in multiple projects within one CMake tree

2009-05-11 Thread Brad King
Alexander Neundorf wrote: On Tuesday 05 May 2009, alexandre.feb...@thomsonreuters.com wrote: I saw this too. IMHO, it's a bug. If it's a feature, I don't see the point. I think it's a feature that imported targets are not global. Brad explained this in a mail not too long ago, but I don't rem

Re: [CMake] Don't understand simple code

2009-05-11 Thread Tyler Roscoe
On Mon, May 11, 2009 at 09:03:37AM -0700, Denis Scherbakov wrote: > MACRO(MYTEST argTemp) > LIST(LENGTH argTemp varLen) > MESSAGE("Len: ${varLen}") > > SET (argTemp "${argTemp}") > > LIST(LENGTH argTemp varLen) > MESSAGE("Len: ${varLen}") > ENDMACRO () > > MYTEST("something;new") >

[CMake] Don't understand simple code

2009-05-11 Thread Denis Scherbakov
MACRO(MYTEST argTemp) LIST(LENGTH argTemp varLen) MESSAGE("Len: ${varLen}") SET (argTemp "${argTemp}") LIST(LENGTH argTemp varLen) MESSAGE("Len: ${varLen}") ENDMACRO () MYTEST("something;new") # prints: 0, 2 Am I referring variables in MACRO correctly? Why second version prints

Re: [CMake] How do I generate a preprocessed file?

2009-05-11 Thread Piotr Wyderski
Bill Hoffman wrote: > You do know about make foo.i where CMake will do this for you, right? No, I didn't. But now I do -- it does exactly what I want. Thanks! :-) Best regards Piotr Wyderski ___ Powered by www.kitware.com Visit other Kitware open-sour

Re: [CMake] CPack RPM : support for custom user spec file and post/pre install scripts

2009-05-11 Thread Florent Lagaye
Eric Noulard a écrit : 2009/5/11 Florent Lagaye : Eric Noulard a écrit : Hi CPack RPM user, I did implement a new feature in CPack RPM generator which: 1) gives control of post/pre (un)install script of the RPM spec files 2) supports user provided spec file. Any interested people sho

Re: [CMake] Library directory flag

2009-05-11 Thread Tyler Roscoe
On Mon, May 11, 2009 at 05:05:33PM +0200, Michele Bosi wrote: > Is there a way to do this thing in a portable way, something like > "include_directories()" but for library directories? http://www.cmake.org/cmake/help/cmake2.6docs.html#command:link_directories tyler ___

[CMake] Library directory flag

2009-05-11 Thread Michele Bosi
I'm sure this question has been asked already many times but I cound't find any info in the archive (also because it seems that the archive is not searchable...). I would like to know how to add a library directory flag to a target. For now I could only find the command: set_target_properties(WX_e

Re: [CMake] CPack RPM : support for custom user spec file and post/pre install scripts

2009-05-11 Thread Eric Noulard
2009/5/11 Florent Lagaye : > Eric Noulard a écrit : >> >> Hi CPack RPM user, >> >> I did implement a new feature in CPack RPM generator which: >> >> 1) gives control of post/pre (un)install script of the RPM spec files >> 2) supports user provided spec file. >> >> Any interested people should have

Re: [CMake] CPack RPM : support for custom user spec file and post/pre install scripts

2009-05-11 Thread Florent Lagaye
Eric Noulard a écrit : Hi CPack RPM user, I did implement a new feature in CPack RPM generator which: 1) gives control of post/pre (un)install script of the RPM spec files 2) supports user provided spec file. Any interested people should have a look at the tracker which contains both a patch a

Re: [CMake] How do I generate a preprocessed file?

2009-05-11 Thread Bill Hoffman
Piotr Wyderski wrote: Tyler Roscoe wrote: Thinking about this more, is there anything handed off to the compiler that affects the preprocessor other than definitions (-D flags)? Yes, a lot of them: include directories specification, optimization flags (they also work as -D directives, e.g. th

Re: [CMake] CMake module contribution.

2009-05-11 Thread Bill Hoffman
Corentin Chary wrote: Hi, We've done FindFUSE.cmake FindUBIIO.cmake FindUUID.cmake for our project. What is the best way to get them merged upstream ? Thanks http://www.cmake.org/Wiki/CMake:Module_Maintainers ___ Powered by www.kitware.com Visit

Re: [CMake] [PATCH] slightly modify cache variable behaviour, Was: Re: option() behavior

2009-05-11 Thread Bill Hoffman
So, CMake has done what it does now from the start. There was a short period of time when it did not, and that was when a re-write was done, and it quickly broke some existing projects. Here is the thread: http://www.cmake.org/pipermail/cmake/2007-March/013204.html I think the rule should b

Re: [CMake] Problems building statically linked executable

2009-05-11 Thread Marcel Loose
Reply to self. On Mon, 2009-05-11 at 10:26 +0200, Marcel Loose wrote: --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- > In the mean time, is there a way to get rid of these spurious > -Wl,-Bdynamic and -Wl,-Bstatic flags? OK, I'll use this dirty hack for the time being when creating statica

Re: [CMake] eclipse generator and sibling folders

2009-05-11 Thread Michael Jackson
This is an eclipse issue. What you need to do is to build with "VERBOSE=1" inside eclipse. That will cause the full compile commands to be emitted which will allow Eclipse to parse those commands for "- I" arguments. Eclipse will then add those paths to it's include list. Also, if this happ

Re: [CMake] eclipse generator and sibling folders

2009-05-11 Thread Tim Cramer
Hi all, Eric Noulard wrote: 2009/5/4 Miguel A. Figueroa-Villanueva : I did just gave a "generic" Eclipse CDT advice which does not fits the Eclipse CDT generator case (but my "hand-made" Eclipse project with CMake which enables to use CVS) again sorry about the confusion. -- Erk Ah

[CMake] Problems building statically linked executable

2009-05-11 Thread Marcel Loose
Hi all, I'm really struggling to build statically linked executables with CMake (also see my previous post with subject: Static linking and find_library). So far, I've been able to persuade find_library() into only finding static libraries (this is on Linux). SET(CMAKE_FIND_LIBRARY_SUFFIXES .a) d

Re: [CMake] Implicity CMAKE_CURRENT_BINARY_DIR include_directories

2009-05-11 Thread Denis Scherbakov
CMAKE_LINK_DEPENDS_DEBUG_MODE is also not documented. > > set(CMAKE_INCLUDE_CURRENT_DIR ON) > > > > Ooops, seems it's not documented. > > I'll fix that. > > Documentation committed to HEAD. ___ Powered by www.kitware.com Visit other Kitware

Re: [CMake] Static linking and find_library

2009-05-11 Thread Denis Scherbakov
Currently there is no way to do something like -Wl,-Bstatic -lname -Wl,-Bdynamic I can assume that some people in some situations may want to do that. > > Marcel Loose wrote: > ... > > > 2) How can I persuade find_library() to only > search for static > > > libraries? > > > > You can't. > > Peo

[CMake] CMake module contribution.

2009-05-11 Thread Corentin Chary
Hi, We've done FindFUSE.cmake FindUBIIO.cmake FindUUID.cmake for our project. What is the best way to get them merged upstream ? Thanks -- Corentin Chary http://xf.iksaif.net ___ Powered by www.kitware.com Visit other Kitware open-source projects at

Re: [CMake] Problem with FindPythonLibs

2009-05-11 Thread Marcel Loose
Hi Tyler, That line is already present in my CMakeLists.txt file. Best regards, Marcel. On Fri, 2009-05-08 at 09:37 -0700, Tyler Roscoe wrote: > On Fri, May 08, 2009 at 12:13:57PM +0200, Marcel Loose wrote: > > So, it appears as if CMake is not searching the /usr/lib64 directory. Am > > I missin