Re: [CMake] Setting variables in CMakeLists.txt

2009-04-30 Thread Philip Lowman
On Thu, Apr 30, 2009 at 5:45 PM, barcaroller wrote: > > I'm having problems setting variables in my CMakeLists.txt files. > Specifically, the following two lines have absolutely no effect, regardless > of what values I give them: > > >SET (CMAKE_VERBOSE_MAKEFILEON) Which version of CMake

Re: [CMake] Location of library to be linked changing over time

2009-04-30 Thread Philip Lowman
On Thu, Apr 30, 2009 at 8:41 PM, Bill O'Hara wrote: > Thanks for the suggestion - a useful trick to have. I'd love an automatic > way to trigger it though rather than having to run make rebuild_cache or > thiis unset of the variable. You could simply do this... unset(FOO_LIBRARY CACHE) find_li

Re: [CMake] Location of library to be linked changing over time

2009-04-30 Thread Bill O'Hara
Thanks for the suggestion - a useful trick to have. I'd love an automatic way to trigger it though rather than having to run make rebuild_cache or thiis unset of the variable. On Thu, Apr 30, 2009 at 5:16 PM, Philip Lowman wrote: > 2009/4/30 Bill O'Hara > >> Thanks - I wasn't sure I was explai

Re: [CMake] Location of library to be linked changing over time

2009-04-30 Thread Philip Lowman
2009/4/30 Bill O'Hara > Thanks - I wasn't sure I was explaining very clearly! I think "retriggering > find_library" is a far more concise way to say it. > > Could perhaps a cmake developer comment on whether its possible to do this? > Is there some workaround we could currently use to retrigger t

Re: [CMake] eclipse generator and sibling folders

2009-04-30 Thread Miguel A. Figueroa-Villanueva
On Thu, Apr 30, 2009 at 7:54 AM, Antoine DUCHAMPS wrote: [...] > sugest to create source and build folders as "siblings". From this I > understand that I have to folders like > > /home/user/project-src > /home/user/project-bin > > So, how can be the source inside the project? I assume that I have t

[CMake] Setting variables in CMakeLists.txt

2009-04-30 Thread barcaroller
I'm having problems setting variables in my CMakeLists.txt files. Specifically, the following two lines have absolutely no effect, regardless of what values I give them: SET (CMAKE_VERBOSE_MAKEFILEON) SET (CMAKE_USE_RELATIVE_PATHS ON) Note: I've also tried TRUE and YES instead

Re: [CMake] Location of library to be linked changing over time

2009-04-30 Thread Bill O'Hara
Thanks - I wasn't sure I was explaining very clearly! I think "retriggering find_library" is a far more concise way to say it. Could perhaps a cmake developer comment on whether its possible to do this? Is there some workaround we could currently use to retrigger the find_library to check whether

Re: [CMake] Location of library to be linked changing over time

2009-04-30 Thread Adolfo Rodríguez
I understand perfectly what you say, but it doesn't look like it's the currently implemented policy for retriggering find_library. Right now it looks like it all depends on the value of the cached variable. I have a somewhat similar use-case where I want to force find_package to look again for a pa

[CMake] Fwd: Location of library to be linked changing over time

2009-04-30 Thread Bill O'Hara
Apologies - meant to hit reply all. -- Forwarded message -- From: Bill O'Hara Date: 2009/4/30 Subject: Re: [CMake] Location of library to be linked changing over time To: Adolfo Rodríguez Hi Adolfo, Thanks for the suggestion. I understand that I can rerun cmake and have it fin

Re: [CMake] Location of library to be linked changing over time

2009-04-30 Thread Adolfo Rodríguez
Hi Bill, When you invoke find_library, FOO is created as a cache entry. As long as FOO has a value (i.e., not FOO_NOTFOUND) find_library will not refresh its contents on succesive runs of cmake. If you unset(FOO CACHE) and rerun cmake, then the foo library will be searched for again. Is this a goo

[CMake] Location of library to be linked changing over time

2009-04-30 Thread Bill O'Hara
Lets say I have a CMakeLists.txt that looks like this find_library(FOO foo /tmp/a /tmp/b) add_executable(bar bar.c) target_link_libraries(bar ${FOO}) add_test(test_bar bar) then I run cmake, FOO is filled in with the located library from /tmp/b, and I run make all;make test. All is good. If I cha

[CMake] Proposal: variant of create_test_sourcelist using sym- or hard-links

2009-04-30 Thread Jed Brown
For executables that are strictly tests (i.e. will never be invoked directly by the user) there is no problem with calling the executable as CommonTests testname args ... because the user/developer never needs to see this. When the executable is also a utility or will be run manually for other

Re: [CMake] About link external object files

2009-04-30 Thread Denis Scherbakov
PROJECT(MYFORTRANCODE Fortran) SET (MYFORTRANCODE_SRCS source.f ) ADD_LIBRARY(mylib ${MYFORTRANCODE_SRCS}) > Hello! I am newcomer for cmake! I want to compile an dll > files with an > object file which generated by gfortran. How to do that ?

Re: [CMake] Using CMake/CPack to make RPMs

2009-04-30 Thread David Flitney
On 30 Apr 2009, at 15:15, David Flitney wrote: One further question: how do I express dependencies? I'd like to require qt >= 3.3 for instance. Can I do this in CMakeLists.txt or will I need a custom spec.in file? Ah, CPACK_RPM_PACKAGE_REQUIRES Sorry! Not reading the docs carefully enough.

[CMake] Target property LOCATION doesn't handle DEBUG_POSTFIX

2009-04-30 Thread Stephan Diederich
Hi, subject says all, here's the CMakeLists.txt: -- cmake_minimum_required(VERSION 2.6) project(locate_test) add_executable(location_test main.cpp) set_target_properties(location_test PROPERTIES DEBUG_POSTFIX "d") get_target_property(output location_test LOCATION) message(${output})

[CMake] About link external object files

2009-04-30 Thread 张宁
Hello! I am newcomer for cmake! I want to compile an dll files with an object file which generated by gfortran. How to do that ? ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Re: [CMake] Double builds required in XCode w/CMake when changing UI code in QtDesigner

2009-04-30 Thread Daniel Blezek
Added a Qt note. On 4/30/09 9:48 AM, "Tobias Rudolph" wrote: > Seems like a duplicate of this one: > http://public.kitware.com/Bug/view.php?id=8833 > > > cheers, > Tobias > > > On 30 Apr 2009, at 16:40, Daniel Blezek wrote: > >> Thanks Bill, >> >> Here's the zip. >> >> mkdir QtBug-xcode

Re: [CMake] Disable linker / only build object files

2009-04-30 Thread Greg Peele
Tyler, I know this isn't exactly what you asked, but have you considered building each directory into a separate static library that is then linked into your final library target? My understanding is that a static library is essentially just an archive of object files. - Gregory Peele, Jr. App

Re: [CMake] Double builds required in XCode w/CMake when changing UI code in QtDesigner

2009-04-30 Thread Tobias Rudolph
Seems like a duplicate of this one: http://public.kitware.com/Bug/view.php?id=8833 cheers, Tobias On 30 Apr 2009, at 16:40, Daniel Blezek wrote: Thanks Bill, Here's the zip. mkdir QtBug-xcode/ cd QtBug-xcode/ cmake -G Xcode ../QtBug open QtBug.xcodeproj/ Build with Command-B Modify Hello

Re: [CMake] Using CMake/CPack to make RPMs

2009-04-30 Thread Eric Noulard
2009/4/30 David Flitney : > Thanks Bill and Eric, > I've upgraded to 2.6 and can see the progress :-) > > One further question: how do I express dependencies? I'd like to require qt >>= 3.3 for instance. Can I do this in CMakeLists.txt or will I need a custom > spec.in file? SET(CPACK_RPM_PACKAGE_

Re: [CMake] header-only project for VS2005

2009-04-30 Thread Greg Peele
I don't know if this is still true, but when I ran into this on my project, trying to call ADD_LIBRARY or ADD_EXECUTABLE with only headers caused CMake to complain that it couldn't figure out the appropriate linker language. My solution was to write an empty .c or .cpp file, use ADD_LIBRARY to bui

Re: [CMake] Using CMake/CPack to make RPMs

2009-04-30 Thread David Flitney
Thanks Bill and Eric, I've upgraded to 2.6 and can see the progress :-) One further question: how do I express dependencies? I'd like to require qt >= 3.3 for instance. Can I do this in CMakeLists.txt or will I need a custom spec.in file? On 30 Apr 2009, at 14:13, Eric Noulard wrote: Do y

Re: [CMake] Using CMake/CPack to make RPMs

2009-04-30 Thread Eric Noulard
2009/4/30 David Flitney : > Apologies if this has already been discussed. I recently discovered CPack > and am overjoyed at the prospect of being able to add simple packaging to my > projects. MacOS X PackageMaker worked so easily, but so far I haven't been > able to get it to work for RPMs. > Icma

Re: [CMake] CMP0005 warning as default

2009-04-30 Thread Bill Hoffman
Dieter Oberkofler wrote: This means that some code in your project was affected by this policy. Is there a way to find out where? Thank you! CMake Warning (dev) at cmake/Definitions.cmake:51 (ADD_DEFINITIONS): -Bill ___ Powered by www.kitware.co

Re: [CMake] Using cmake first time..

2009-04-30 Thread Usman Ajmal
Thanks a lot John for the example. Let see how can use it for my problem. On Thu, Apr 30, 2009 at 5:17 PM, John Drescher wrote: > On Thu, Apr 30, 2009 at 12:46 AM, Usman Ajmal > wrote: > > Hi, > > > > I am not clear with this CMakeLists.txt as to how to create it > automatically > > because i d

Re: [CMake] header-only project for VS2005

2009-04-30 Thread Philip Lowman
On Thu, Apr 30, 2009 at 8:20 AM, Philip Lowman wrote: > On Wed, Apr 29, 2009 at 2:27 PM, Hicham Mouline wrote: > >> Hello, >> >> I use cmake to generate a VS2005 solution as well as linux/g++ makefiles. >> I have a directory containing headers only and subdirs also with headers >> only, >> Howeve

Re: [CMake] header-only project for VS2005

2009-04-30 Thread Philip Lowman
On Wed, Apr 29, 2009 at 2:27 PM, Hicham Mouline wrote: > Hello, > > I use cmake to generate a VS2005 solution as well as linux/g++ makefiles. > I have a directory containing headers only and subdirs also with headers > only, > However I wish to display 1 project for that directory, and filters 1

Re: [CMake] CMP0005 warning as default

2009-04-30 Thread Dieter Oberkofler
>This means that some code in your project was affected by this policy. Is there a way to find out where? Thank you! -Dieter > -Original Message- > From: Bill Hoffman [mailto:bill.hoff...@kitware.com] > Sent: Thursday, April 30, 2009 2:11 PM > To: doberkofler.li...@gmail.com > Cc: CMa

Re: [CMake] Using cmake first time..

2009-04-30 Thread John Drescher
On Thu, Apr 30, 2009 at 12:46 AM, Usman Ajmal wrote: > Hi, > > I am not clear with this CMakeLists.txt as to how to create it automatically > because i don't know the conventions related to it. > > I have a project named test.pro having following files > > treemap.cpp > treemap.h > main.cpp > > Li

Re: [CMake] Using CMake/CPack to make RPMs

2009-04-30 Thread Bill Hoffman
David Flitney wrote: Apologies if this has already been discussed. I recently discovered CPack and am overjoyed at the prospect of being able to add simple packaging to my projects. MacOS X PackageMaker worked so easily, but so far I haven't been able to get it to work for RPMs. Icmake/cpack

Re: [CMake] CMP0005 warning as default

2009-04-30 Thread Bill Hoffman
Dieter Oberkofler wrote: The warning offers a lot of information on how to disable but is it really intended to get the following warning by default? -- CMake Warning (dev) at cmake/Definitions.cmake:51 (ADD_DEFINITIONS): Policy CMP0005 is not set: Preprocessor definition values are no

[CMake] eclipse generator and sibling folders

2009-04-30 Thread Antoine DUCHAMPS
Hi all, I would like to create an eclipse project out of source and after reading the wiki http://www.cmake.org/Wiki/Eclipse_CDT4_Generator I'm confused. The section "accesing the source and advanced editing features " says that the source code must be inside the project and sugest to create sourc

[CMake] Using CMake/CPack to make RPMs

2009-04-30 Thread David Flitney
Apologies if this has already been discussed. I recently discovered CPack and am overjoyed at the prospect of being able to add simple packaging to my projects. MacOS X PackageMaker worked so easily, but so far I haven't been able to get it to work for RPMs. Icmake/cpack versions are 2.4-pa

Re: [CMake] platform independence '

2009-04-30 Thread Mathieu Malaterre
Isn't it the VERBATIM option in custom command ? On Thu, Apr 30, 2009 at 10:05 AM, Micha Renner wrote: > Hi, > > The following code example works very well with Windows. > > ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/atkmarshal.h >        COMMAND cmake -E echo "#define Brom &&" >      

Re: [CMake] Invoking the install target with components

2009-04-30 Thread Adolfo Rodríguez
2009/4/29 Alexander Neundorf > On Wednesday 29 April 2009, Adolfo Rodríguez wrote: > > Hello, > > > > I'm using the COMPONENT option of the install command, and found myself > not > > knowing how to invoke the installation of only one component. Browsing > the > > list's archives, I found a 2006

[CMake] platform independence '

2009-04-30 Thread Micha Renner
Hi, The following code example works very well with Windows. ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/atkmarshal.h COMMAND cmake -E echo "#define Brom &&" COMMENT "-- gmarshalAtk Done") ADD_CUSTOM_TARGET(BuildGmarshal_ATK ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/atkm

Re: [CMake] Disable linker / only build object files

2009-04-30 Thread Adolfo Rodríguez
This is not what you were asking for explicitly, but may solve your problem: - If your subdirectories are all at the same depth (e.g., they all hang from src/) you could just populate your source list in a variable set with the PARENT_SCOPE option, and then generate your library (in src/) with all

Re: [CMake] Cmake support for MKS toolkit

2009-04-30 Thread Eric Noulard
Could you confirm the MKS you are talking about is this one: http://www.mkssoftware.com/ i.e. some kind of "unix tools" for Windows. If this is the case I would bet that you MAY need to compile your own CMake version for MKS just as there is cygwin version of CMake for using from within cygwin.

[CMake] Cmake support for MKS toolkit

2009-04-30 Thread ankit jain
Hi all, I am working on windows. I am currently using MKS to build my code without using cmake. but since i dont know whether cmake supports MKS or not iam not able to build my code through cmake using mks. If yes, please can anybody let me know how i can build my code through mks toolkit on window