Re: [CMake] Build only what you need in third party libs

2009-12-21 Thread Brian Davis
I am continuing my attempt (latest in the saga) to use cmake to build 3rd third party libraries and integrate my code and hopefully build only what I need. The two libraries I am building currently are dcmtk (DICOM library) and boost. I am trying to use cmake to create a project which includes d

Re: [CMake] Fortran - Can’t find *.mod

2009-12-21 Thread C. Meissa
Hello again, You helped a lot… Thank You! I solved the ordering problem with “add_dependencies( … )” Thank you again. bye C.M. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.htm

Re: [CMake] Postprocessing output of add_custom_command

2009-12-21 Thread Tyler Roscoe
On Mon, Dec 21, 2009 at 11:50:43PM +0200, Iwan Aucamp wrote: > To be more precise I am trying to use objdump + objcopy to add a section > to a target if it does not already exist - if objdump -h outputs the > header to be added then objcopy is not performed - but if it does not > output the head

Re: [CMake] FindPerlLibs.cmake bug or I don't understand string regex replace

2009-12-21 Thread Hugh Sorby
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Finally I have gotten around to doing this. I have created this patch on Linux so hopefully missing line ends are back. Alexander Neundorf wrote: > On Monday 07 December 2009, Hugh Sorby wrote: >> I have been trying to get FindPerlLibs to work on wi

Re: [CMake] what is the right way to set CMAKE_USE_RELATIVE_PATHS?

2009-12-21 Thread Claus Klein
Hi Micheal, I know the discusion about CMAKE_USE_RELATIVE_PATHS, for all my test under cygwin and MAC-OX with gmake and gcc, it works! Only the setting is a little tricky ;-) There are good reasons to use this option, at leased the shorter log files. Claus Michael Jackson schrieb: There are

[CMake] Postprocessing output of add_custom_command

2009-12-21 Thread Iwan Aucamp
Hi I am looking for a way to chain two custom commands added to a target. To be more precise I am trying to use objdump + objcopy to add a section to a target if it does not already exist - if objdump -h outputs the header to be added then objcopy is not performed - but if it does not output

Re: [CMake] what is the right way to set CMAKE_USE_RELATIVE_PATHS?

2009-12-21 Thread Claus Klein
Hi Aashish, yes the set command is well explained. Thanks. But for some CMAKE variables this not true! I guess that GUI vars have always set with FORCE? Claus Aashish Chaudhary schrieb: Is this useful? http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:set _

Re: [CMake] what is the right way to set CMAKE_USE_RELATIVE_PATHS?

2009-12-21 Thread Claus Klein
John Drescher schrieb: On Mon, Dec 21, 2009 at 3:50 PM, Claus Klein wrote: Hi all, I tried to use: set(CMAKE_USE_RELATIVE_PATHS ON) in my CMakeLists.txt. But I noticed, that some cmake variables can't be changed in that way. In the CMakeCache.txt, it is still OFF? I have no idea a

Re: [CMake] what is the right way to set CMAKE_USE_RELATIVE_PATHS?

2009-12-21 Thread John Drescher
> There are lots of questions on this CMake variable and the consensus is DO > NOT USE IT. PERIOD. The implementation is basically broken for all but the > most trivial case. > I can tell you one thing. If the original idea of this was an attempt to create a CMake free build that will not work. J

Re: [CMake] what is the right way to set CMAKE_USE_RELATIVE_PATHS?

2009-12-21 Thread Michael Jackson
There are lots of questions on this CMake variable and the consensus is DO NOT USE IT. PERIOD. The implementation is basically broken for all but the most trivial case. _ Mike Jackson mike.jack...@bluequartz.net BlueQuart

Re: [CMake] Tiny FindJNI patch to set JNI_FOUND

2009-12-21 Thread Alexander Neundorf
On Monday 21 December 2009, Marcel Loose wrote: > Hi all, > > Here's a tiny patch for FindJNI, which also sets JNI_FOUND, as dictated > by the "CMake Find macros standard". > Thanks, committed (slightly modified) Alex ___ Powered by www.kitware.com Vis

Re: [CMake] what is the right way to set CMAKE_USE_RELATIVE_PATHS?

2009-12-21 Thread John Drescher
On Mon, Dec 21, 2009 at 3:50 PM, Claus Klein wrote: > Hi all, > > I tried to use: >   set(CMAKE_USE_RELATIVE_PATHS ON) > in my CMakeLists.txt. > > But I noticed, that some cmake variables can't be changed in that way. > In the CMakeCache.txt, it is still OFF? > I have no idea about CMAKE_USE_RELAT

[CMake] what is the right way to set CMAKE_USE_RELATIVE_PATHS?

2009-12-21 Thread Claus Klein
Hi all, I tried to use: set(CMAKE_USE_RELATIVE_PATHS ON) in my CMakeLists.txt. But I noticed, that some cmake variables can't be changed in that way. In the CMakeCache.txt, it is still OFF? What goes wrong? Which is the right way do set CMAKE_BUILD_TYPE and CMAKE_USE_RELATIVE_PATHS? //regar

Re: [CMake] Fortran - Can’t find *.mod

2009-12-21 Thread Alan W. Irwin
On 2009-12-21 20:52+0100 C. Meissa wrote: Hello List, I’m moving my fortran project to cmake… I have a src directory containing 3 dirs: main mod1 mod2 The main program in “main” is to be linked against the libs in “mod1” and “mod2”. Additionally “mod2” does need “mod1”, too. (use mod1). Whe

Re: [CMake] Fortran - Can’t find *.mod

2009-12-21 Thread Michael Wild
On 21. Dec, 2009, at 20:52 , C. Meissa wrote: > Hello List, > > I’m moving my fortran project to cmake… > > I have a src directory containing 3 dirs: > main > mod1 > mod2 > > The main program in “main” is to be linked against the libs in “mod1” > and “mod2”. > > Additionally “mod2” does need

[CMake] Fortran - Can’t find *.mod

2009-12-21 Thread C. Meissa
Hello List, I’m moving my fortran project to cmake… I have a src directory containing 3 dirs: main mod1 mod2 The main program in “main” is to be linked against the libs in “mod1” and “mod2”. Additionally “mod2” does need “mod1”, too. (use mod1). When compiling gfortran says: Fatal Error: Can'

Re: [CMake] Finding Blas

2009-12-21 Thread Brad King
Shepherd, Jason F wrote: > A follow on question: What if I don't want to require clapack, > but want to allow it if available. What is the correct way to > check for clapack or lapack? The find_package() command has a QUIET option that could be used to look for one and then the other without com

Re: [CMake] third party library dependencies

2009-12-21 Thread Marcel Loose
On Mon, 2009-12-21 at 14:43 +0100, Michael Wild wrote: > On 21. Dec, 2009, at 14:16 , Marcel Loose wrote: > > > On Mon, 2009-12-21 at 13:32 +0100, Michael Wild wrote: > >> On 21. Dec, 2009, at 12:17 , Marcel Loose wrote: > >> > >>> On Fri, 2009-12-18 at 08:54 -0800, Jed Brown wrote: > On Fri

Re: [CMake] third party library dependencies

2009-12-21 Thread Michael Wild
On 21. Dec, 2009, at 14:16 , Marcel Loose wrote: > On Mon, 2009-12-21 at 13:32 +0100, Michael Wild wrote: >> On 21. Dec, 2009, at 12:17 , Marcel Loose wrote: >> >>> On Fri, 2009-12-18 at 08:54 -0800, Jed Brown wrote: On Fri, 18 Dec 2009 10:19:05 +0100, "Marcel Loose" wrote: > Hi Roman,

Re: [CMake] third party library dependencies

2009-12-21 Thread Marcel Loose
On Mon, 2009-12-21 at 13:32 +0100, Michael Wild wrote: > On 21. Dec, 2009, at 12:17 , Marcel Loose wrote: > > > On Fri, 2009-12-18 at 08:54 -0800, Jed Brown wrote: > >> On Fri, 18 Dec 2009 10:19:05 +0100, "Marcel Loose" wrote: > >>> Hi Roman, > >>> > >>> Not in a portable way. I'm not too famili

Re: [CMake] third party library dependencies

2009-12-21 Thread Michael Wild
On 21. Dec, 2009, at 12:17 , Marcel Loose wrote: > On Fri, 2009-12-18 at 08:54 -0800, Jed Brown wrote: >> On Fri, 18 Dec 2009 10:19:05 +0100, "Marcel Loose" wrote: >>> Hi Roman, >>> >>> Not in a portable way. I'm not too familiar with Windows, but on Linux >>> you can do this when libA is a sha

Re: [CMake] Multiple calls to find_package(Boost) with different components

2009-12-21 Thread Adolfo Rodríguez Tsouroukdissian
On Mon, Dec 21, 2009 at 12:09 PM, Marcel Loose wrote: > Hi Adolfo, > > I think you already answered your question yourself, though maybe you > didn't realize it. Fortunately you wrote the key phrase > > ... Now if I clear all non-internal Boost_* cache variables ... > > The thing is, FindBoost ke

Re: [CMake] third party library dependencies

2009-12-21 Thread Marcel Loose
On Fri, 2009-12-18 at 08:54 -0800, Jed Brown wrote: > On Fri, 18 Dec 2009 10:19:05 +0100, "Marcel Loose" wrote: > > Hi Roman, > > > > Not in a portable way. I'm not too familiar with Windows, but on Linux > > you can do this when libA is a shared library that has its dependency on > > libB linked

Re: [CMake] Multiple calls to find_package(Boost) with different components

2009-12-21 Thread Marcel Loose
Hi Adolfo, I think you already answered your question yourself, though maybe you didn't realize it. Fortunately you wrote the key phrase ... Now if I clear all non-internal Boost_* cache variables ... The thing is, FindBoost keeps track of the components it has already found in internal variable

[CMake] Tiny FindJNI patch to set JNI_FOUND

2009-12-21 Thread Marcel Loose
Hi all, Here's a tiny patch for FindJNI, which also sets JNI_FOUND, as dictated by the "CMake Find macros standard". Best regards, Marcel Loose. Index: FindJNI.cmake === RCS file: /cvsroot/CMake/CMake/Modules/FindJNI.cmake,v retrie

[CMake] Multiple calls to find_package(Boost) with different components

2009-12-21 Thread Adolfo Rodríguez Tsouroukdissian
Hi all, I have a use case where find_package(Boost COMPONENTS xxx) is called more than once, and each time with a different set of components, as in the following example: cmake_minimum_required(VERSION 2.6) project(MyBoost) find_package(Boost REQUIRED COMPONENTS date_time) message(STATUS "1st

Re: [CMake] third party library dependencies

2009-12-21 Thread Adolfo Rodríguez Tsouroukdissian
2009/12/18 Adolfo Rodríguez Tsouroukdissian < adolfo.rodrig...@pal-robotics.com> > > > On Fri, Dec 18, 2009 at 11:11 AM, Marcel Loose wrote: > >> Hi Adolfo, >> >> I cannot reproduce the problem you mention. I made the following >> CMakeLists.txt file: >> > Hmm, I'll perform a check on my side. I