Re: [CMake] How to define a global scope variable ?

2009-06-22 Thread Andy Lego
Hi, set(global_name value CACHE INTERNAL FORCE) Andy On Mon, Jun 22, 2009 at 6:35 PM, Xiangyun Kong wrote: > > > How could I define a global scoped variable in CMAKE, so that I could use > something like, > >set (global_name ${global_name} {files}) > > to collect all files in each sub-cato

Re: [CMake] gcov results not accurate

2009-03-05 Thread Andy Lego
Hello David, Unfortunately there is no really good way for CTest to guess all the lines from the source code. We use GCov output, which contains the actual lines and their corresponding coverage. If the file is not used, then GCov will not contain any information and therefore it will be ignored.

Re: [CMake] Undocumented FILE(INSTALL ...

2008-10-14 Thread Andy Lego
Hi Eric, The FILE(INSTALL command is an internal command used for install process. If there is a DESTDIR problem, then it is in the original CMake files that generate that file. Andy On Tue, Oct 14, 2008 at 2:18 PM, Eric Noulard <[EMAIL PROTECTED]>wrote: > Hi All, > > I am using > > CONFIGURE_F

Re: [CMake] Configuring .bat file with native path under windows

2008-10-14 Thread Andy Lego
Hi, Look at FILE and STRING commands. Andy On Tue, Oct 14, 2008 at 7:29 AM, Nicolas Desprès <[EMAIL PROTECTED]>wrote: > Hi everyone, > > I'm using cmake 2.6.2 for win32 and I'm trying to configure a .bat > file. I use a couple of cmake variable in my .bat.in template such as > CMAKE_CURRENT_BIN

Re: [CMake] How to specify that a target link library is shared ?

2008-10-07 Thread Andy Lego
Hello, The def file was always a bit of a mystery to me, since you do not specify it on the command line but the linker just finds it magically. I much prefer the import/export mechanism. Here is what I typically did when I still did some Win32 programming: Add the following code in your header

Re: [CMake] How to specify that a target link library is shared ?

2008-10-07 Thread Andy Lego
Hello, The problem is that you are not exporting any symbols in your library. On Windows even with shared libraries you have a .lib file that describes all the exported symbols. Andy On Tue, Oct 7, 2008 at 9:05 AM, Andrea Borsic <[EMAIL PROTECTED]>wrote: > Dear All, > > I am a recent user of C

Re: [CMake] include header files from external library

2008-10-03 Thread Andy Lego
Hi Leila, When doing the search for the header files, specify the relative path within the tree and not the actual header file. For example, find_path(OPEN_MESH_INCLUDES NAMES OpenMesh/balh/balh/something.h ) instead of find_path(OPEN_MESH_INCLUDES NAMES something.h) Then OPEN_MESH_INCLUDES wi

Re: [CMake] Simple GLOB Expression

2008-09-19 Thread Andy Lego
FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_case_filesystem.tmp" "foo") IF(FILE EXITS "${CMAKE_CURRENT_BINARY_DIR}/test_case_filesystem.TMP") ... ENDIF() You should also check if the file already exists. But, be careful. On Mac for example HFS is case independent, but NFS or other FS may not

Re: [CMake] MEMORYCHECK_COMMAND

2008-09-02 Thread Andy Lego
Hi, Sounds like a nice rainy Sunday project. Unfortunately it does not rain in California that much, so it is going to take a while before I have a chance to look at it. Andy On Tue, Sep 2, 2008 at 11:07 AM, Sean McBride <[EMAIL PROTECTED]>wrote: > On 8/26/08 4:41 PM, Andy Lego said:

Re: [CMake] MEMORYCHECK_COMMAND

2008-08-26 Thread Andy Lego
Hi Darren, This is a command used for memory checking, such as valgrind or purify. You do not need to set it to anything, unless you are doing memory checking during testing. I am not sure if there is any memory checker on mac at this point. Haven't looked into that for a while. Andy On Tue, Au

Re: [CMake] Non-C/C++ project

2008-08-12 Thread Andy Lego
PROJECT(foo NONE) Andy On Tue, Aug 12, 2008 at 10:41 AM, <[EMAIL PROTECTED]> wrote: > Hi, > > One of our (sub)project only uses custom commands: neither C nor C++ > compilation. > > How can I tell CMake not to look for a C/C++ compiler, but only executes > the defined custom commands? > > Thanks

Re: [CMake] Copy / filter files

2008-08-12 Thread Andy Lego
Hello, Actually, use CMAKE_CUSTOM_COMMAND instead. This way you will have full dependency checking. Andy On Tue, Aug 12, 2008 at 10:41 AM, David Cole <[EMAIL PROTECTED]> wrote: > EXECUTE_PROCESS with "cmake -E copy" > (or copy_directory) > > > On Tue, Aug 12, 2008 at 1:39 PM, <[EMAIL PROTECTED]

Re: [CMake] List of files

2008-03-27 Thread Andy Lego
Try this after file command: string(REPLACE ";" " " plugin_STR "${plugin_STR}") That said, depending on what you need to do, this may be the wrong type of list. Andy On Thu, Mar 27, 2008 at 5:08 PM, Leopold Palomo Avellaneda <[EMAIL PROTECTED]> wrote: > Hi, > > using this line: > file(GLOB pl

Re: [CMake] Curses libraries not found

2008-03-24 Thread Andy Lego
Hello Dario, Make sure you see the .h files for ncurses. Andy On Mon, Mar 24, 2008 at 1:04 PM, Bill Hoffman <[EMAIL PROTECTED]> wrote: > Dario Figueira wrote: > > :s, where are they? so i can install ccmake > > > > i'm usingKubunto, and i dowloaded the 2.4.7 version and make installed it. >

Re: [CMake] Batch converting several files

2008-03-19 Thread Andy Lego
vant pieces and it worked as expected on the first run. > > Thanks > Martin > > > On 18.03.2008 18:27 Andy Lego wrote: > > I wrote a quick tutorial (tested on Linux and Windows) for what you want > to do: > > > > http://www.cmake.org/Wiki/CMake:How_To_Pr

Re: [CMake] Batch converting several files

2008-03-18 Thread Andy Lego
f learning > CMake details. > > Regards > Martin > > > On 17.03.2008 22:26 Andy Lego wrote: > > You are missing a ( after the ADD_CUSTOM_COMMAND. > > > > > > On Mon, Mar 17, 2008 at 2:18 PM, Martin Fischer <[EMAIL PROTECTED]> wrote: > >>

Re: [CMake] cmake on open solaris

2008-03-18 Thread Andy Lego
Hi, CMake is tested both with gcc and Sun's compiler. Both in 32 and 64 bit mode. Andy On Tue, Mar 18, 2008 at 3:32 AM, Tavitayya Varanasi <[EMAIL PROTECTED]> wrote: > > Actually, We are planing to make cmake as a package available with open > solaris. > > > Matthew Woehlke wrote: > > Tavita

Re: [CMake] Batch converting several files

2008-03-17 Thread Andy Lego
DFOREACH( FILE ) > > CMake outputs: "Wrong syntax. Unknown type of argument" > > It looks like I'll go the less flexible way to code a list of commands > to execute. > > Frustrated > Martin > > > > > > On 17.03.2008 01:44 Andy Lego wrote

Re: [CMake] Batch converting several files

2008-03-16 Thread Andy Lego
Hi Martin, When you add things to the custom target they will be executed in one step. What you want are custom commands. Look at the manual for add_custom_command. Andy On Sun, Mar 16, 2008 at 8:31 AM, Martin Fischer <[EMAIL PROTECTED]> wrote: > On 11.03.2008 21:24 Andy Lego wrote

Re: [CMake] cyclic DLL dependencies

2008-03-13 Thread Andy Lego
Hello Michael, You can also try co cleanup the API so you don't need the circular dependency. This way you can still keep the library separate, but at the same time reduce problems in the future. Andy On Thu, Mar 13, 2008 at 9:18 AM, Michael Wild <[EMAIL PROTECTED]> wrote: > > On 13Mar, 2008, a

Re: [CMake] Attaching cmake commands to a custom target

2008-03-12 Thread Andy Lego
Hi, Just create another CMake file that has your command in it. Then execute it: FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/myfile.cmake" "FILE(GLOB_RECURSE HEADERS ${SRCDIR}/*.h) MESSAGE(STATUS "Header files being processed: ${HEADERS}") ... MESSAGE(STATUS "Done processing...")") ADD_CUSTOM_TARG

Re: [CMake] ADD_CUSTOM_COMMAND doesn't create CMake rules

2008-03-12 Thread Andy Lego
Hello Thorben, You need something that drives the custom command, such as custom target. That said, if you are doing QT stuff, you should really look at FindQT.cmake. Andy On Wed, Mar 12, 2008 at 9:45 AM, Schick, Thorben (ITUC; ADITG/DFG) <[EMAIL PROTECTED]> wrote: > > > > I am trying to use CM

Re: [CMake] Batch converting several files

2008-03-11 Thread Andy Lego
Hello Martin, You cannot nest commands and constructs. Move the FOREACH before the custom target and set a variable in it. Then use the result in the custom target. Andy On Tue, Mar 11, 2008 at 12:44 PM, Martin Fischer <[EMAIL PROTECTED]> wrote: > Hi, > > for a project I'm working on I need to