[CMake] running CMake from different parts of the tree

2009-03-11 Thread Tyler Roscoe
Let's say I have two components baselib and productlib. baselib has a CMakeLists and knows how to build itself. productlib has a CMakeLists, has add_subdirectory() and add_dependencies() and target_link_libs() calls to baselib, and knows how to build baselib and then itself. As a developer, I'm ma

Re: [CMake] Qt find package location

2009-03-11 Thread Alexander Neundorf
On Wednesday 11 March 2009, Boudewijn Rempt wrote: > On Wed, 11 Mar 2009, Doug Henry wrote: > > I have multiple Qt installations and would like to know how I guide the > > find_package(Qt4) command to find the correct one. I assume there is a > > variable I can set which defines the search path, w

Re: [CMake] Memory cleanup of variables

2009-03-11 Thread Bill Hoffman
Alexander Neundorf wrote: On Wednesday 11 March 2009, Bill Hoffman wrote: ... Great, glad it works for you. At some point 2.X will be in the past... :) Oh, plans for cmake 3.0 ? oops, 2.4.X. -Bill ___ Powered by www.kitware.com Visit other Kitw

Re: [CMake] Variable scope question

2009-03-11 Thread Alexander Neundorf
On Wednesday 11 March 2009, Marcel Loose wrote: > Hi all, > > I'm struggling with the following. While processing the CMakeLists.txt > files of my project, I want to keep track of include directories and > libraries of "external" packages in say MYPROJECT_INCLUDE_DIRS and > MYPROJECT_LIBRARIES. The

Re: [CMake] "COMPILE_DEFINITIONS"

2009-03-11 Thread Alexander Neundorf
On Wednesday 11 March 2009, Steven Van Ingelgem wrote: > Hi all, > > > How can I add multiple "COMPILE_DEFINITIONS" for 1 source file? > I tried with a foreach loop, I tried with an array to > "COMPILE_DEFINITIONS". In the first case, the latest is retained, in the > last case only the first one is

Re: [CMake] Memory cleanup of variables

2009-03-11 Thread Alexander Neundorf
On Wednesday 11 March 2009, Bill Hoffman wrote: ... > Great, glad it works for you. At some point 2.X will be in the past... :) Oh, plans for cmake 3.0 ? Alex ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitwa

Re: [CMake] Qt find package location

2009-03-11 Thread David Cole
Or set it from a ctest -S script,or set it in the cmake-gui or ccmake UI On Wed, Mar 11, 2009 at 2:36 PM, David Cole wrote: > No env var, use -D > > > On Wed, Mar 11, 2009 at 2:35 PM, Michael Jackson < > mike.jack...@bluequartz.net> wrote: > >> Just to be clear on that, I know QT_QMAKE_EXECUTAB

Re: [CMake] Qt find package location

2009-03-11 Thread David Cole
No env var, use -D On Wed, Mar 11, 2009 at 2:35 PM, Michael Jackson < mike.jack...@bluequartz.net> wrote: > Just to be clear on that, I know QT_QMAKE_EXECUTABLE is a CMake variable > but is there a corresponding environment variable for that? > > or should be we doing cmake > -DQT_QMAKE_EXECUTABL

Re: [CMake] Qt find package location

2009-03-11 Thread Michael Jackson
Just to be clear on that, I know QT_QMAKE_EXECUTABLE is a CMake variable but is there a corresponding environment variable for that? or should be we doing cmake -DQT_QMAKE_EXECUTABLE:PATH=/usr/local/qt/ bin/qmake ../ --- Mike Jackson www.bluequartz.net On Mar 11, 2009, at

Re: [CMake] Qt find package location

2009-03-11 Thread David Cole
If you set QT_QMAKE_EXECUTABLE to the full path to a qmake, *that* qmake is used above all else to find the right Qt. Regardless of QTDIR or PATH. Setting QT_QMAKE_EXECUTABLE is *the* official way to tell CMake where the Qt that you want is. All else is a "find-and-guess" game if you have multiple

Re: [CMake] Qt find package location

2009-03-11 Thread Michael Jackson
You can always do: export QTDIR=/home/dhenry/qtsdk-2009.01/qt export PATH=$QTDIR/bin:$PATH to put the desired qmake as the first one found. _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Software

Re: [CMake] Qt find package location

2009-03-11 Thread Doug Henry
Looks like QTDIR is checked last, so it will always use the one found in my path. I was (incorrectly) expecting QTDIR to be an override, but it functions more like a safety net. -thanks On Wed, Mar 11, 2009 at 1:34 PM, Doug Henry > wrote: > thanks for the responses. I may have missed a detai

Re: [CMake] Qt find package location

2009-03-11 Thread Doug Henry
thanks for the responses. I may have missed a detail somewhere. I set QTDIR (environment and I tried in cmake file) but it always finds the same version of Qt. Below is a listing of my attempts. cmake always finds version 4.3.4, which is installed in /tools/lin64, but my QTDIR variable points t

Re: [CMake] Qt find package location

2009-03-11 Thread Pau Garcia i Quiles
On Wed, Mar 11, 2009 at 5:48 PM, Boudewijn Rempt wrote: > On Wed, 11 Mar 2009, Doug Henry wrote: > >> I have multiple Qt installations and would like to know how I guide the >> find_package(Qt4) command to find the correct one.  I assume there is a >> variable I can set which defines the search pa

Re: [CMake] Qt find package location

2009-03-11 Thread Boudewijn Rempt
On Wed, 11 Mar 2009, Doug Henry wrote: > I have multiple Qt installations and would like to know how I guide the > find_package(Qt4) command to find the correct one. I assume there is a > variable I can set which defines the search path, which will allow me to > change the path to find a differen

[CMake] Qt find package location

2009-03-11 Thread Doug Henry
I have multiple Qt installations and would like to know how I guide the find_package(Qt4) command to find the correct one. I assume there is a variable I can set which defines the search path, which will allow me to change the path to find a different installed version. Thanks. :doug ___

[CMake] Variable scope question

2009-03-11 Thread Marcel Loose
Hi all, I'm struggling with the following. While processing the CMakeLists.txt files of my project, I want to keep track of include directories and libraries of "external" packages in say MYPROJECT_INCLUDE_DIRS and MYPROJECT_LIBRARIES. These variables need to be augmented with new values while pr

Re: [CMake] parameters

2009-03-11 Thread Tyler Roscoe
On Wed, Mar 11, 2009 at 09:39:30AM +0200, lari...@gmail.com wrote: > How can i specify the following parameters in my CMakeLists.txt? > cmake -DCMAKE_THREAD_LIBS:STRING="-pthread" -DCMAKE_USE_PTHREADS:BOOL=ON > -DCMAKE_EXE_LINKER_FLAGS:STRING="-pthread" Maybe I don't understand the question but

Re: [CMake] Memory cleanup of variables

2009-03-11 Thread Bill Hoffman
Naram Qashat wrote: myscript.cmake file(READ ${FILE} ALL_STRINGS) ... message(${RESULT}) -Bill Thanks, that worked very well. The only problems I had, though, were that the quotes were passed to the new invocation of CMake and that I had to use ERROR_VARIABLE instead of OUTPUT_VARIABLE,

Re: [CMake] Memory cleanup of variables

2009-03-11 Thread Naram Qashat
Bill Hoffman wrote: Naram Qashat wrote: Bill Hoffman wrote: Naram Qashat wrote: I have a CMake project that I have been testing with various verisons of CMake 2.4.x and 2.6.x to make sure it works as far back as 2.4.0, due to not knowing what version of CMake our users will be using since a

Re: [CMake] What's the difference between option and variable of type bool

2009-03-11 Thread Bill Hoffman
Marcel Loose wrote: Hi all, I feel rather stupid, but I fail to see whether there's any difference between a CMake option (which is stored in the cache as a variable of type bool) and a CMake variable of type bool that's being cached. Both can be modified in a GUI like ccmake. Is there any reas

Re: [CMake] CDash and submiting aditional information

2009-03-11 Thread Martin Apel
Hi Martin, I am using Dart still, not CDash. But anyway, this is mainly a CTest configuration issue. Here is what I do: I have a CTest script which contains the following line: SET (CTEST_NOTES_FILES "${CTEST_BINARY_DIRECTORY}/SVNVersionInfo.txt") This file is generated to contain the Subversion

[CMake] CDash and submiting aditional information

2009-03-11 Thread Martin Santa María
Hello everyone, I have different nightly builds with different configurations for the same CDash Project. I would like to show descriptive information of these builds, for example, the options used to build each one. Is there a way to add some information to the submition in orther to arch

[CMake] What's the difference between option and variable of type bool

2009-03-11 Thread Marcel Loose
Hi all, I feel rather stupid, but I fail to see whether there's any difference between a CMake option (which is stored in the cache as a variable of type bool) and a CMake variable of type bool that's being cached. Both can be modified in a GUI like ccmake. Is there any reason to prefer the forme

Re: [CMake] Memory cleanup of variables

2009-03-11 Thread Bill Hoffman
Naram Qashat wrote: Bill Hoffman wrote: Naram Qashat wrote: I have a CMake project that I have been testing with various verisons of CMake 2.4.x and 2.6.x to make sure it works as far back as 2.4.0, due to not knowing what version of CMake our users will be using since a lot of them use shell

[CMake] "COMPILE_DEFINITIONS"

2009-03-11 Thread Steven Van Ingelgem
Hi all, How can I add multiple "COMPILE_DEFINITIONS" for 1 source file? I tried with a foreach loop, I tried with an array to "COMPILE_DEFINITIONS". In the first case, the latest is retained, in the last case only the first one is set. Thanks, Steven* * _

Re: [CMake] disablе C checking

2009-03-11 Thread Eric Noulard
2009/3/11 Artem Zolochevskiy : > hi all > > I'm newbie here. Sorry for my terrible English. > > For my first project I don't even need "C". How can I disable C checking? > In my project I try to convert some documentation (txt->html) with asciidoc > and want to do it with help of CMake. > > Curren

[CMake] disablе C checking

2009-03-11 Thread Artem Zolochevskiy
hi all I'm newbie here. Sorry for my terrible English. For my first project I don't even need "C". How can I disable C checking? In my project I try to convert some documentation (txt->html) with asciidoc and want to do it with help of CMake. Currently I have project(name C) in my CMakeLists.tx

Re: [CMake] make CFLAGS= support

2009-03-11 Thread Mathieu Malaterre
On Wed, Mar 11, 2009 at 9:52 AM, Vladimir Prus wrote: > > Hello, > I have cmake version '2.6-patch 2', and after I generate makefiles, > and build with > >make CFLAGS=-O2 > > I don't see -O2 being used in the compiler command line. Is this > the expected behaviour? > > I realize that CFLAG

[CMake] make CFLAGS= support

2009-03-11 Thread Vladimir Prus
Hello, I have cmake version '2.6-patch 2', and after I generate makefiles, and build with make CFLAGS=-O2 I don't see -O2 being used in the compiler command line. Is this the expected behaviour? I realize that CFLAGS is a automake convention, so I am not saying cmake should support it,

Re: [CMake] Question about if/else in Cmake

2009-03-11 Thread Marcel Loose
Hi Sascha, I recently ported our existing autotool tests for lib vs. lib64 to CMake. I haven't thoroughly tested it yet, but I think it will suit your needs. I use the CMake global property FIND_LIBRARY_USE_LIB64_PATHS to record the use of either lib or lib64. Hope it helps. Regards, Marcel Loose

[CMake] parameters

2009-03-11 Thread lari...@gmail.com
How can i specify the following parameters in my CMakeLists.txt? cmake -DCMAKE_THREAD_LIBS:STRING="-pthread" -DCMAKE_USE_PTHREADS:BOOL=ON -DCMAKE_EXE_LINKER_FLAGS:STRING="-pthread" P.S. Sorry for my English:) ___ Powered by www.kitware.com Visit oth