Re: [CMake] Custom compile command?

2009-06-05 Thread Bob Tanner
On 2009-06-05 23:00:17 -0500, Bill Hoffman said: Works fine on osx+cmake version 2.6-patch 4 BUT fails on ubuntu+hardy+cmake version 2.4-patch 7 No, should work for both. How does it fail on 2.4? Just confirmed that "cmake version 2.6-patch 2" on jaunty/ubuntu works. Evidence mounting t

Re: [CMake] Custom compile command?

2009-06-05 Thread Bob Tanner
On 2009-06-05 23:00:17 -0500, Bill Hoffman said: No, should work for both. How does it fail on 2.4? Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx CMake Error: Cannot find source file "/tmp/osx-branch/Vanilla/robots/commands_puck.c" for target "puc

Re: [CMake] Custom compile command?

2009-06-05 Thread Bill Hoffman
Bob Tanner wrote: On 2009-06-04 15:57:22 -0500, Bill Hoffman said: set(COMMANDS_TYPE DOG) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/commands.c.in ${CMAKE_CURRENT_BINARY_DIR}/commands_mars.c) set(COMMANDS_TYPE PUCK) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/commands.c.in

Re: [CMake] Creating one Visual Studio solution for many configurations and platforms

2009-06-05 Thread Philip Lowman
On Fri, Jun 5, 2009 at 1:13 PM, David Cole wrote: > You might want to open an issue that is a feature request that asks for > exactly what you think you want > There are several already open that talk about / have patches for adding > support for WinCE and Symbian via adding CMake generators.

Re: [CMake] Custom compile command?

2009-06-05 Thread Bob Tanner
On 2009-06-04 15:57:22 -0500, Bill Hoffman said: set(COMMANDS_TYPE DOG) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/commands.c.in ${CMAKE_CURRENT_BINARY_DIR}/commands_mars.c) set(COMMANDS_TYPE PUCK) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/commands.c.in ${CMAKE

[CMake] SWIG syntax errors

2009-06-05 Thread Adam A Smith
I'm curious if someone has run into this before: I'm using CMake to make some SWIG .i files. I then use SWIG on those files, and it tells me that I have a syntax error. (I don't know SWIG syntax that well, but I'm learning.) I thought I'd ask all of you if this is something you were familia

Re: [CMake] osx-10.5 ranlib vs ranlib -c vs libtool

2009-06-05 Thread Bob Tanner
On 2009-06-05 17:37:11 -0500, Bob Tanner said: First question, how to I add "-c" to ranlib evocation? Sorry for the follow-up to my post, but here is the work-around I used. IF (UNIX) MESSAGE (STATUS "Unix") IF (APPLE) SET(CMAKE_C_CREATE_STATIC_LIBRARY

[CMake] osx-10.5 ranlib vs ranlib -c vs libtool

2009-06-05 Thread Bob Tanner
Ran into another issue with my netrek-server move to cmake. Attempting to link with an internal library gives me a whole bunch of "non_lazy_ptr" linking errors: Linking C executable trimscores Undefined symbols: "_Cambot_out", referenced from: _Cambot_out$non_lazy_ptr in libnetrek.a(getp

Re: [CMake] "return" from a FIND package script?

2009-06-05 Thread Tyler Roscoe
On Fri, Jun 05, 2009 at 02:38:11PM -0600, James Bigler wrote: > Is is possible to stop processing a FINDXYZ.cmake file with find_package > without using a FATAL_ERROR? I want to stop processing the file once I hit > a snag, but not stop all of CMake processing. This feels like kind of a dumb answ

[CMake] "return" from a FIND package script?

2009-06-05 Thread James Bigler
Is is possible to stop processing a FINDXYZ.cmake file with find_package without using a FATAL_ERROR? I want to stop processing the file once I hit a snag, but not stop all of CMake processing. James ___ Powered by www.kitware.com Visit other Kitware o

Re: [CMake] Using m4 as a additional preprocessor for C/C++

2009-06-05 Thread Prasad H. L.
Consolidating all the things, the working CMakeLists.txt is as follows - project(cmake_test) cmake_minimum_required(VERSION 2.6) macro(m4tocxx outfilename) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${outfilename}.cpp COMMAND m4 -P

Re: [CMake] include_external_msproject creating duplicate projects in parent solution

2009-06-05 Thread David . Karr
Tyler Roscoe [mailto:ty...@cryptio.net]: > On Thu, Jun 04, 2009 at 05:14:20PM -0400, david.k...@l-3com.com wrote: > > I wonder if the concept of a PROJECT command in a subdirectory > > of your top-level CMake directory is semantically sound. That is, > > it might work sometimes but cause trouble

[CMake] Overwritting read-only files when installing

2009-06-05 Thread Daniel Tavares
Hello fellow CMakers, Is there any way to make the install step fail if the destination file that is being overwritten is read-only? I need to copy the built target from the off-source folder to a folder under source control. And one of my options is to have the developer build the INSTALL

Re: [CMake] Question about linking

2009-06-05 Thread Tyler Roscoe
On Fri, Jun 05, 2009 at 10:43:44AM -0700, Kaveh Kohan wrote: > question is too naive. I have a project created by Cmake. It produces > an executable which is linked to many shared and static libraries. I > am wondering what is the cmake option which brings all libraries > including shared and stati

Re: [CMake] Running python nose tests

2009-06-05 Thread Eric Noulard
2009/6/5 Tyler Roscoe : > On Thu, Jun 04, 2009 at 04:02:54PM -0400, Eric Jonas wrote: >> I've written a server that serves up an interface using a cross-language >> RPC mechanism (dbus) and currently build and unit test with cmake. But >> testing cross-language (and more functional) aspects of the

[CMake] Question about linking

2009-06-05 Thread Kaveh Kohan
Hi, I am relatively newbie to CMake community. I have a question and I would be thankful if anybody answers. I do apologize in advance if my question is too naive. I have a project created by Cmake. It produces an executable which is linked to many shared and static libraries. I am wondering wh

Re: [CMake] Creating one Visual Studio solution for many configurations and platforms

2009-06-05 Thread David Cole
You might want to open an issue that is a feature request that asks for exactly what you think you want There are several already open that talk about / have patches for adding support for WinCE and Symbian via adding CMake generators. At least these 3 (and probably more) already touch on the

Re: [CMake] Using m4 as a additional preprocessor for C/C++

2009-06-05 Thread Prasad H. L.
Can I define a new source type, like .m4 and add rules for it? That would be ideal, I feel, for my case. 2009/6/5 Tyler Roscoe : > On Fri, Jun 05, 2009 at 10:10:07PM +0530, Prasad H. L. wrote: >> 2009/6/5 Denis Scherbakov : >> > >> >> Is it possible to set the preprocessing to all .m4 files >> >>

Re: [CMake] Using m4 as a additional preprocessor for C/C++

2009-06-05 Thread Tyler Roscoe
On Fri, Jun 05, 2009 at 10:10:07PM +0530, Prasad H. L. wrote: > 2009/6/5 Denis Scherbakov : > > > >> Is it possible to set the preprocessing to all .m4 files > >> avoiding a > >> manual specification of list of files to processed? > > > > If your list of files changes all the time, you can use FILE

Re: [CMake] Creating one Visual Studio solution for many configurations and platforms

2009-06-05 Thread Tyler Roscoe
First, the thread I created about this question on Monday: http://www.cmake.org/pipermail/cmake/2009-June/029805.html On Fri, Jun 05, 2009 at 08:57:34AM -0400, David Cole wrote: > It is not possible with present CMake, although, in my mind it would be a > reasonable feature request for CMake's Vis

Re: [CMake] Using m4 as a additional preprocessor for C/C++

2009-06-05 Thread Prasad H. L.
2009/6/5 Denis Scherbakov : > >> Is it possible to set the preprocessing to all .m4 files >> avoiding a >> manual specification of list of files to processed? > > I don't know of such, but it does not mean that it does not exist. > > If your list of files changes all the time, you can use FILE(GLOB

Re: [CMake] include_external_msproject creating duplicate projects in parent solution

2009-06-05 Thread Tyler Roscoe
I missed this reply since it wasn't threaded correctly (something wrong with your mail reader David?). Luckily David said something slightly different from what I said :). On Thu, Jun 04, 2009 at 05:14:20PM -0400, david.k...@l-3com.com wrote: > I wonder if the concept of a PROJECT command in a sub

Re: [CMake] Running python nose tests

2009-06-05 Thread Tyler Roscoe
On Thu, Jun 04, 2009 at 04:02:54PM -0400, Eric Jonas wrote: > I've written a server that serves up an interface using a cross-language > RPC mechanism (dbus) and currently build and unit test with cmake. But > testing cross-language (and more functional) aspects of the server is > easier to do from

Re: [CMake] include_external_msproject creating duplicate projects in parent solution

2009-06-05 Thread Tyler Roscoe
On Thu, Jun 04, 2009 at 12:47:48PM -0500, Randy Hancock wrote: > external msproject to the parent. This is desirable, but lets say both > the test/time project and the test/string project include the common > lib. This makes common show up *twice* in the parent solution and > causes a bunch of unwa

Re: [CMake] Using m4 as a additional preprocessor for C/C++

2009-06-05 Thread Denis Scherbakov
> Is it possible to set the preprocessing to all .m4 files > avoiding a > manual specification of list of files to processed? I don't know of such, but it does not mean that it does not exist. If your list of files changes all the time, you can use FILE(GLOB...) to find all *.m4 files to automat

Re: [CMake] Using m4 as a additional preprocessor for C/C++

2009-06-05 Thread Prasad H. L.
Thanks. Is it possible to set the preprocessing to all .m4 files avoiding a manual specification of list of files to processed? 2009/6/5 Denis Scherbakov : > > >> 'm4' outputs only on stdout and does not have an option to >> specify the >> output file. Please >> suggest me a solution for this...

Re: [CMake] Using m4 as a additional preprocessor for C/C++

2009-06-05 Thread Robert Haines
Hi, On 5 Jun 2009, at 15:52, Prasad H. L. wrote: I tried as you have suggested. I have one more problem. I tried the following CMakeLists.txt project(cmake_test) cmake_minimum_required(VERSION 2.6) add_executable(testcmake testcmake.m4.cpp) add_custom_command(OUTPUT testcmake.m4.cpp

Re: [CMake] Using m4 as a additional preprocessor for C/C++

2009-06-05 Thread Denis Scherbakov
> 'm4' outputs only on stdout and does not have an option to > specify the > output file. Please > suggest me a solution for this... I had a similar problem and also with a preprocessor. I ended up writing a CMake script like this: EXECUTE_PROCESS( COMMAND my-command "${VAR_IFILE}" RESULT_V

Re: [CMake] Using m4 as a additional preprocessor for C/C++

2009-06-05 Thread Prasad H. L.
I tried as you have suggested. I have one more problem. I tried the following CMakeLists.txt project(cmake_test) cmake_minimum_required(VERSION 2.6) add_executable(testcmake testcmake.m4.cpp) add_custom_command(OUTPUT testcmake.m4.cpp m4 -P -s tes

Re: [CMake] Minor Cache generation bug..

2009-06-05 Thread John Drescher
On Fri, Jun 5, 2009 at 10:37 AM, John Drescher wrote: > The comment for CMAKE_RC_FLAGS is wrong: > > //RC compiler > CMAKE_RC_COMPILER:FILEPATH=C:/Program Files (x86)/Microsoft Visual > Studio/COMMON/MSDev98/Bin/RC.EXE > > //Flags for Fortran compiler. > CMAKE_RC_FLAGS:STRING='  ' > BTW this is wi

[CMake] Minor Cache generation bug..

2009-06-05 Thread John Drescher
The comment for CMAKE_RC_FLAGS is wrong: //RC compiler CMAKE_RC_COMPILER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio/COMMON/MSDev98/Bin/RC.EXE //Flags for Fortran compiler. CMAKE_RC_FLAGS:STRING=' ' -- John M. Drescher ___ Powered by www.

Re: [CMake] Using m4 as a additional preprocessor for C/C++

2009-06-05 Thread Denis Scherbakov
> I wanted to do some looping in macros which are not > possible in GNU > CPP. So, I wrote > macros in m4. I wish to pre-process all my C/C++ code with > m4 before > handing it over to > gcc. I did not find any direct way out for doing this in > cmake. Any > ideas how to do it with > cmake? Use

[CMake] Using m4 as a additional preprocessor for C/C++

2009-06-05 Thread Prasad H. L.
Hi, I wanted to do some looping in macros which are not possible in GNU CPP. So, I wrote macros in m4. I wish to pre-process all my C/C++ code with m4 before handing it over to gcc. I did not find any direct way out for doing this in cmake. Any ideas how to do it with cmake? Regards, Prasad _

Re: [CMake] Convert unix c++ compiler flags to windows compiler flags?

2009-06-05 Thread Denis Scherbakov
> > SET(CMAKE_CXX_FLAGS > > "${CMAKE_CXX_FLAGS} -w -lX11 -Dcimg_use_xshm -lXext > -Dcimg_use_xrandr -lXrandr > > -O3 -fpermissive -march=nocona -m64 -ffast-math > -funroll-loops > -finline-functions") > > > > Any ideas on who I convert those to windows (Visual > Studio 2008) > flags? I think

Re: [CMake] Convert unix c++ compiler flags to windows compiler flags?

2009-06-05 Thread Steve Huston
> I have these compiler flags in a CMakeList.txt file for some linux code: > > SET(CMAKE_CXX_FLAGS > "${CMAKE_CXX_FLAGS} -w -lX11 -Dcimg_use_xshm -lXext -Dcimg_use_xrandr -lXrandr > -O3 -fpermissive -march=nocona -m64 -ffast-math -funroll-loops -finline-functions") > > Any ideas on who I convert

Re: [CMake] Creating one Visual Studio solution for many configurations and platforms

2009-06-05 Thread David Cole
It is not possible with present CMake, although, in my mind it would be a reasonable feature request for CMake's Visual Studio generator to support multiple architecture solution/project files. If the native build tool supports a given feature, then CMake might reasonably be expected to take advant

Re: [CMake] Creating one Visual Studio solution for many configurations and platforms

2009-06-05 Thread Denis Scherbakov
> > ist it possible with cmake to generate one Visual > Studio solution file for many different combinations > > of configurations (Debug,Release) and platforms(win32, > x64). Not possible. This has been discussed recently. The reason is that tests are being executed for a specific platform and

Re: [CMake] Creating one Visual Studio solution for many configurations and platforms

2009-06-05 Thread Michael Jackson
On Jun 5, 2009, at 8:00 AM, Nils Busch wrote: Hello, ist it possible with cmake to generate one Visual Studio solution file for many different combinations of configurations (Debug,Release) and platforms(win32, x64). In other words, instead of separate .sln files into separate directories

[CMake] Creating one Visual Studio solution for m any configurations and platforms

2009-06-05 Thread Nils Busch
Hello, ist it possible with cmake to generate one Visual Studio solution file for many different combinations of configurations (Debug,Release) and platforms(win32, x64). In other words, instead of separate .sln files into separate directories having one solution file in one directory allowing t

Re: [CMake] cl.exe broken

2009-06-05 Thread Hendrik Sattler
Zitat von bob : Hello everyone, I first used cmake, build for VS2005 and found error: " the c compiler cl is not able to complile a simple test program" why? Did you run the shell environment for VS2005? You find the link in the start menu. If you did: You have to also install the Platform S

Re: [CMake] cl.exe broken

2009-06-05 Thread Adolfo Rodríguez
Could you provide more info on the problem? cmake supports VS2005 2009/6/5 bob > Hello everyone, I first used cmake, build for VS2005 and found error: > " the c compiler cl is not able to complile a simple test program" > why? > > > > > > > best, bob > bob...@163.com > 2009-06-05 >

[CMake] cl.exe broken

2009-06-05 Thread bob
Hello everyone, I first used cmake, build for VS2005 and found error: " the c compiler cl is not able to complile a simple test program" why?   best, bob bob...@163.com   2009-06-05 __

Re: [CMake] Trouble with Variable in installation

2009-06-05 Thread Denis Scherbakov
> I tried to > add a target which do the cmake and define the variable like > that : > > add_custom_target(MyInstall COMMAND "cmake -DLANG=%LANG%") > add_dependencies(install MyInstall) > > but I can't add the dependency between the two targets. I think currently it is not possible to force

Re: [CMake] Trouble with Variable in installation

2009-06-05 Thread Pierre-Julien Villoud
Hi Denis and thank you for your answer > either: cmake -DLANG=en_US /path/to/source The problem with this solution is that I want the variable to be set when I call make install and not cmake. I tried to add a target which do the cmake and define the variable like that : add_custom_target(MyIn

Re: [CMake] Trouble with Variable in installation

2009-06-05 Thread Denis Scherbakov
> “make install > Lang=en_US” and > in my CMakeLists.txt : install(FILES language/$ENV{Lang} > > My problem is that > the variable is replaced > when the cmake is called so when I call “make install > Lang=xx”, the You may try to do something of the following either: cmake -DLANG=en_US /path/t

Re: [CMake] file(WRITE) versus configure_file

2009-06-05 Thread Eric Noulard
2009/6/5 James Bigler : >   if(NOT EXISTS ${dependency_file}) >     #message("configuring dependency_file = ${dependency_file}") >     configure_file( >   ${empty_file} >   ${dependency_file} IMMEDIATE) >   endif() The "IMMEDIATE" thing doesn't seem to be document, is it obsolete or undocu

[CMake] Trouble with Variable in installation

2009-06-05 Thread Pierre-Julien Villoud
Hi everyone, I'd like to do the following for my install target : "make install Lang=en_US" and in my CMakeLists.txt : install(FILES language/$ENV{Lang} ...) so that at each call of make install with a defined variable, it calls the install target with the good path and when I call just "make